forked from autowarefoundation/autoware-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ad-api): add door control (autowarefoundation#415)
* add door command Signed-off-by: Takagi, Isamu <[email protected]> * add release status Signed-off-by: Takagi, Isamu <[email protected]> * Update docs/design/autoware-interfaces/templates/autoware-interface.jinja2 * update message name Signed-off-by: Takagi, Isamu <[email protected]> * feat: update description Signed-off-by: Takagi, Isamu <[email protected]> --------- Signed-off-by: Takagi, Isamu <[email protected]> Co-authored-by: Ryohsuke Mitsudome <[email protected]> Signed-off-by: guiping meng <[email protected]>
- Loading branch information
Showing
14 changed files
with
113 additions
and
12 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
docs/design/autoware-interfaces/ad-api/features/vehicle-doors.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Vehicle doors | ||
|
||
## Related API | ||
|
||
- {{ link_ad_api('/api/vehicle/doors/layout') }} | ||
- {{ link_ad_api('/api/vehicle/doors/status') }} | ||
- {{ link_ad_api('/api/vehicle/doors/command') }} | ||
|
||
## Description | ||
|
||
This feature is available if the vehicle provides a software interface for the doors. | ||
It can be used to create user interfaces for passengers or to control sequences at bus stops. | ||
|
||
## Layout | ||
|
||
Each door in a vehicle is assigned an array index. This assignment is vehicle dependent. | ||
The layout API returns this information. | ||
The description field is a string to display in the user interface, etc. | ||
This is an arbitrary string and is not recommended to use for processing in applications. | ||
Use the roles field to know doors for getting on and off. | ||
Below is an example of the information returned by the layout API. | ||
|
||
| Index | Description | Roles | | ||
| ----- | ----------- | --------------- | | ||
| 0 | front right | - | | ||
| 1 | front left | GET_ON | | ||
| 2 | rear right | GET_OFF | | ||
| 3 | rear left | GET_ON, GET_OFF | | ||
|
||
## Status | ||
|
||
The status API provides an array of door status. This array order is consistent with the layout API. | ||
|
||
## Control | ||
|
||
Use the command API to control doors. | ||
Unlike the status and layout APIs, array index do not correspond to doors. | ||
The command has a field to specify the target door index. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
docs/design/autoware-interfaces/ad-api/list/api/vehicle/doors/command.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: /api/vehicle/doors/command | ||
status: not released | ||
method: function call | ||
type: | ||
name: autoware_adapi_v1_msgs/srv/SetDoorCommand | ||
req: | ||
- name: doors.index | ||
text: The index of the target door. | ||
- name: doors.command | ||
text: The command for the target door. | ||
res: | ||
- name: status | ||
text: response status | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Set the door command. This API is only available if the vehicle supports software door control. | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...sign/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/DoorCommand.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
# This file is generated by tools/autoware-interfaces/generate.py | ||
title: autoware_adapi_v1_msgs/msg/DoorCommand | ||
used: | ||
- autoware_adapi_v1_msgs/srv/SetDoorCommand | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %} | ||
{% block definition %} | ||
|
||
```txt | ||
uint8 OPEN = 1 | ||
uint8 CLOSE = 2 | ||
uint32 index | ||
uint8 command | ||
``` | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...n/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/srv/SetDoorCommand.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/SetDoorCommand | ||
uses: | ||
- autoware_adapi_v1_msgs/msg/DoorCommand | ||
- autoware_adapi_v1_msgs/msg/ResponseStatus | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %} | ||
{% block definition %} | ||
|
||
```txt | ||
autoware_adapi_v1_msgs/DoorCommand[] doors | ||
--- | ||
autoware_adapi_v1_msgs/ResponseStatus status | ||
``` | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters