Skip to content

Commit 1d17660

Browse files
authored
feat(ad-api): add mrm request (#649)
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
1 parent 996a654 commit 1d17660

File tree

10 files changed

+128
-0
lines changed

10 files changed

+128
-0
lines changed

docs/design/autoware-interfaces/ad-api/features/fail-safe.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- {{ link_ad_api('/api/fail_safe/rti_state') }}
66
- {{ link_ad_api('/api/fail_safe/mrm_state') }}
7+
- {{ link_ad_api('/api/fail_safe/mrm_request/send') }}
8+
- {{ link_ad_api('/api/fail_safe/mrm_request/list') }}
79

810
## Description
911

@@ -45,3 +47,16 @@ This is service dependent. Autoware supports the following transitions by defaul
4547
| COMFORTABLE_STOP | The vehicle will stop quickly with a comfortable deceleration. |
4648
| EMERGENCY_STOP | The vehicle will stop immediately with as much deceleration as possible. |
4749
| PULL_OVER | The vehicle will stop after moving to the side of the road. |
50+
51+
## MRM request
52+
53+
MRM request is a feature that triggers MRM from an application, and is mainly used when the application wants to transition the vehicle to a safe state by detecting an abnormality. When an MRM request is sent, Autoware attempts to operate the MRM. To distinguish requests from multiple applications, an MRM request must include a user name as an identifier.
54+
55+
Since MRM has multiple behaviors, this feature provides a selection strategy. Please refer to the table below for supported strategies.
56+
If there are multiple requests, the strategy with the highest priority will be used.
57+
Note that when Autoware detects an abnormality, it may not be able to operate according to the MRM request strategy.
58+
59+
| Strategy | Description |
60+
| -------- | ---------------------------------------------------------- |
61+
| CANCEL | Cancel the MRM request associated with the specified user. |
62+
| DELEGATE | Delegate the selection of MRM behavior to Autoware. |
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: /api/fail_safe/mrm_request/list
3+
status: not released
4+
method: notification
5+
type:
6+
name: autoware_adapi_v1_msgs/msg/MrmRequestList
7+
msg:
8+
- name: requests.user
9+
text: The sender name of the MRM request.
10+
- name: requests.strategy
11+
text: The strategy of the MRM request.
12+
---
13+
14+
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
15+
{% block description %}
16+
List the MRM requests from all senders.
17+
For details, see the [fail-safe](../../../../features/fail-safe.md).
18+
{% endblock %}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: /api/fail_safe/mrm_request/send
3+
status: not released
4+
method: function call
5+
type:
6+
name: autoware_adapi_v1_msgs/srv/SendMrmRequest
7+
req:
8+
- name: request.user
9+
text: The sender name of the MRM request.
10+
- name: request.strategy
11+
text: The strategy of the MRM request.
12+
res:
13+
- name: status
14+
text: response status
15+
---
16+
17+
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
18+
{% block description %}
19+
Send the MRM request.
20+
For details, see the [fail-safe](../../../../features/fail-safe.md).
21+
{% endblock %}

docs/design/autoware-interfaces/ad-api/list/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
| API | Release | Method |
44
| ------------------------------------------------------------------------------------------------ | ------------ | --------------- |
5+
| [/api/fail_safe/mrm_request/list](./api/fail_safe/mrm_request/list.md) | not released | notification |
6+
| [/api/fail_safe/mrm_request/send](./api/fail_safe/mrm_request/send.md) | not released | function call |
57
| [/api/fail_safe/mrm_state](./api/fail_safe/mrm_state.md) | v1.1.0 | notification |
68
| [/api/fail_safe/rti_state](./api/fail_safe/rti_state.md) | not released | notification |
79
| [/api/interface/version](./api/interface/version.md) | v1.0.0 | function call |
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# This file is generated by tools/autoware-interfaces/generate.py
3+
title: autoware_adapi_v1_msgs/msg/MrmRequest
4+
used:
5+
- autoware_adapi_v1_msgs/msg/MrmRequestList
6+
- autoware_adapi_v1_msgs/srv/SendMrmRequest
7+
---
8+
9+
{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %}
10+
{% block definition %}
11+
12+
```txt
13+
uint16 UNKNOWN = 0
14+
uint16 CANCEL = 1 # Cancel the MRM request.
15+
uint16 DELEGATE = 2 # Delegate the selection of MRM behavior to Autoware.
16+
17+
uint16 strategy
18+
string user # The identifier of the request sender.
19+
```
20+
21+
{% endblock %}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
# This file is generated by tools/autoware-interfaces/generate.py
3+
title: autoware_adapi_v1_msgs/msg/MrmRequestList
4+
uses:
5+
- autoware_adapi_v1_msgs/msg/MrmRequest
6+
---
7+
8+
{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %}
9+
{% block definition %}
10+
11+
```txt
12+
builtin_interfaces/Time stamp
13+
autoware_adapi_v1_msgs/MrmRequest[] requests
14+
```
15+
16+
{% endblock %}

docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/ResponseStatus.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ used:
1212
- autoware_adapi_v1_msgs/srv/InitializeLocalization
1313
- autoware_adapi_v1_msgs/srv/ListManualControlMode
1414
- autoware_adapi_v1_msgs/srv/SelectManualControlMode
15+
- autoware_adapi_v1_msgs/srv/SendMrmRequest
1516
- autoware_adapi_v1_msgs/srv/SetCooperationCommands
1617
- autoware_adapi_v1_msgs/srv/SetCooperationPolicies
1718
- autoware_adapi_v1_msgs/srv/SetDoorCommand
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
# This file is generated by tools/autoware-interfaces/generate.py
3+
title: autoware_adapi_v1_msgs/srv/SendMrmRequest
4+
uses:
5+
- autoware_adapi_v1_msgs/msg/MrmRequest
6+
- autoware_adapi_v1_msgs/msg/ResponseStatus
7+
---
8+
9+
{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %}
10+
{% block definition %}
11+
12+
```txt
13+
autoware_adapi_v1_msgs/MrmRequest[] requests
14+
---
15+
autoware_adapi_v1_msgs/ResponseStatus status
16+
```
17+
18+
{% endblock %}

docs/design/autoware-interfaces/ad-api/types/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
- [autoware_adapi_v1_msgs/msg/ManualControlModeStatus](./autoware_adapi_v1_msgs/msg/ManualControlModeStatus.md)
2929
- [autoware_adapi_v1_msgs/msg/ManualOperatorHeartbeat](./autoware_adapi_v1_msgs/msg/ManualOperatorHeartbeat.md)
3030
- [autoware_adapi_v1_msgs/msg/MotionState](./autoware_adapi_v1_msgs/msg/MotionState.md)
31+
- [autoware_adapi_v1_msgs/msg/MrmRequest](./autoware_adapi_v1_msgs/msg/MrmRequest.md)
32+
- [autoware_adapi_v1_msgs/msg/MrmRequestList](./autoware_adapi_v1_msgs/msg/MrmRequestList.md)
3133
- [autoware_adapi_v1_msgs/msg/MrmState](./autoware_adapi_v1_msgs/msg/MrmState.md)
3234
- [autoware_adapi_v1_msgs/msg/ObjectClassification](./autoware_adapi_v1_msgs/msg/ObjectClassification.md)
3335
- [autoware_adapi_v1_msgs/msg/OperationModeState](./autoware_adapi_v1_msgs/msg/OperationModeState.md)
@@ -63,6 +65,7 @@
6365
- [autoware_adapi_v1_msgs/srv/InitializeLocalization](./autoware_adapi_v1_msgs/srv/InitializeLocalization.md)
6466
- [autoware_adapi_v1_msgs/srv/ListManualControlMode](./autoware_adapi_v1_msgs/srv/ListManualControlMode.md)
6567
- [autoware_adapi_v1_msgs/srv/SelectManualControlMode](./autoware_adapi_v1_msgs/srv/SelectManualControlMode.md)
68+
- [autoware_adapi_v1_msgs/srv/SendMrmRequest](./autoware_adapi_v1_msgs/srv/SendMrmRequest.md)
6669
- [autoware_adapi_v1_msgs/srv/SetCooperationCommands](./autoware_adapi_v1_msgs/srv/SetCooperationCommands.md)
6770
- [autoware_adapi_v1_msgs/srv/SetCooperationPolicies](./autoware_adapi_v1_msgs/srv/SetCooperationPolicies.md)
6871
- [autoware_adapi_v1_msgs/srv/SetDoorCommand](./autoware_adapi_v1_msgs/srv/SetDoorCommand.md)

yaml/autoware-interfaces.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ types:
116116
msg:
117117
stamp: builtin_interfaces/msg/Time
118118
state: uint16
119+
autoware_adapi_v1_msgs/msg/MrmRequest:
120+
msg:
121+
strategy: uint16
122+
user: string
123+
autoware_adapi_v1_msgs/msg/MrmRequestList:
124+
msg:
125+
requests: autoware_adapi_v1_msgs/msg/MrmRequest[]
126+
stamp: builtin_interfaces/msg/Time
119127
autoware_adapi_v1_msgs/msg/MrmState:
120128
msg:
121129
behavior: uint16
@@ -288,6 +296,11 @@ types:
288296
mode: autoware_adapi_v1_msgs/msg/ManualControlMode
289297
res:
290298
status: autoware_adapi_v1_msgs/msg/ResponseStatus
299+
autoware_adapi_v1_msgs/srv/SendMrmRequest:
300+
req:
301+
requests: autoware_adapi_v1_msgs/msg/MrmRequest[]
302+
res:
303+
status: autoware_adapi_v1_msgs/msg/ResponseStatus
291304
autoware_adapi_v1_msgs/srv/SetCooperationCommands:
292305
req:
293306
commands: autoware_adapi_v1_msgs/msg/CooperationCommand[]

0 commit comments

Comments
 (0)