-
Notifications
You must be signed in to change notification settings - Fork 145
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
feat(ad-api): manual control #631
Open
isamu-takagi
wants to merge
11
commits into
autowarefoundation:main
Choose a base branch
from
isamu-takagi:feat/manual-control
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
49bac1c
add api pages
isamu-takagi f107180
add feature page
isamu-takagi c2f54cb
add local command and control mode
isamu-takagi 0283529
add api description
isamu-takagi ff174c7
update description
isamu-takagi 2f143dd
add operator status
isamu-takagi 2ba8376
fix
isamu-takagi 4325f39
fix typo
isamu-takagi f5b7138
Merge branch 'main' into feat/manual-control
isamu-takagi 7f05988
add velocity command
isamu-takagi 7bb2cc2
use check mark
isamu-takagi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
docs/design/autoware-interfaces/ad-api/features/manual-control.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,63 @@ | ||
# Manual control | ||
|
||
## Related API | ||
|
||
- {{ link_ad_api('/api/remote/control_mode/list') }} | ||
- {{ link_ad_api('/api/remote/control_mode/select') }} | ||
- {{ link_ad_api('/api/remote/control_mode/status') }} | ||
- {{ link_ad_api('/api/remote/operator/status') }} | ||
- {{ link_ad_api('/api/remote/command/pedal') }} | ||
- {{ link_ad_api('/api/remote/command/acceleration') }} | ||
- {{ link_ad_api('/api/remote/command/velocity') }} | ||
- {{ link_ad_api('/api/remote/command/steering') }} | ||
- {{ link_ad_api('/api/remote/command/gear') }} | ||
- {{ link_ad_api('/api/remote/command/turn_indicators') }} | ||
- {{ link_ad_api('/api/remote/command/hazard_lights') }} | ||
- {{ link_ad_api('/api/local/control_mode/list') }} | ||
- {{ link_ad_api('/api/local/control_mode/select') }} | ||
- {{ link_ad_api('/api/local/control_mode/status') }} | ||
- {{ link_ad_api('/api/local/operator/status') }} | ||
- {{ link_ad_api('/api/local/command/pedal') }} | ||
- {{ link_ad_api('/api/local/command/acceleration') }} | ||
- {{ link_ad_api('/api/local/command/velocity') }} | ||
- {{ link_ad_api('/api/local/command/steering') }} | ||
- {{ link_ad_api('/api/local/command/gear') }} | ||
- {{ link_ad_api('/api/local/command/turn_indicators') }} | ||
- {{ link_ad_api('/api/local/command/hazard_lights') }} | ||
|
||
## Description | ||
|
||
This API is used to manually control the vehicle, and provides the same interface for different operators: remote and local. | ||
For example, the local operator controls a vehicle without a driver's seat using a joystick, while the remote operator provides remote support when problems occur with autonomous driving. | ||
The command sent will be used when [operation mode](./operation_mode.md) is remote or local. | ||
|
||
## Operator status | ||
|
||
The application needs to determine whether the operator is able to drive and send that information via the operator status API. | ||
If the operator is unable to continue driving during manual operation, Autoware will perform MRM to bring the vehicle to a safe state. | ||
For level 3 and below, the operator status is referenced even during autonomous driving. | ||
|
||
## Control mode | ||
|
||
Since there are multiple ways to control a vehicle, such as pedals or acceleration, the application must first select a control mode. | ||
|
||
| Mode | Description | | ||
| ------------ | -------------------------------------------------------------------------- | | ||
| disabled | This is the initial mode. When selected, all command APIs are unavailable. | | ||
| pedal | This mode provides longitudinal control using the pedals. | | ||
| acceleration | This mode provides longitudinal control using the target acceleration. | | ||
| velocity | This mode provides longitudinal control using the target velocity. | | ||
|
||
## Commands | ||
|
||
The commands available in each mode are as follows. | ||
|
||
| Command | disabled | pedal | acceleration | velocity | | ||
| --------------- | :------: | :-----: | :----------: | :------: | | ||
| pedal | - | ✓ | - | - | | ||
| acceleration | - | - | ✓ | - | | ||
| velocity | - | - | - | ✓ | | ||
| steering | - | ✓ | ✓ | ✓ | | ||
| gear | - | ✓ | ✓ | ✓ | | ||
| turn_indicators | - | ✓ | ✓ | ✓ | | ||
| hazard_lights | - | ✓ | ✓ | ✓ | |
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
docs/design/autoware-interfaces/ad-api/list/api/local/command/acceleration.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 @@ | ||
--- | ||
title: /api/local/command/acceleration | ||
status: not released | ||
method: realtime stream | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/AccelerationCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: acceleration | ||
text: Target acceleration [m/s^2]. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Sends acceleration command used in local operation mode. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/local/command/gear.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 @@ | ||
--- | ||
title: /api/local/command/gear | ||
status: not released | ||
method: notification | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/GearCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: command | ||
text: Target gear status. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Sends gear command used in local operation mode. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/local/command/hazard_lights.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 @@ | ||
--- | ||
title: /api/local/command/hazard_lights | ||
status: not released | ||
method: notification | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/HazardLightsCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: command | ||
text: Target hazard lights status. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Sends hazard lights command used in local operation mode. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
20 changes: 20 additions & 0 deletions
20
docs/design/autoware-interfaces/ad-api/list/api/local/command/pedal.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/local/command/pedal | ||
status: not released | ||
method: realtime stream | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/PedalCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: accelerator | ||
text: Target accelerator pedal ratio. | ||
- name: brake | ||
text: Target brake pedal ratio. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Sends pedal command used in local operation mode. The pedal value is the ratio with the maximum pedal depression being 1.0. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/local/command/steering.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 @@ | ||
--- | ||
title: /api/local/command/steering | ||
status: not released | ||
method: realtime stream | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/SteeringCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: steering_tire_angle | ||
text: Target steering tire angle [rad]. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Send steering command to this API. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/local/command/turn_indicators.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 @@ | ||
--- | ||
title: /api/local/command/turn_indicators | ||
status: not released | ||
method: notification | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/TurnIndicatorsCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: command | ||
text: Target turn indicators status. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Sends turn indicators command used in local operation mode. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/local/command/velocity.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 @@ | ||
--- | ||
title: /api/local/command/velocity | ||
status: not released | ||
method: realtime stream | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/VelocityCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: velocity | ||
text: Target velocity [m/s]. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Sends velocity command used in local operation mode. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/local/control_mode/list.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 @@ | ||
--- | ||
title: /api/local/control_mode/list | ||
status: not released | ||
method: function call | ||
type: | ||
name: autoware_adapi_v1_msgs/srv/ListManualControlMode | ||
res: | ||
- name: status | ||
text: response status | ||
- name: modes | ||
text: List of available modes. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
List the available manual control modes as described in [manual control](../../../../features/manual-control.md). | ||
The disabled mode is not included in the available modes. | ||
{% endblock %} |
19 changes: 19 additions & 0 deletions
19
docs/design/autoware-interfaces/ad-api/list/api/local/control_mode/select.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 @@ | ||
--- | ||
title: /api/local/control_mode/select | ||
status: not released | ||
method: function call | ||
type: | ||
name: autoware_adapi_v1_msgs/srv/SelectManualControlMode | ||
req: | ||
- name: mode | ||
text: The manual control mode to be used. | ||
res: | ||
- name: status | ||
text: response status | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Selects the manual control mode as described in [manual control](../../../../features/manual-control.md). | ||
This API fails while [operation mode](../../../../features/operation_mode.md) is local. | ||
{% endblock %} |
15 changes: 15 additions & 0 deletions
15
docs/design/autoware-interfaces/ad-api/list/api/local/control_mode/status.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,15 @@ | ||
--- | ||
title: /api/local/control_mode/status | ||
status: not released | ||
method: notification | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/ManualControlModeStatus | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Get the current manual operation mode. | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/local/operator/status.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 @@ | ||
--- | ||
title: /api/local/operator/status | ||
status: not released | ||
method: realtime stream | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/ManualOperatorStatus | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: ready | ||
text: Whether the operator is able to continue driving. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
The application needs to determine whether the operator is able to drive and send that information via this API. | ||
For details, see the [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/remote/command/acceleration.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 @@ | ||
--- | ||
title: /api/remote/command/acceleration | ||
status: not released | ||
method: realtime stream | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/AccelerationCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: acceleration | ||
text: Target acceleration [m/s^2]. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Sends acceleration command used in remote operation mode. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/remote/command/gear.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 @@ | ||
--- | ||
title: /api/remote/command/gear | ||
status: not released | ||
method: notification | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/GearCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: command | ||
text: Target gear status. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Sends gear command used in remote operation mode. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/remote/command/hazard_lights.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 @@ | ||
--- | ||
title: /api/remote/command/hazard_lights | ||
status: not released | ||
method: notification | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/HazardLightsCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: command | ||
text: Target hazard lights status. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Sends hazard lights command used in remote operation mode. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
20 changes: 20 additions & 0 deletions
20
docs/design/autoware-interfaces/ad-api/list/api/remote/command/pedal.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/remote/command/pedal | ||
status: not released | ||
method: realtime stream | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/PedalCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: accelerator | ||
text: Target accelerator pedal ratio. | ||
- name: brake | ||
text: Target brake pedal ratio. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Sends pedal command used in remote operation mode. The pedal value is the ratio with the maximum pedal depression being 1.0. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
docs/design/autoware-interfaces/ad-api/list/api/remote/command/steering.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 @@ | ||
--- | ||
title: /api/remote/command/steering | ||
status: not released | ||
method: realtime stream | ||
type: | ||
name: autoware_adapi_v1_msgs/msg/SteeringCommand | ||
msg: | ||
- name: stamp | ||
text: Timestamp when this message was sent. | ||
- name: steering_tire_angle | ||
text: Target steering tire angle [rad]. | ||
--- | ||
|
||
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} | ||
{% block description %} | ||
Send steering command to this API. | ||
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md). | ||
{% endblock %} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the user tries to select a mode (e.g., acceleration) and if that mode isn't supported from by the vehicle. Would the API just return the fail as a response status?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if the control mode is not supported, the select API will fail and the command APIs will not be enabled.