Skip to content

Commit

Permalink
add velocity command
Browse files Browse the repository at this point in the history
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
  • Loading branch information
isamu-takagi committed Dec 5, 2024
1 parent f5b7138 commit 7f05988
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 9 deletions.
20 changes: 12 additions & 8 deletions docs/design/autoware-interfaces/ad-api/features/manual-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- {{ 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') }}
Expand All @@ -18,6 +19,7 @@
- {{ 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') }}
Expand All @@ -44,16 +46,18 @@ Since there are multiple ways to control a vehicle, such as pedals or accelerati
| 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 |
| --------------- | :------: | :---: | :----------: |
| pedal | - || - |
| acceleration | - | - ||
| steering | - |||
| gear | - |||
| turn_indicators | - |||
| hazard_lights | - |||
| Command | disabled | pedal | acceleration | velocity |
| --------------- | :------: | :---: | :----------: | :------: |
| pedal | - | X | - | - |
| acceleration | - | - | X | - |
| velocity | - | - | - | X |
| steering | - | X | X | X |
| gear | - | X | X | X |
| turn_indicators | - | X | X | X |
| hazard_lights | - | X | X | X |
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 %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: /api/remote/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 remote operation mode.
To use this API, select the corresponding mode as described in [manual control](../../../../features/manual-control.md).
{% endblock %}
2 changes: 2 additions & 0 deletions docs/design/autoware-interfaces/ad-api/list/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
| [/api/local/command/pedal](./api/local/command/pedal.md) | not released | realtime stream |
| [/api/local/command/steering](./api/local/command/steering.md) | not released | realtime stream |
| [/api/local/command/turn_indicators](./api/local/command/turn_indicators.md) | not released | notification |
| [/api/local/command/velocity](./api/local/command/velocity.md) | not released | realtime stream |
| [/api/local/control_mode/list](./api/local/control_mode/list.md) | not released | function call |
| [/api/local/control_mode/select](./api/local/control_mode/select.md) | not released | function call |
| [/api/local/control_mode/status](./api/local/control_mode/status.md) | not released | notification |
Expand Down Expand Up @@ -37,6 +38,7 @@
| [/api/remote/command/pedal](./api/remote/command/pedal.md) | not released | realtime stream |
| [/api/remote/command/steering](./api/remote/command/steering.md) | not released | realtime stream |
| [/api/remote/command/turn_indicators](./api/remote/command/turn_indicators.md) | not released | notification |
| [/api/remote/command/velocity](./api/remote/command/velocity.md) | not released | realtime stream |
| [/api/remote/control_mode/list](./api/remote/control_mode/list.md) | not released | function call |
| [/api/remote/control_mode/select](./api/remote/control_mode/select.md) | not released | function call |
| [/api/remote/control_mode/status](./api/remote/control_mode/status.md) | not released | notification |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ used:
uint8 DISABLED = 1
uint8 PEDAL = 2
uint8 ACCELERATION = 3
uint8 VELOCITY = 4
uint8 mode
```
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/VelocityCommand
---

{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %}
{% block definition %}

```txt
builtin_interfaces/Time stamp
float32 velocity
```

{% 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 @@ -47,6 +47,7 @@
- [autoware_adapi_v1_msgs/msg/VehicleDimensions](./autoware_adapi_v1_msgs/msg/VehicleDimensions.md)
- [autoware_adapi_v1_msgs/msg/VehicleKinematics](./autoware_adapi_v1_msgs/msg/VehicleKinematics.md)
- [autoware_adapi_v1_msgs/msg/VehicleStatus](./autoware_adapi_v1_msgs/msg/VehicleStatus.md)
- [autoware_adapi_v1_msgs/msg/VelocityCommand](./autoware_adapi_v1_msgs/msg/VelocityCommand.md)
- [autoware_adapi_v1_msgs/msg/VelocityFactor](./autoware_adapi_v1_msgs/msg/VelocityFactor.md)
- [autoware_adapi_v1_msgs/msg/VelocityFactorArray](./autoware_adapi_v1_msgs/msg/VelocityFactorArray.md)
- [autoware_adapi_v1_msgs/srv/AcceptStart](./autoware_adapi_v1_msgs/srv/AcceptStart.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ To operate a vehicle without a steering wheel or steering wheel, or to develop a

- The vehicle can transition to a safe state when a communication problem occurs.
- Supports the following commands and statuses.
- Pedal or acceleration as longitudinal control
- Pedal, acceleration or velocity as longitudinal control
- Steering tire angle as lateral control
- Gear
- Turn indicators
Expand Down
4 changes: 4 additions & 0 deletions yaml/autoware-interfaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ types:
stamp: builtin_interfaces/msg/Time
steering_tire_angle: float64
turn_indicators: autoware_adapi_v1_msgs/msg/TurnIndicators
autoware_adapi_v1_msgs/msg/VelocityCommand:
msg:
stamp: builtin_interfaces/msg/Time
velocity: float32
autoware_adapi_v1_msgs/msg/VelocityFactor:
msg:
behavior: string
Expand Down

0 comments on commit 7f05988

Please sign in to comment.