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(autoware_v2x_msgs): add virtual gate messages #77

Merged
Merged
Show file tree
Hide file tree
Changes from 5 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
23 changes: 23 additions & 0 deletions autoware_v2x_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.14)
project(autoware_v2x_msgs)

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

rosidl_generate_interfaces(${PROJECT_NAME}
"msg/VirtualGateAreaCommand.msg"
"msg/VirtualGateAreaStatus.msg"
"msg/VirtualGateCommand.msg"
"msg/VirtualGateStatus.msg"
"msg/VirtualGateVehicleInfo.msg"
DEPENDENCIES
builtin_interfaces
geometry_msgs
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package()
27 changes: 27 additions & 0 deletions autoware_v2x_msgs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# autoware_v2x_msgs

## Virtual gate messages

### Overview

This message represents the status of the virtual gate for passing through the area managed by the facility.
The virtual gate treats area entry permission as a shared resource and controls vehicles by acquiring and releasing locks.
Each facility may support different protocols, but Autoware V2X component converts each protocol and this message.
This allows Autoware to handle facilities with different protocols with a unified message.

![virtual-gate-nodes](./doc/virtual-gate-nodes.drawio.svg)

### Sequence

Because there is a time lag before commands are reflected, the vehicle must wait until it receives the status of the same sequence as the command it sent.
Until the vehicle receives the status, treat it as if it were unlocked.

### Gates

Specify the entrance and exit gate IDs. This is used to check if vehicles can pass simultaneously when multiple routes are possible within an area.
If omitted, it is treated as a lock for the entire area.

### Vehicle ID

This message does not include the vehicle ID, so add it in the V2X component if required by the communication protocol.
And if facilities publish multiple vehicle statuses, filter to only status for own vehicle.
218 changes: 218 additions & 0 deletions autoware_v2x_msgs/doc/virtual-gate-nodes.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions autoware_v2x_msgs/msg/VirtualGateAreaCommand.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# constants for command
uint16 ACQUIRE = 1
uint16 RELEASE = 2

# variables for lock
uint16 command
uint16 sequence # Used to check correspondence with commands.
isamu-takagi marked this conversation as resolved.
Show resolved Hide resolved
string id # Target area ID.
isamu-takagi marked this conversation as resolved.
Show resolved Hide resolved
string[] gates # Entry and exit gate ID.
isamu-takagi marked this conversation as resolved.
Show resolved Hide resolved

# variables for scheduling
builtin_interfaces/Time[<=1] expected_time_arrival
14 changes: 14 additions & 0 deletions autoware_v2x_msgs/msg/VirtualGateAreaStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# constants for status
uint16 RESERVED = 1
uint16 ACQUIRED = 2
uint16 RELEASED = 3

# variables for lock
builtin_interfaces/Time stamp
uint16 status
uint16 sequence # Used to check correspondence with commands.
string id # Target area ID.
string[] gates # Entry and exit gate ID.
isamu-takagi marked this conversation as resolved.
Show resolved Hide resolved

# variables for scheduling
builtin_interfaces/Time[<=1] expected_time_arrival
3 changes: 3 additions & 0 deletions autoware_v2x_msgs/msg/VirtualGateCommand.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
builtin_interfaces/Time stamp
autoware_v2x_msgs/VirtualGateAreaCommand[] areas
autoware_v2x_msgs/VirtualGateVehicleInfo vehicle
isamu-takagi marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions autoware_v2x_msgs/msg/VirtualGateStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
autoware_v2x_msgs/VirtualGateAreaStatus[] areas
1 change: 1 addition & 0 deletions autoware_v2x_msgs/msg/VirtualGateVehicleInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
geometry_msgs/PoseStamped[<=1] pose
27 changes: 27 additions & 0 deletions autoware_v2x_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>autoware_v2x_msgs</name>
<version>1.0.0</version>
<description>Autoware common messages package.</description>
<maintainer email="[email protected]">Takagi, Isamu</maintainer>
isamu-takagi marked this conversation as resolved.
Show resolved Hide resolved
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>

<build_depend>rosidl_default_generators</build_depend>

<depend>builtin_interfaces</depend>
<depend>geometry_msgs</depend>

<exec_depend>rosidl_default_runtime</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
Loading