Skip to content

Commit 996a654

Browse files
authored
feat(ad-api): add vehicle command and specs (#650)
* feat(ad-api): add vehicle command Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * add vehicle specs Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> --------- Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
1 parent 24520fa commit 996a654

File tree

12 files changed

+147
-0
lines changed

12 files changed

+147
-0
lines changed

docs/design/autoware-interfaces/ad-api/features/vehicle-status.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
- {{ link_ad_api('/api/vehicle/status') }}
77
- {{ link_ad_api('/api/vehicle/metrics') }}
88
- {{ link_ad_api('/api/vehicle/dimensions') }}
9+
- {{ link_ad_api('/api/vehicle/specs') }}
10+
- {{ link_ad_api('/api/vehicle/command/acceleration') }}
11+
- {{ link_ad_api('/api/vehicle/command/pedals') }}
12+
- {{ link_ad_api('/api/vehicle/command/steering') }}
13+
- {{ link_ad_api('/api/vehicle/command/velocity') }}
914

1015
## Kinematics
1116

@@ -25,3 +30,8 @@ The remaining energy can be used for vehicle dispatch scheduling.
2530
## Dimensions
2631

2732
The vehicle dimensions are used to know the actual distance between the vehicle and objects because the vehicle position in kinematics is the coordinates of the base link. This is necessary for visualization when supporting vehicles remotely.
33+
34+
## Commands
35+
36+
The vehicle commands are target values that Autoware is sending to the vehicle. Note that unlike vehicle status, this does not represent the actual vehicle status.
37+
Some commands may not be supported depending on the vehicle control method.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: /api/vehicle/command/acceleration
3+
status: not released
4+
method: realtime stream
5+
type:
6+
name: autoware_adapi_v1_msgs/msg/AccelerationCommand
7+
msg:
8+
- name: stamp
9+
text: Timestamp when this message was sent.
10+
- name: acceleration
11+
text: Target acceleration [m/s^2].
12+
---
13+
14+
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
15+
{% block description %}
16+
This is the target acceleration that Autoware is sending to the vehicle.
17+
{% endblock %}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: /api/vehicle/command/pedals
3+
status: not released
4+
method: realtime stream
5+
type:
6+
name: autoware_adapi_v1_msgs/msg/PedalsCommand
7+
msg:
8+
- name: stamp
9+
text: Timestamp when this message was sent.
10+
- name: accelerator
11+
text: Target accelerator pedal ratio.
12+
- name: brake
13+
text: Target brake pedal ratio.
14+
---
15+
16+
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
17+
{% block description %}
18+
This is the target pedals that Autoware is sending to the vehicle.
19+
The pedal value is the ratio with the maximum pedal depression being 1.0.
20+
This API is not supported if the vehicle is not controlled by pedals.
21+
{% endblock %}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: /api/vehicle/command/steering
3+
status: not released
4+
method: realtime stream
5+
type:
6+
name: autoware_adapi_v1_msgs/msg/SteeringCommand
7+
msg:
8+
- name: stamp
9+
text: Timestamp when this message was sent.
10+
- name: steering_tire_angle
11+
text: Target steering tire angle [rad].
12+
---
13+
14+
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
15+
{% block description %}
16+
This is the target steering that Autoware is sending to the vehicle.
17+
{% endblock %}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: /api/vehicle/command/velocity
3+
status: not released
4+
method: realtime stream
5+
type:
6+
name: autoware_adapi_v1_msgs/msg/VelocityCommand
7+
msg:
8+
- name: stamp
9+
text: Timestamp when this message was sent.
10+
- name: velocity
11+
text: Target velocity [m/s].
12+
---
13+
14+
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
15+
{% block description %}
16+
This is the target velocity that Autoware is sending to the vehicle.
17+
{% endblock %}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: /api/vehicle/specs
3+
status: not released
4+
method: function call
5+
type:
6+
name: autoware_adapi_v1_msgs/srv/GetVehicleSpecs
7+
res:
8+
- name: status
9+
text: response status
10+
- name: specs
11+
text: vehicle specifications
12+
---
13+
14+
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
15+
{% block description %}
16+
Get the vehicle specifications.
17+
{% endblock %}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,15 @@
5454
| [/api/system/diagnostics/status](./api/system/diagnostics/status.md) | v1.3.0 | realtime stream |
5555
| [/api/system/diagnostics/struct](./api/system/diagnostics/struct.md) | v1.3.0 | notification |
5656
| [/api/system/heartbeat](./api/system/heartbeat.md) | v1.3.0 | realtime stream |
57+
| [/api/vehicle/command/acceleration](./api/vehicle/command/acceleration.md) | not released | realtime stream |
58+
| [/api/vehicle/command/pedals](./api/vehicle/command/pedals.md) | not released | realtime stream |
59+
| [/api/vehicle/command/steering](./api/vehicle/command/steering.md) | not released | realtime stream |
60+
| [/api/vehicle/command/velocity](./api/vehicle/command/velocity.md) | not released | realtime stream |
5761
| [/api/vehicle/dimensions](./api/vehicle/dimensions.md) | v1.1.0 | function call |
5862
| [/api/vehicle/doors/command](./api/vehicle/doors/command.md) | v1.2.0 | function call |
5963
| [/api/vehicle/doors/layout](./api/vehicle/doors/layout.md) | v1.2.0 | function call |
6064
| [/api/vehicle/doors/status](./api/vehicle/doors/status.md) | v1.2.0 | notification |
6165
| [/api/vehicle/kinematics](./api/vehicle/kinematics.md) | v1.1.0 | realtime stream |
6266
| [/api/vehicle/metrics](./api/vehicle/metrics.md) | not released | reliable stream |
67+
| [/api/vehicle/specs](./api/vehicle/specs.md) | not released | function call |
6368
| [/api/vehicle/status](./api/vehicle/status.md) | v1.4.0 | realtime stream |

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
@@ -8,6 +8,7 @@ used:
88
- autoware_adapi_v1_msgs/srv/GetCooperationPolicies
99
- autoware_adapi_v1_msgs/srv/GetDoorLayout
1010
- autoware_adapi_v1_msgs/srv/GetVehicleDimensions
11+
- autoware_adapi_v1_msgs/srv/GetVehicleSpecs
1112
- autoware_adapi_v1_msgs/srv/InitializeLocalization
1213
- autoware_adapi_v1_msgs/srv/ListManualControlMode
1314
- autoware_adapi_v1_msgs/srv/SelectManualControlMode
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# This file is generated by tools/autoware-interfaces/generate.py
3+
title: autoware_adapi_v1_msgs/msg/VehicleSpecs
4+
used:
5+
- autoware_adapi_v1_msgs/srv/GetVehicleSpecs
6+
---
7+
8+
{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %}
9+
{% block definition %}
10+
11+
```txt
12+
float32 max_steering_tire_angle
13+
```
14+
15+
{% endblock %}
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/GetVehicleSpecs
4+
uses:
5+
- autoware_adapi_v1_msgs/msg/ResponseStatus
6+
- autoware_adapi_v1_msgs/msg/VehicleSpecs
7+
---
8+
9+
{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %}
10+
{% block definition %}
11+
12+
```txt
13+
---
14+
autoware_adapi_v1_msgs/ResponseStatus status
15+
autoware_adapi_v1_msgs/VehicleSpecs specs
16+
```
17+
18+
{% endblock %}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
- [autoware_adapi_v1_msgs/msg/VehicleDimensions](./autoware_adapi_v1_msgs/msg/VehicleDimensions.md)
4949
- [autoware_adapi_v1_msgs/msg/VehicleKinematics](./autoware_adapi_v1_msgs/msg/VehicleKinematics.md)
5050
- [autoware_adapi_v1_msgs/msg/VehicleMetrics](./autoware_adapi_v1_msgs/msg/VehicleMetrics.md)
51+
- [autoware_adapi_v1_msgs/msg/VehicleSpecs](./autoware_adapi_v1_msgs/msg/VehicleSpecs.md)
5152
- [autoware_adapi_v1_msgs/msg/VehicleStatus](./autoware_adapi_v1_msgs/msg/VehicleStatus.md)
5253
- [autoware_adapi_v1_msgs/msg/VelocityCommand](./autoware_adapi_v1_msgs/msg/VelocityCommand.md)
5354
- [autoware_adapi_v1_msgs/msg/VelocityFactor](./autoware_adapi_v1_msgs/msg/VelocityFactor.md)
@@ -58,6 +59,7 @@
5859
- [autoware_adapi_v1_msgs/srv/GetCooperationPolicies](./autoware_adapi_v1_msgs/srv/GetCooperationPolicies.md)
5960
- [autoware_adapi_v1_msgs/srv/GetDoorLayout](./autoware_adapi_v1_msgs/srv/GetDoorLayout.md)
6061
- [autoware_adapi_v1_msgs/srv/GetVehicleDimensions](./autoware_adapi_v1_msgs/srv/GetVehicleDimensions.md)
62+
- [autoware_adapi_v1_msgs/srv/GetVehicleSpecs](./autoware_adapi_v1_msgs/srv/GetVehicleSpecs.md)
6163
- [autoware_adapi_v1_msgs/srv/InitializeLocalization](./autoware_adapi_v1_msgs/srv/InitializeLocalization.md)
6264
- [autoware_adapi_v1_msgs/srv/ListManualControlMode](./autoware_adapi_v1_msgs/srv/ListManualControlMode.md)
6365
- [autoware_adapi_v1_msgs/srv/SelectManualControlMode](./autoware_adapi_v1_msgs/srv/SelectManualControlMode.md)

yaml/autoware-interfaces.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ types:
222222
msg:
223223
energy: float32
224224
stamp: builtin_interfaces/msg/Time
225+
autoware_adapi_v1_msgs/msg/VehicleSpecs:
226+
msg:
227+
max_steering_tire_angle: float32
225228
autoware_adapi_v1_msgs/msg/VehicleStatus:
226229
msg:
227230
gear: autoware_adapi_v1_msgs/msg/Gear
@@ -267,6 +270,10 @@ types:
267270
res:
268271
dimensions: autoware_adapi_v1_msgs/msg/VehicleDimensions
269272
status: autoware_adapi_v1_msgs/msg/ResponseStatus
273+
autoware_adapi_v1_msgs/srv/GetVehicleSpecs:
274+
res:
275+
specs: autoware_adapi_v1_msgs/msg/VehicleSpecs
276+
status: autoware_adapi_v1_msgs/msg/ResponseStatus
270277
autoware_adapi_v1_msgs/srv/InitializeLocalization:
271278
req:
272279
pose: geometry_msgs/msg/PoseWithCovarianceStamped[<=1]

0 commit comments

Comments
 (0)