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 355c402bac8..d92e1c4266b 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/mrm_state') }} +- {{ link_ad_api('/api/fail_safe/rti_state') }} ## Description @@ -15,10 +16,10 @@ The fail-safe module selects the behavior of MRM according to the abnormality an ![fail-safe-architecture](./fail-safe/architecture.drawio.svg) -## States +## MRM state -The MRM state indicates whether MRM is operating. This state also provides success or failure. -Generally, MRM will switch to another behavior if it fails. +The MRM state indicates whether MRM is operating and its current behavior. +This state also provides success or failure of the operation. Generally, MRM will switch to another behavior if it fails. ![mrm-state](./fail-safe/mrm-state.drawio.svg) @@ -29,8 +30,6 @@ Generally, MRM will switch to another behavior if it fails. | SUCCEEDED | MRM succeeded. The vehicle is in a safe condition. | | FAILED | MRM failed. The vehicle is still in an unsafe condition. | -## Behavior - 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. @@ -41,3 +40,14 @@ This is service dependent. Autoware supports the following transitions by defaul | NONE | MRM is not operating or is operating but no special behavior is required. | | COMFORTABLE_STOP | The vehicle will stop quickly with a comfortable deceleration. | | EMERGENCY_STOP | The vehicle will stop immediately with as much deceleration as possible. | + +## RTI state + +The RTI state indicates whether RTI is requested. If for some reason autonomous driving cannot continue, Autoware will request a change to manual driving. +The following states are provided to properly handle RTI from multiple vehicles. + +| State | Description | +| ------------- | ----------------------------------------------------------------------------------------- | +| NONE | RTI is not requested. | +| MRM_OPERATING | MRM is operating. Since MRC has not been achieved, immediate intervention is recommended. | +| MRM_COMPLETED | MRM is completed. Since MRC has been achieved, give priority to vehicles with urgency. | diff --git a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/rti_state.md b/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/rti_state.md new file mode 100644 index 00000000000..a7512c76d74 --- /dev/null +++ b/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/rti_state.md @@ -0,0 +1,18 @@ +--- +title: /api/fail_safe/rti_state +status: not released +method: notification +type: + name: autoware_adapi_v1_msgs/msg/RtiState + msg: + - name: state + text: The state of RTI. + - name: message + text: The message such as reasons for RTI. +--- + +{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} +{% block description %} +Get the RTI state. +For details, see the [fail-safe](../../../features/fail-safe.md). +{% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/index.md b/docs/design/autoware-interfaces/ad-api/list/index.md index a95a73b670b..72c8d40e430 100644 --- a/docs/design/autoware-interfaces/ad-api/list/index.md +++ b/docs/design/autoware-interfaces/ad-api/list/index.md @@ -1,6 +1,7 @@ # List of Autoware AD API - [/api/fail_safe/mrm_state](./api/fail_safe/mrm_state.md) +- [/api/fail_safe/rti_state](./api/fail_safe/rti_state.md) - [/api/interface/version](./api/interface/version.md) - [/api/localization/initialization_state](./api/localization/initialization_state.md) - [/api/localization/initialize](./api/localization/initialize.md) diff --git a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/RtiState.md b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/RtiState.md new file mode 100644 index 00000000000..5cce4fdb8c9 --- /dev/null +++ b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/RtiState.md @@ -0,0 +1,20 @@ +--- +# This file is generated by tools/autoware-interfaces/generate.py +title: autoware_adapi_v1_msgs/msg/RtiState +--- + +{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %} +{% block definition %} + +```txt +uint16 UNKNOWN = 0 +uint16 NONE = 1 +uint16 MRM_OPERATING = 2 +uint16 MRM_COMPLETED = 3 + +builtin_interfaces/Time stamp +uint16 state +string message +``` + +{% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/types/index.md b/docs/design/autoware-interfaces/ad-api/types/index.md index c620381a216..3eaaf13eee4 100644 --- a/docs/design/autoware-interfaces/ad-api/types/index.md +++ b/docs/design/autoware-interfaces/ad-api/types/index.md @@ -26,6 +26,7 @@ - [autoware_adapi_v1_msgs/msg/RoutePrimitive](./autoware_adapi_v1_msgs/msg/RoutePrimitive.md) - [autoware_adapi_v1_msgs/msg/RouteSegment](./autoware_adapi_v1_msgs/msg/RouteSegment.md) - [autoware_adapi_v1_msgs/msg/RouteState](./autoware_adapi_v1_msgs/msg/RouteState.md) +- [autoware_adapi_v1_msgs/msg/RtiState](./autoware_adapi_v1_msgs/msg/RtiState.md) - [autoware_adapi_v1_msgs/msg/SteeringFactor](./autoware_adapi_v1_msgs/msg/SteeringFactor.md) - [autoware_adapi_v1_msgs/msg/SteeringFactorArray](./autoware_adapi_v1_msgs/msg/SteeringFactorArray.md) - [autoware_adapi_v1_msgs/msg/TurnIndicators](./autoware_adapi_v1_msgs/msg/TurnIndicators.md) diff --git a/yaml/autoware-interfaces.yaml b/yaml/autoware-interfaces.yaml index 7ee9a89be63..249caa56bf9 100644 --- a/yaml/autoware-interfaces.yaml +++ b/yaml/autoware-interfaces.yaml @@ -116,6 +116,11 @@ types: msg: stamp: builtin_interfaces/msg/Time state: uint16 + autoware_adapi_v1_msgs/msg/RtiState: + msg: + message: string + stamp: builtin_interfaces/msg/Time + state: uint16 autoware_adapi_v1_msgs/msg/SteeringFactor: msg: behavior: string