Skip to content

Commit

Permalink
feat(ad-api): add request to intervene (RTI) (#444)
Browse files Browse the repository at this point in the history
* add rti api

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* simplify message

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* move section

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

---------

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
  • Loading branch information
isamu-takagi authored Mar 10, 2025
1 parent bb058cc commit a84a2f1
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/design/autoware-interfaces/ad-api/features/fail-safe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Related API

- {{ link_ad_api('/api/fail_safe/rti_state') }}
- {{ link_ad_api('/api/fail_safe/mrm_state') }}

## Description
Expand All @@ -15,10 +16,14 @@ The fail-safe module selects the behavior of MRM according to the abnormality an

![fail-safe-architecture](./fail-safe/architecture.drawio.svg)

## States
## RTI 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 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 state

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)

Expand All @@ -29,8 +34,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.

Expand Down
Original file line number Diff line number Diff line change
@@ -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: request
text: The flag for whether RTI is requested.
- 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 %}
1 change: 1 addition & 0 deletions docs/design/autoware-interfaces/ad-api/list/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
| API | Release | Method |
| ------------------------------------------------------------------------------------------------ | ------------ | --------------- |
| [/api/fail_safe/mrm_state](./api/fail_safe/mrm_state.md) | v1.1.0 | notification |
| [/api/fail_safe/rti_state](./api/fail_safe/rti_state.md) | not released | notification |
| [/api/interface/version](./api/interface/version.md) | v1.0.0 | function call |
| [/api/local/command/acceleration](./api/local/command/acceleration.md) | not released | realtime stream |
| [/api/local/command/gear](./api/local/command/gear.md) | not released | notification |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
# 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
builtin_interfaces/Time stamp
bool request
string message
```

{% endblock %}
1 change: 1 addition & 0 deletions docs/design/autoware-interfaces/ad-api/types/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,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/SteeringCommand](./autoware_adapi_v1_msgs/msg/SteeringCommand.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)
Expand Down
5 changes: 5 additions & 0 deletions yaml/autoware-interfaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ types:
msg:
stamp: builtin_interfaces/msg/Time
state: uint16
autoware_adapi_v1_msgs/msg/RtiState:
msg:
message: string
request: bool
stamp: builtin_interfaces/msg/Time
autoware_adapi_v1_msgs/msg/SteeringCommand:
msg:
stamp: builtin_interfaces/msg/Time
Expand Down

0 comments on commit a84a2f1

Please sign in to comment.