Skip to content
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(adapi): add heartbeat api #536

Merged
merged 3 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading