Skip to content

Commit 24520fa

Browse files
authored
feat(ad-api): add vehicle metrics (#651)
Signed-off-by: Takagi, Isamu <[email protected]>
1 parent 9fd1aaf commit 24520fa

File tree

6 files changed

+43
-2
lines changed

6 files changed

+43
-2
lines changed

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

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

55
- {{ link_ad_api('/api/vehicle/kinematics') }}
66
- {{ link_ad_api('/api/vehicle/status') }}
7+
- {{ link_ad_api('/api/vehicle/metrics') }}
78
- {{ link_ad_api('/api/vehicle/dimensions') }}
89

910
## Kinematics
@@ -13,8 +14,13 @@ Also, using velocity and acceleration, applications can find vehicles that need
1314

1415
## Status
1516

16-
This is the status provided by the vehicle. The indicators and steering are mainly used for visualization and remote control.
17-
The remaining energy can be also used for vehicle scheduling.
17+
This is the status provided by the vehicle, such as indicators and steering.
18+
These are mainly used for visualization and remote control.
19+
20+
## Metrics
21+
22+
This is metrics data provided by the vehicle, such as remaining energy
23+
The remaining energy can be used for vehicle dispatch scheduling.
1824

1925
## Dimensions
2026

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: /api/vehicle/metrics
3+
status: not released
4+
method: reliable stream
5+
type:
6+
name: autoware_adapi_v1_msgs/msg/VehicleMetrics
7+
msg:
8+
- name: energy
9+
text: The remaining vehicle fuel or battery. Ratio with the maximum as 1.0.
10+
---
11+
12+
{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
13+
{% block description %}
14+
Publish vehicle metrics.
15+
{% endblock %}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,5 @@
5959
| [/api/vehicle/doors/layout](./api/vehicle/doors/layout.md) | v1.2.0 | function call |
6060
| [/api/vehicle/doors/status](./api/vehicle/doors/status.md) | v1.2.0 | notification |
6161
| [/api/vehicle/kinematics](./api/vehicle/kinematics.md) | v1.1.0 | realtime stream |
62+
| [/api/vehicle/metrics](./api/vehicle/metrics.md) | not released | reliable stream |
6263
| [/api/vehicle/status](./api/vehicle/status.md) | v1.4.0 | realtime stream |
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
# This file is generated by tools/autoware-interfaces/generate.py
3+
title: autoware_adapi_v1_msgs/msg/VehicleMetrics
4+
---
5+
6+
{% extends 'design/autoware-interfaces/templates/autoware-data-type.jinja2' %}
7+
{% block definition %}
8+
9+
```txt
10+
builtin_interfaces/Time stamp
11+
float32 energy # The remaining vehicle fuel or battery. Ratio with the maximum as 1.0.
12+
```
13+
14+
{% endblock %}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
- [autoware_adapi_v1_msgs/msg/TurnIndicatorsCommand](./autoware_adapi_v1_msgs/msg/TurnIndicatorsCommand.md)
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)
50+
- [autoware_adapi_v1_msgs/msg/VehicleMetrics](./autoware_adapi_v1_msgs/msg/VehicleMetrics.md)
5051
- [autoware_adapi_v1_msgs/msg/VehicleStatus](./autoware_adapi_v1_msgs/msg/VehicleStatus.md)
5152
- [autoware_adapi_v1_msgs/msg/VelocityCommand](./autoware_adapi_v1_msgs/msg/VelocityCommand.md)
5253
- [autoware_adapi_v1_msgs/msg/VelocityFactor](./autoware_adapi_v1_msgs/msg/VelocityFactor.md)

yaml/autoware-interfaces.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ types:
218218
geographic_pose: geographic_msgs/msg/GeoPointStamped
219219
pose: geometry_msgs/msg/PoseWithCovarianceStamped
220220
twist: geometry_msgs/msg/TwistWithCovarianceStamped
221+
autoware_adapi_v1_msgs/msg/VehicleMetrics:
222+
msg:
223+
energy: float32
224+
stamp: builtin_interfaces/msg/Time
221225
autoware_adapi_v1_msgs/msg/VehicleStatus:
222226
msg:
223227
gear: autoware_adapi_v1_msgs/msg/Gear

0 commit comments

Comments
 (0)