diff --git a/docs/design/autoware-interfaces/ad-api/features/fail-safe.md b/docs/design/autoware-interfaces/ad-api/features/fail-safe.md index 9dc5d84e75e..48005d100bb 100644 --- a/docs/design/autoware-interfaces/ad-api/features/fail-safe.md +++ b/docs/design/autoware-interfaces/ad-api/features/fail-safe.md @@ -3,6 +3,7 @@ ## Related API - {{ link_ad_api('/api/fail_safe/rti_state') }} +- {{ link_ad_api('/api/fail_safe/mrm_description') }} - {{ link_ad_api('/api/fail_safe/mrm_state') }} - {{ link_ad_api('/api/fail_safe/mrm_request/send') }} - {{ link_ad_api('/api/fail_safe/mrm_request/list') }} @@ -22,6 +23,11 @@ The fail-safe module selects the behavior of MRM according to the abnormality an The RTI state indicates whether RTI is requested. If for some reason autonomous driving cannot continue, Autoware will request a change to manual driving. As a side note, RTI is sometimes called Take Over Request (TOR). +## MRM description + +Autoware supports various MRM implementation to provide appropriate behavior for each use case. +Therefore, use this API when detailed information about MRM behavior is required. The MRM behavior ID listed by this API is used in MRM state API. + ## MRM state The MRM state indicates whether MRM is operating and its current behavior. @@ -36,6 +42,7 @@ This state also provides success or failure of the operation. Generally, MRM wil | SUCCEEDED | MRM succeeded. The vehicle is in a safe condition. | | FAILED | MRM failed. The vehicle is still in an unsafe condition. | +**[v1.9.0] Deprecated: Use the MRM behavior ID instead of following constants.** There is a dependency between MRM behaviors. For example, it switches from a comfortable stop to a emergency stop, but not the other way around. This is service dependent. Autoware supports the following transitions by default. diff --git a/docs/design/autoware-interfaces/ad-api/features/fail-safe/architecture.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/fail-safe/architecture.drawio.svg index 58ddc1771c0..47e9c818d70 100644 --- a/docs/design/autoware-interfaces/ad-api/features/fail-safe/architecture.drawio.svg +++ b/docs/design/autoware-interfaces/ad-api/features/fail-safe/architecture.drawio.svg @@ -1,212 +1,516 @@ - - - - - - - - -
-
-
- Autoware Planner + + + + + + + + + + + + + + + +
+
+
+ Autoware Planner +
-
- - Autoware Planner - - - - - - -
-
-
- Fail-safe Gate + + Autoware Planner + + + + + + + + + + +
+
+
+ Command Selector +
-
- - Fail-safe Gate - - - - - - - - -
-
-
- MRM Selector + + Command Selector + + + + + + + + + + + + + + +
+
+
+ Autonomous Command +
-
- - MRM Selector - - - - - - - - -
-
-
- Operation Mode Selector + + Autonomous Command + + + + + + + + + + + + + + +
+
+
+ Other Mode +
Planners
+
-
- - Operation Mode Selector - - - - - - - - -
-
-
- Other Modes + + Other Mode... + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ Fail-safe +
+ Module +
-
- - Other Modes - - - - - - - - - - - - - - -
-
-
- Fail-safe -
- Module + + Fail-safe... + + + + + + + + + + +
+
+
+ select +
-
- - Fail-safe... - - - - - - -
-
-
- state + + select + + + + + + + + + + +
+
+
+ change mode +
-
- - state - - - - - - -
-
-
- behavior + + change mode + + + + + + + + + + + + + + + + + +
+
+
+ Independent +
+ MRM Planner +
-
- - behavior - - - - - - -
-
-
- change mode + + Independent... + + + + + + + + + + + + + + +
+
+
+ MRM commands +
-
- - change mode - - - - - - - - -
-
-
- Independent -
- MRM Planner + + MRM commands + + + + + + + + + + + + + + +
+
+
+ MRM command +
+
+
+
+ MRM command +
+
+
+ + + + + + + + + + + +
+
+
+ Other Mode +
+ Commands +
+
-
- - Independent... - + + Other Mode... + + - - Viewer does not support full SVG 1.1 + + Text is not SVG - cannot display diff --git a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_description.md b/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_description.md new file mode 100644 index 00000000000..3ee375032ca --- /dev/null +++ b/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_description.md @@ -0,0 +1,23 @@ +--- +title: /api/fail_safe/mrm_description +status: not released +method: function call +type: + name: autoware_adapi_v1_msgs/srv/ListMrmDescription + req: + - name: descriptions.behavior + text: The behavior ID of the MRM. + - name: descriptions.name + text: The name of the MRM. + - name: descriptions.description + text: The description of the MRM. + res: + - name: status + text: response status +--- + +{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} +{% block description %} +Get the list of MRM description. +For details, see the [fail-safe](../../../features/fail-safe.md). +{% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_request/list.md b/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_request/list.md index f72103b7324..079a9803a72 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_request/list.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_request/list.md @@ -5,7 +5,7 @@ method: notification type: name: autoware_adapi_v1_msgs/msg/MrmRequestList msg: - - name: requests.user + - name: requests.sender text: The sender name of the MRM request. - name: requests.strategy text: The strategy of the MRM request. diff --git a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_request/send.md b/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_request/send.md index 68ef0936880..a1903ed4807 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_request/send.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_request/send.md @@ -5,7 +5,7 @@ method: function call type: name: autoware_adapi_v1_msgs/srv/SendMrmRequest req: - - name: request.user + - name: request.sender text: The sender name of the MRM request. - name: request.strategy text: The strategy of the MRM request. diff --git a/docs/design/autoware-interfaces/ad-api/list/index.md b/docs/design/autoware-interfaces/ad-api/list/index.md index 243af75b98d..66b37d3a476 100644 --- a/docs/design/autoware-interfaces/ad-api/list/index.md +++ b/docs/design/autoware-interfaces/ad-api/list/index.md @@ -2,6 +2,7 @@ | API | Release | Method | | ------------------------------------------------------------------------------------------------ | ------------ | --------------- | +| [/api/fail_safe/mrm_description](./api/fail_safe/mrm_description.md) | not released | function call | | [/api/fail_safe/mrm_request/list](./api/fail_safe/mrm_request/list.md) | not released | notification | | [/api/fail_safe/mrm_request/send](./api/fail_safe/mrm_request/send.md) | not released | function call | | [/api/fail_safe/mrm_state](./api/fail_safe/mrm_state.md) | v1.1.0 | notification | diff --git a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/MrmDescription.md b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/MrmDescription.md new file mode 100644 index 00000000000..58c871328cf --- /dev/null +++ b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/MrmDescription.md @@ -0,0 +1,17 @@ +--- +# This file is generated by tools/autoware-interfaces/generate.py +title: autoware_adapi_v1_msgs/msg/MrmDescription +used: + - autoware_adapi_v1_msgs/srv/ListMrmDescription +--- + +{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %} +{% block definition %} + +```txt +uint16 behavior +string name +string description +``` + +{% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/MrmState.md b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/MrmState.md index 79a62cc8cd3..10eeab339a6 100644 --- a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/MrmState.md +++ b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/MrmState.md @@ -18,7 +18,8 @@ uint16 MRM_OPERATING = 2 uint16 MRM_SUCCEEDED = 3 uint16 MRM_FAILED = 4 -# For behavior +# For behavior. Deprecated: use description API. +# https://autowarefoundation.github.io/autoware-documentation/main/design/autoware-interfaces/ad-api/features/fail-safe/ uint16 NONE = 1 uint16 EMERGENCY_STOP = 2 uint16 COMFORTABLE_STOP = 3 diff --git a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/ResponseStatus.md b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/ResponseStatus.md index 6d5a4932abd..85759a2d1a1 100644 --- a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/ResponseStatus.md +++ b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/ResponseStatus.md @@ -11,6 +11,7 @@ used: - autoware_adapi_v1_msgs/srv/GetVehicleSpecs - autoware_adapi_v1_msgs/srv/InitializeLocalization - autoware_adapi_v1_msgs/srv/ListManualControlMode + - autoware_adapi_v1_msgs/srv/ListMrmDescription - autoware_adapi_v1_msgs/srv/ResetDiagGraph - autoware_adapi_v1_msgs/srv/SelectManualControlMode - autoware_adapi_v1_msgs/srv/SendMrmRequest diff --git a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/srv/ListMrmDescription.md b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/srv/ListMrmDescription.md new file mode 100644 index 00000000000..adca00dbbff --- /dev/null +++ b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/srv/ListMrmDescription.md @@ -0,0 +1,18 @@ +--- +# This file is generated by tools/autoware-interfaces/generate.py +title: autoware_adapi_v1_msgs/srv/ListMrmDescription +uses: + - autoware_adapi_v1_msgs/msg/MrmDescription + - autoware_adapi_v1_msgs/msg/ResponseStatus +--- + +{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %} +{% block definition %} + +```txt +autoware_adapi_v1_msgs/MrmDescription[] descriptions +--- +autoware_adapi_v1_msgs/ResponseStatus status +``` + +{% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/types/index.md b/docs/design/autoware-interfaces/ad-api/types/index.md index 1a00f1de448..495ac974173 100644 --- a/docs/design/autoware-interfaces/ad-api/types/index.md +++ b/docs/design/autoware-interfaces/ad-api/types/index.md @@ -31,6 +31,7 @@ - [autoware_adapi_v1_msgs/msg/ManualControlModeStatus](./autoware_adapi_v1_msgs/msg/ManualControlModeStatus.md) - [autoware_adapi_v1_msgs/msg/ManualOperatorHeartbeat](./autoware_adapi_v1_msgs/msg/ManualOperatorHeartbeat.md) - [autoware_adapi_v1_msgs/msg/MotionState](./autoware_adapi_v1_msgs/msg/MotionState.md) +- [autoware_adapi_v1_msgs/msg/MrmDescription](./autoware_adapi_v1_msgs/msg/MrmDescription.md) - [autoware_adapi_v1_msgs/msg/MrmRequest](./autoware_adapi_v1_msgs/msg/MrmRequest.md) - [autoware_adapi_v1_msgs/msg/MrmRequestList](./autoware_adapi_v1_msgs/msg/MrmRequestList.md) - [autoware_adapi_v1_msgs/msg/MrmState](./autoware_adapi_v1_msgs/msg/MrmState.md) @@ -67,6 +68,7 @@ - [autoware_adapi_v1_msgs/srv/GetVehicleSpecs](./autoware_adapi_v1_msgs/srv/GetVehicleSpecs.md) - [autoware_adapi_v1_msgs/srv/InitializeLocalization](./autoware_adapi_v1_msgs/srv/InitializeLocalization.md) - [autoware_adapi_v1_msgs/srv/ListManualControlMode](./autoware_adapi_v1_msgs/srv/ListManualControlMode.md) +- [autoware_adapi_v1_msgs/srv/ListMrmDescription](./autoware_adapi_v1_msgs/srv/ListMrmDescription.md) - [autoware_adapi_v1_msgs/srv/ResetDiagGraph](./autoware_adapi_v1_msgs/srv/ResetDiagGraph.md) - [autoware_adapi_v1_msgs/srv/SelectManualControlMode](./autoware_adapi_v1_msgs/srv/SelectManualControlMode.md) - [autoware_adapi_v1_msgs/srv/SendMrmRequest](./autoware_adapi_v1_msgs/srv/SendMrmRequest.md) diff --git a/yaml/autoware-interfaces.yaml b/yaml/autoware-interfaces.yaml index 69486837855..2453f9031e8 100644 --- a/yaml/autoware-interfaces.yaml +++ b/yaml/autoware-interfaces.yaml @@ -135,6 +135,11 @@ types: msg: stamp: builtin_interfaces/msg/Time state: uint16 + autoware_adapi_v1_msgs/msg/MrmDescription: + msg: + behavior: uint16 + description: string + name: string autoware_adapi_v1_msgs/msg/MrmRequest: msg: sender: string @@ -310,6 +315,11 @@ types: res: modes: autoware_adapi_v1_msgs/msg/ManualControlMode[] status: autoware_adapi_v1_msgs/msg/ResponseStatus + autoware_adapi_v1_msgs/srv/ListMrmDescription: + req: + descriptions: autoware_adapi_v1_msgs/msg/MrmDescription[] + res: + status: autoware_adapi_v1_msgs/msg/ResponseStatus autoware_adapi_v1_msgs/srv/ResetDiagGraph: res: status: autoware_adapi_v1_msgs/msg/ResponseStatus