Skip to content

Commit

Permalink
feat(adapi): add heartbeat api (autowarefoundation#536)
Browse files Browse the repository at this point in the history
* feat(ad-api): update planning factor types

Signed-off-by: Takagi, Isamu <[email protected]>

* feat(ad-api): add heartbeat api

Signed-off-by: Takagi, Isamu <[email protected]>

---------

Signed-off-by: Takagi, Isamu <[email protected]>
  • Loading branch information
isamu-takagi authored Apr 17, 2024
1 parent 749668a commit a1beccb
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/design/autoware-interfaces/ad-api/features/heartbeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Heartbeat

## Related API

- {{ link_ad_api('/api/system/heartbeat') }}

## Description

This API is used to check whether applications and Autoware are communicating properly.
The message contains timestamp and sequence number to check for communication delays, order, and losses.
2 changes: 2 additions & 0 deletions docs/design/autoware-interfaces/ad-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Service providers can combine these use cases to define user stories and check i
- [Get on and get off](./use-cases/get-on-off.md)
- [Vehicle monitoring](./use-cases/vehicle-monitoring.md)
- [Vehicle operation](./use-cases/vehicle-operation.md)
- [System monitoring](./use-cases/system-monitoring.md)

## Features

Expand All @@ -40,3 +41,4 @@ Service providers can combine these use cases to define user stories and check i
- [Vehicle status](./features/vehicle-status.md)
- [Vehicle doors](./features/vehicle-doors.md)
- [Cooperation](./features/cooperation.md)
- [Heartbeat](./features/heartbeat.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: /api/system/heartbeat
status: not released
method: realtime stream
type:
name: autoware_adapi_v1_msgs/msg/Heartbeat
msg:
- name: stamp
text: Timestamp in Autoware for delay checking.
- name: seq
text: Sequence number for order verification, wraps at 65535.
---

{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
{% block description %}
The heartbeat frequency is 10 Hz.
{% endblock %}
1 change: 1 addition & 0 deletions docs/design/autoware-interfaces/ad-api/list/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
| [/api/routing/set_route](./api/routing/set_route.md) | v1.0.0 |
| [/api/routing/set_route_points](./api/routing/set_route_points.md) | v1.0.0 |
| [/api/routing/state](./api/routing/state.md) | v1.0.0 |
| [/api/system/heartbeat](./api/system/heartbeat.md) | not released |
| [/api/vehicle/dimensions](./api/vehicle/dimensions.md) | v1.1.0 |
| [/api/vehicle/doors/command](./api/vehicle/doors/command.md) | v1.2.0 |
| [/api/vehicle/doors/layout](./api/vehicle/doors/layout.md) | v1.2.0 |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/Heartbeat
---

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

```txt
# Timestamp in Autoware for delay checking.
builtin_interfaces/Time stamp
# Sequence number for order verification, wraps at 65535.
uint16 seq
```

{% 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 @@ -14,6 +14,7 @@
- [autoware_adapi_v1_msgs/msg/DynamicObjectPath](./autoware_adapi_v1_msgs/msg/DynamicObjectPath.md)
- [autoware_adapi_v1_msgs/msg/Gear](./autoware_adapi_v1_msgs/msg/Gear.md)
- [autoware_adapi_v1_msgs/msg/HazardLights](./autoware_adapi_v1_msgs/msg/HazardLights.md)
- [autoware_adapi_v1_msgs/msg/Heartbeat](./autoware_adapi_v1_msgs/msg/Heartbeat.md)
- [autoware_adapi_v1_msgs/msg/LocalizationInitializationState](./autoware_adapi_v1_msgs/msg/LocalizationInitializationState.md)
- [autoware_adapi_v1_msgs/msg/MotionState](./autoware_adapi_v1_msgs/msg/MotionState.md)
- [autoware_adapi_v1_msgs/msg/MrmState](./autoware_adapi_v1_msgs/msg/MrmState.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# System monitoring

## Heartbeat

[Heartbeat](../features/heartbeat.md) is a reference for checking whether communication with Autoware is being performed properly.
4 changes: 4 additions & 0 deletions yaml/autoware-interfaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ types:
autoware_adapi_v1_msgs/msg/HazardLights:
msg:
status: uint8
autoware_adapi_v1_msgs/msg/Heartbeat:
msg:
seq: uint16
stamp: builtin_interfaces/msg/Time
autoware_adapi_v1_msgs/msg/LocalizationInitializationState:
msg:
stamp: builtin_interfaces/msg/Time
Expand Down

0 comments on commit a1beccb

Please sign in to comment.