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

docs(ad-api): add use cases of vehicle status #381

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
aa7a988
init vehicle status
tkhmy Feb 1, 2023
ff87ccd
fix spelling error
tkhmy Feb 1, 2023
9cb6f97
remove old file
tkhmy Feb 1, 2023
b49ac5d
fix spelling error
tkhmy Feb 1, 2023
b1f628b
fix dead link
tkhmy Feb 1, 2023
b81dfe5
update vehicle message
tkhmy Feb 3, 2023
4f7ec5b
change vehicle motion
tkhmy Feb 3, 2023
d299da6
feat(ad-api): add vehicle information api
isamu-takagi Feb 3, 2023
5dbf292
fix msgs
tkhmy Feb 21, 2023
99db92d
update geo position
tkhmy Feb 21, 2023
5d86cc0
fix typo
tkhmy Feb 21, 2023
9f2e492
change naming
tkhmy Mar 1, 2023
25244d2
feat: add door group
isamu-takagi Mar 6, 2023
25ca936
update message
tkhmy Mar 6, 2023
8968f23
fix naming
tkhmy Mar 23, 2023
aeddb78
fix typo
tkhmy Mar 27, 2023
efbe198
update geographic_msgs
tkhmy Mar 28, 2023
610adb3
docs(ad-api): add use cases of vehicle status
isamu-takagi May 29, 2023
1810534
Merge branch 'main' into feat/vehicle-info-adapi
isamu-takagi May 29, 2023
9030fd3
feat: remove old files
isamu-takagi May 29, 2023
11e4c61
feat: use template
isamu-takagi May 29, 2023
3f24f8a
Merge branch 'main' into feat/adapi-vehicle-status-use-cases
isamu-takagi May 31, 2023
dcfbfd8
Merge branch 'feat/vehicle-info-adapi' into feat/adapi-vehicle-status…
isamu-takagi May 31, 2023
1b74f50
Merge branch 'feat/vehicle_status' into feat/adapi-vehicle-status-use…
isamu-takagi Jun 5, 2023
5e4f78d
apply template
isamu-takagi Jun 5, 2023
8b41eab
update message name
isamu-takagi Jun 5, 2023
b7dc039
update vehicle status feature
isamu-takagi Jun 5, 2023
10e7c81
fix link
isamu-takagi Jun 5, 2023
8caef62
update door layout
isamu-takagi Jun 9, 2023
fe59d9b
Merge branch 'main' into feat/adapi-vehicle-status-use-cases
isamu-takagi Jun 12, 2023
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Planning factors

!!! warning

Under Construction
28 changes: 28 additions & 0 deletions docs/design/autoware-interfaces/ad-api/features/vehicle-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Vehicle status

## Related API

- {{ link_ad_api('/api/vehicle/kinematics') }}
- {{ link_ad_api('/api/vehicle/status') }}
- {{ link_ad_api('/api/vehicle/dimensions') }}
- {{ link_ad_api('/api/vehicle/doors/layout') }}
- {{ link_ad_api('/api/vehicle/doors/status') }}

## Kinematics

This is an estimate of the vehicle kinematics. The vehicle position is necessary for applications to schedule dispatches.
Also, using velocity and acceleration, applications can find vehicles that need operator assistance, such as stuck or brake suddenly.

## Status

This is the status provided by the vehicle. The indicators and steering are mainly used for visualization and remote control.
The remaining energy can be also used for vehicle scheduling.

## Doors

This feature is available if the vehicle provides a software interface for the doors.
It can be used to create user interfaces for passengers or to control sequences at bus stops.

## Dimensions
mitsudome-r marked this conversation as resolved.
Show resolved Hide resolved

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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: /api/vehicle/dimensions
method: function call
type:
name: autoware_adapi_v1_msgs/srv/GetVehicleDimensions
res:
- name: status
text: response status
- name: dimensions
text: vehicle dimensions
---

{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
{% block description %}
Get the vehicle dimensions. See [here](../../../../components/vehicle-dimensions.md) for the definition of each value.
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: /api/vehicle/doors/layout
method: function call
type:
name: autoware_adapi_v1_msgs/srv/GetDoorLayout
res:
- name: status
text: response status
- name: doors.roles
text: The roles of the door in the service the vehicle provides.
- name: doors.description
text: The description of the door for display in the interface.
---

{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
{% block description %}
Get the door layout. It is an array of pose for each door. The array index corresponds to the door status.
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: /api/vehicle/doors/status
method: notification
type:
name: autoware_adapi_v1_msgs/msg/DoorStatusArray
msg:
- name: doors.status
text: current door status
---

{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
{% block description %}
Publish door status in array according to the door location information that received from vehicle info service.
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: /api/vehicle/kinematics
method: realtime stream
type:
name: autoware_adapi_v1_msgs/msg/VehicleKinematics
msg:
- name: geographic_pose
text: The longitude and latitude of the vehicle. If the map uses local coordinates, it will not be available.
- name: pose
text: The pose with covariance from the base link.
- name: twist
text: Vehicle current twist with covariance.
- name: accel
text: Vehicle current acceleration with covariance.
---

{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
{% block description %}
Publish vehicle kinematics.
{% endblock %}
22 changes: 22 additions & 0 deletions docs/design/autoware-interfaces/ad-api/list/api/vehicle/status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: /api/vehicle/status
method: notification
type:
name: autoware_adapi_v1_msgs/msg/VehicleStatus
msg:
- name: gear
text: Gear status.
- name: turn_indicators
text: Turn indicators status, only either left or right will be enabled.
- name: hazard_lights
text: Hazard lights status.
- name: steering_tire_angle
text: Vehicle current tire angle in radian.
- name: energy_percentage
text: Battery percentage or fuel percentage, it will depends on the vehicle.
---

{% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %}
{% block description %}
Publish vehicle state information.
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/DoorLayout
used:
- autoware_adapi_v1_msgs/srv/GetDoorLayout
---

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

```txt
uint8 GET_ON = 1
uint8 GET_OFF = 2
uint8[] roles
string description
```

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/DoorStatus
used:
- autoware_adapi_v1_msgs/msg/DoorStatusArray
---

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

```txt
# constants for door status
uint8 UNKNOWN = 0
uint8 NOT_AVAILABLE = 1
uint8 OPENED = 2
uint8 CLOSED = 3
uint8 OPENING = 4
uint8 CLOSING = 5

uint8 status
```

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/DoorStatusArray
uses:
- autoware_adapi_v1_msgs/msg/DoorStatus
---

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

```txt
builtin_interfaces/Time stamp
autoware_adapi_v1_msgs/DoorStatus[] doors
```

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/Gear
used:
- autoware_adapi_v1_msgs/msg/VehicleStatus
---

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

```txt
# constants
uint8 UNKNOWN = 0
uint8 NEUTRAL = 1
uint8 DRIVE = 2
uint8 REVERSE = 3
uint8 PARK = 4
uint8 LOW = 5

uint8 status
```

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/HazardLights
used:
- autoware_adapi_v1_msgs/msg/VehicleStatus
---

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

```txt
# constants
uint8 UNKNOWN = 0
uint8 DISABLE = 1
uint8 ENABLE = 2

uint8 status
```

{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ used:
- autoware_adapi_v1_msgs/srv/AcceptStart
- autoware_adapi_v1_msgs/srv/ChangeOperationMode
- autoware_adapi_v1_msgs/srv/ClearRoute
- autoware_adapi_v1_msgs/srv/GetDoorLayout
- autoware_adapi_v1_msgs/srv/GetVehicleDimensions
- autoware_adapi_v1_msgs/srv/InitializeLocalization
- autoware_adapi_v1_msgs/srv/SetRoute
- autoware_adapi_v1_msgs/srv/SetRoutePoints
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/TurnIndicators
used:
- autoware_adapi_v1_msgs/msg/VehicleStatus
---

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

```txt
# constants
uint8 UNKNOWN = 0
uint8 DISABLE = 1
uint8 LEFT = 2
uint8 RIGHT = 3

uint8 status
```

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/VehicleDimensions
used:
- autoware_adapi_v1_msgs/srv/GetVehicleDimensions
---

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

```txt
float32 wheel_radius
float32 wheel_width
float32 wheel_base
float32 wheel_tread
float32 front_overhang
float32 rear_overhang
float32 left_overhang
float32 right_overhang
float32 height
geometry_msgs/Polygon footprint
```

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/VehicleKinematics
---

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

```txt
# Geographic point, using the WGS 84 reference ellipsoid.
# Currently only support conversion from single MGRS Grid code or UTM
# If the vector map do not contain correct MGRS Grid code or UTM, this data will be not valid
geographic_msgs/GeoPointStamped geographic_pose

# Local coordinate from the autoware
geometry_msgs/PoseWithCovarianceStamped pose
geometry_msgs/TwistWithCovarianceStamped twist
geometry_msgs/AccelWithCovarianceStamped accel
```

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/msg/VehicleStatus
uses:
- autoware_adapi_v1_msgs/msg/Gear
- autoware_adapi_v1_msgs/msg/HazardLights
- autoware_adapi_v1_msgs/msg/TurnIndicators
---

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

```txt
builtin_interfaces/Time stamp
autoware_adapi_v1_msgs/Gear gear
autoware_adapi_v1_msgs/TurnIndicators turn_indicators
autoware_adapi_v1_msgs/HazardLights hazard_lights
float64 steering_tire_angle
float32 energy_percentage # Battery percentage or fuel percentage, it will depends on the vehicle.
```

{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ uint16 SIDEWALK = 13
uint16 LANE_CHANGE = 14
uint16 AVOIDANCE = 15
uint16 EMERGENCY_STOP_OPERATION = 16
uint16 NO_DRIVABLE_LANE = 17

# constants for status
uint16 APPROACHING = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/srv/GetDoorLayout
uses:
- autoware_adapi_v1_msgs/msg/DoorLayout
- autoware_adapi_v1_msgs/msg/ResponseStatus
---

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

```txt
---
autoware_adapi_v1_msgs/ResponseStatus status
autoware_adapi_v1_msgs/DoorLayout doors
```

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# This file is generated by tools/autoware-interfaces/generate.py
title: autoware_adapi_v1_msgs/srv/GetVehicleDimensions
uses:
- autoware_adapi_v1_msgs/msg/ResponseStatus
- autoware_adapi_v1_msgs/msg/VehicleDimensions
---

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

```txt
---
autoware_adapi_v1_msgs/ResponseStatus status
autoware_adapi_v1_msgs/VehicleDimensions dimensions
```

{% endblock %}
6 changes: 6 additions & 0 deletions docs/design/autoware-interfaces/ad-api/use-cases/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ Service providers can combine these use cases to define user stories and check i
- [Change the operation mode](change-operation-mode.md)
- [Drive to the designated position](drive-designated-position.md)
- [Get on and get off](get-on-off.md)
- [Vehicle monitoring](./vehicle-monitoring.md)
- [Request to cooperate](./request-to-cooperate.md)

## Features

- [Vehicle status](../features/vehicle-status.md)
Loading