Skip to content

Commit 6f4f478

Browse files
authored
feat(autoware_v2x_msgs): add virtual gate messages (#77)
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
1 parent a51a5d8 commit 6f4f478

8 files changed

+325
-0
lines changed

autoware_v2x_msgs/CMakeLists.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
project(autoware_v2x_msgs)
3+
4+
find_package(ament_cmake_auto REQUIRED)
5+
ament_auto_find_build_dependencies()
6+
7+
rosidl_generate_interfaces(${PROJECT_NAME}
8+
"msg/VirtualGateAreaCommand.msg"
9+
"msg/VirtualGateAreaStatus.msg"
10+
"msg/VirtualGateCommand.msg"
11+
"msg/VirtualGateStatus.msg"
12+
DEPENDENCIES
13+
builtin_interfaces
14+
geometry_msgs
15+
)
16+
17+
if(BUILD_TESTING)
18+
find_package(ament_lint_auto REQUIRED)
19+
ament_lint_auto_find_test_dependencies()
20+
endif()
21+
22+
ament_auto_package()

autoware_v2x_msgs/README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# autoware_v2x_msgs
2+
3+
## Virtual gate messages
4+
5+
### Overview
6+
7+
This message represents the status of the virtual gate for passing through the area managed by the facility.
8+
The virtual gate treats area entry permission as a shared resource and controls vehicles by acquiring and releasing locks.
9+
Each facility may support different protocols, but Autoware V2X component converts each protocol and this message.
10+
This allows Autoware to handle facilities with different protocols with a unified message.
11+
12+
![virtual-gate-nodes](./doc/virtual-gate-nodes.drawio.svg)
13+
14+
### Sequence
15+
16+
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.
17+
Until the vehicle receives the status, treat it as if it were unlocked.
18+
19+
### Gates
20+
21+
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.
22+
If omitted, it is treated as a lock for the entire area.
23+
24+
### Vehicle ID
25+
26+
This message does not include the vehicle ID, so add it in the V2X component if required by the communication protocol.
27+
And if facilities publish multiple vehicle statuses, filter to only status for own vehicle.

autoware_v2x_msgs/doc/virtual-gate-nodes.drawio.svg

+218
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# constants for command
2+
uint16 ACQUIRE = 1
3+
uint16 RELEASE = 2
4+
5+
# variables for lock
6+
uint16 command
7+
uint16 sequence_id # Used to check correspondence with status messages.
8+
string area_id # Target area ID.
9+
string[] gate_ids # Entry and exit gate ID.
10+
11+
# variables for scheduling
12+
builtin_interfaces/Time[<=1] expected_time_arrival
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# constants for status
2+
uint16 RESERVED = 1
3+
uint16 ACQUIRED = 2
4+
uint16 RELEASED = 3
5+
6+
# variables for lock
7+
builtin_interfaces/Time stamp
8+
uint16 status
9+
uint16 sequence_id # Used to check correspondence with commands.
10+
string area_id # Target area ID.
11+
string[] gate_ids # Entry and exit gate ID.
12+
13+
# variables for scheduling
14+
builtin_interfaces/Time[<=1] expected_time_arrival
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
builtin_interfaces/Time stamp
2+
autoware_v2x_msgs/VirtualGateAreaCommand[] areas
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
autoware_v2x_msgs/VirtualGateAreaStatus[] areas

autoware_v2x_msgs/package.xml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>autoware_v2x_msgs</name>
5+
<version>1.0.0</version>
6+
<description>Autoware v2x messages package.</description>
7+
<maintainer email="isamu.takagi@tier4.jp">Takagi, Isamu</maintainer>
8+
<maintainer email="ryohsuke.mitsudome@tier4.jp">Ryohsuke Mitsudome</maintainer>
9+
<maintainer email="yukihiro.saito@tier4.jp">Yukihiro Saito</maintainer>
10+
<license>Apache License 2.0</license>
11+
12+
<buildtool_depend>ament_cmake_auto</buildtool_depend>
13+
14+
<build_depend>rosidl_default_generators</build_depend>
15+
16+
<depend>builtin_interfaces</depend>
17+
<depend>geometry_msgs</depend>
18+
19+
<exec_depend>rosidl_default_runtime</exec_depend>
20+
21+
<test_depend>ament_lint_auto</test_depend>
22+
<test_depend>ament_lint_common</test_depend>
23+
24+
<member_of_group>rosidl_interface_packages</member_of_group>
25+
26+
<export>
27+
<build_type>ament_cmake</build_type>
28+
</export>
29+
</package>

0 commit comments

Comments
 (0)