diff --git a/autoware_v2x_msgs/CMakeLists.txt b/autoware_v2x_msgs/CMakeLists.txt new file mode 100644 index 0000000..ef156d0 --- /dev/null +++ b/autoware_v2x_msgs/CMakeLists.txt @@ -0,0 +1,22 @@ +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" + DEPENDENCIES + builtin_interfaces + geometry_msgs +) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() + +ament_auto_package() diff --git a/autoware_v2x_msgs/README.md b/autoware_v2x_msgs/README.md new file mode 100644 index 0000000..c3b6cce --- /dev/null +++ b/autoware_v2x_msgs/README.md @@ -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. diff --git a/autoware_v2x_msgs/doc/virtual-gate-nodes.drawio.svg b/autoware_v2x_msgs/doc/virtual-gate-nodes.drawio.svg new file mode 100644 index 0000000..5da8bcd --- /dev/null +++ b/autoware_v2x_msgs/doc/virtual-gate-nodes.drawio.svg @@ -0,0 +1,218 @@ + + + + + + + + + +
+
+
+ planning +
+ component +
+
+
+
+ + planning... + +
+
+ + + + +
+
+
+ v2x component +
+
+
+
+ + v2x component + +
+
+ + + + + + + + +
+
+
+ virtual gate command +
+
+
+
+ + virtual gate command + +
+
+ + + + + + +
+
+
+ virtual gate status +
+
+
+
+ + virtual gate status + +
+
+ + + + + + + + + + +
+
+
+ Area 1 +
+ (supports protocol A) +
+
+
+
+ + Area 1... + +
+
+ + + + +
+
+
+ Area 2 +
+ (supports protocol A) +
+
+
+
+ + Area 2... + +
+
+ + + + +
+
+
+ driver +
+ (for protocol A) +
+
+
+
+ + driver... + +
+
+ + + + +
+
+
+ driver +
+ (for protocol B) +
+
+
+
+ + driver... + +
+
+ + + + +
+
+
+ Area 3 +
+ (supports protocol B) +
+
+
+
+ + Area 3... + +
+
+ + + + + + + + + + + + + +
+
+
+ router +
+
+
+
+ + router + +
+
+
+ + + + + Text is not SVG - cannot display + + + +
\ No newline at end of file diff --git a/autoware_v2x_msgs/msg/VirtualGateAreaCommand.msg b/autoware_v2x_msgs/msg/VirtualGateAreaCommand.msg new file mode 100644 index 0000000..7b16144 --- /dev/null +++ b/autoware_v2x_msgs/msg/VirtualGateAreaCommand.msg @@ -0,0 +1,12 @@ +# constants for command +uint16 ACQUIRE = 1 +uint16 RELEASE = 2 + +# variables for lock +uint16 command +uint16 sequence_id # Used to check correspondence with status messages. +string area_id # Target area ID. +string[] gate_ids # Entry and exit gate ID. + +# variables for scheduling +builtin_interfaces/Time[<=1] expected_time_arrival diff --git a/autoware_v2x_msgs/msg/VirtualGateAreaStatus.msg b/autoware_v2x_msgs/msg/VirtualGateAreaStatus.msg new file mode 100644 index 0000000..4a75a1c --- /dev/null +++ b/autoware_v2x_msgs/msg/VirtualGateAreaStatus.msg @@ -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_id # Used to check correspondence with commands. +string area_id # Target area ID. +string[] gate_ids # Entry and exit gate ID. + +# variables for scheduling +builtin_interfaces/Time[<=1] expected_time_arrival diff --git a/autoware_v2x_msgs/msg/VirtualGateCommand.msg b/autoware_v2x_msgs/msg/VirtualGateCommand.msg new file mode 100644 index 0000000..e497847 --- /dev/null +++ b/autoware_v2x_msgs/msg/VirtualGateCommand.msg @@ -0,0 +1,2 @@ +builtin_interfaces/Time stamp +autoware_v2x_msgs/VirtualGateAreaCommand[] areas diff --git a/autoware_v2x_msgs/msg/VirtualGateStatus.msg b/autoware_v2x_msgs/msg/VirtualGateStatus.msg new file mode 100644 index 0000000..e20cf37 --- /dev/null +++ b/autoware_v2x_msgs/msg/VirtualGateStatus.msg @@ -0,0 +1 @@ +autoware_v2x_msgs/VirtualGateAreaStatus[] areas diff --git a/autoware_v2x_msgs/package.xml b/autoware_v2x_msgs/package.xml new file mode 100644 index 0000000..db58bf7 --- /dev/null +++ b/autoware_v2x_msgs/package.xml @@ -0,0 +1,29 @@ + + + + autoware_v2x_msgs + 1.0.0 + Autoware v2x messages package. + Takagi, Isamu + Ryohsuke Mitsudome + Yukihiro Saito + Apache License 2.0 + + ament_cmake_auto + + rosidl_default_generators + + builtin_interfaces + geometry_msgs + + rosidl_default_runtime + + ament_lint_auto + ament_lint_common + + rosidl_interface_packages + + + ament_cmake + +