Skip to content

feat(ad-api): mrm description api #673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/design/autoware-interfaces/ad-api/features/fail-safe.md
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand All @@ -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.
Expand All @@ -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.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
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 @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
@@ -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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ uint16 MRM_OPERATING = 2
uint16 MRM_SUCCEEDED = 3
uint16 MRM_FAILED = 4

# For behavior
# For behavior. Deprecated: use description API.
uint16 NONE = 1
uint16 EMERGENCY_STOP = 2
uint16 COMFORTABLE_STOP = 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/SelectManualControlMode
- autoware_adapi_v1_msgs/srv/SendMrmRequest
- autoware_adapi_v1_msgs/srv/SetCooperationCommands
Expand Down
Original file line number Diff line number Diff line change
@@ -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 %}
2 changes: 2 additions & 0 deletions docs/design/autoware-interfaces/ad-api/types/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,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)
Expand Down Expand Up @@ -64,6 +65,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/SelectManualControlMode](./autoware_adapi_v1_msgs/srv/SelectManualControlMode.md)
- [autoware_adapi_v1_msgs/srv/SendMrmRequest](./autoware_adapi_v1_msgs/srv/SendMrmRequest.md)
- [autoware_adapi_v1_msgs/srv/SetCooperationCommands](./autoware_adapi_v1_msgs/srv/SetCooperationCommands.md)
Expand Down
10 changes: 10 additions & 0 deletions yaml/autoware-interfaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,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
Expand Down Expand Up @@ -291,6 +296,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/SelectManualControlMode:
req:
mode: autoware_adapi_v1_msgs/msg/ManualControlMode
Expand Down
Loading