From 7cd80335ad1a4edc1955de5062dd5a4bd9d4de7b Mon Sep 17 00:00:00 2001 From: Kah Hooi Tan <41041286+tkhmy@users.noreply.github.com> Date: Fri, 16 Jun 2023 15:14:05 +0900 Subject: [PATCH] feat(autoware_adapi_v1_msgs): add vehicle status msgs (#24) * add vehicle status msgs Signed-off-by: tkhmy * simplify door msg Signed-off-by: tkhmy * add vehicle state Signed-off-by: tkhmy * change vehicle motion Signed-off-by: tkhmy * clean up Signed-off-by: tkhmy * fix typo Signed-off-by: tkhmy * change geo position to array and remove GeoPosition msg Signed-off-by: tkhmy * update msgs Signed-off-by: tkhmy * update msgs Signed-off-by: tkhmy * update naming Signed-off-by: tkhmy * add none Signed-off-by: tkhmy * update msg Signed-off-by: tkhmy * fix naming Signed-off-by: tkhmy * fix typo Signed-off-by: tkhmy * change naming Signed-off-by: tkhmy * update geopoint to use geographic_msgs Signed-off-by: tkhmy * add commend document Signed-off-by: tkhmy * update message Signed-off-by: tkhmy * Update autoware_adapi_v1_msgs/vehicle/msg/Kinematic.msg Fix speelling Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com> * update message name Signed-off-by: Takagi, Isamu * update door layout Signed-off-by: Takagi, Isamu * Update autoware_adapi_v1_msgs/vehicle/msg/VehicleKinematics.msg Update commend in VehicleKinematics Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com> * style(pre-commit): autofix --------- Signed-off-by: tkhmy Signed-off-by: Takagi, Isamu Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com> Co-authored-by: Takagi, Isamu Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- autoware_adapi_v1_msgs/CMakeLists.txt | 8 ++++++++ autoware_adapi_v1_msgs/package.xml | 1 + autoware_adapi_v1_msgs/vehicle/msg/DoorLayout.msg | 2 +- autoware_adapi_v1_msgs/vehicle/msg/DoorStatus.msg | 9 +++++++++ autoware_adapi_v1_msgs/vehicle/msg/DoorStatusArray.msg | 2 ++ autoware_adapi_v1_msgs/vehicle/msg/Gear.msg | 9 +++++++++ autoware_adapi_v1_msgs/vehicle/msg/HazardLights.msg | 6 ++++++ autoware_adapi_v1_msgs/vehicle/msg/TurnIndicators.msg | 7 +++++++ autoware_adapi_v1_msgs/vehicle/msg/VehicleKinematics.msg | 8 ++++++++ autoware_adapi_v1_msgs/vehicle/msg/VehicleStatus.msg | 6 ++++++ 10 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 autoware_adapi_v1_msgs/vehicle/msg/DoorStatus.msg create mode 100644 autoware_adapi_v1_msgs/vehicle/msg/DoorStatusArray.msg create mode 100644 autoware_adapi_v1_msgs/vehicle/msg/Gear.msg create mode 100644 autoware_adapi_v1_msgs/vehicle/msg/HazardLights.msg create mode 100644 autoware_adapi_v1_msgs/vehicle/msg/TurnIndicators.msg create mode 100644 autoware_adapi_v1_msgs/vehicle/msg/VehicleKinematics.msg create mode 100644 autoware_adapi_v1_msgs/vehicle/msg/VehicleStatus.msg diff --git a/autoware_adapi_v1_msgs/CMakeLists.txt b/autoware_adapi_v1_msgs/CMakeLists.txt index f44c3e4..1645502 100644 --- a/autoware_adapi_v1_msgs/CMakeLists.txt +++ b/autoware_adapi_v1_msgs/CMakeLists.txt @@ -32,12 +32,20 @@ rosidl_generate_interfaces(${PROJECT_NAME} planning/msg/VelocityFactorArray.msg system/msg/MrmState.msg vehicle/msg/DoorLayout.msg + vehicle/msg/DoorStatus.msg + vehicle/msg/DoorStatusArray.msg + vehicle/msg/Gear.msg + vehicle/msg/HazardLights.msg + vehicle/msg/TurnIndicators.msg + vehicle/msg/VehicleStatus.msg vehicle/msg/VehicleDimensions.msg + vehicle/msg/VehicleKinematics.msg vehicle/srv/GetDoorLayout.srv vehicle/srv/GetVehicleDimensions.srv DEPENDENCIES builtin_interfaces std_msgs + geographic_msgs geometry_msgs shape_msgs unique_identifier_msgs diff --git a/autoware_adapi_v1_msgs/package.xml b/autoware_adapi_v1_msgs/package.xml index ae6609d..6932080 100644 --- a/autoware_adapi_v1_msgs/package.xml +++ b/autoware_adapi_v1_msgs/package.xml @@ -12,6 +12,7 @@ rosidl_default_generators builtin_interfaces + geographic_msgs geometry_msgs shape_msgs std_msgs diff --git a/autoware_adapi_v1_msgs/vehicle/msg/DoorLayout.msg b/autoware_adapi_v1_msgs/vehicle/msg/DoorLayout.msg index 9887adf..828d978 100644 --- a/autoware_adapi_v1_msgs/vehicle/msg/DoorLayout.msg +++ b/autoware_adapi_v1_msgs/vehicle/msg/DoorLayout.msg @@ -2,4 +2,4 @@ uint8 GET_ON = 1 uint8 GET_OFF = 2 uint8[] roles -geometry_msgs/Pose pose +string description diff --git a/autoware_adapi_v1_msgs/vehicle/msg/DoorStatus.msg b/autoware_adapi_v1_msgs/vehicle/msg/DoorStatus.msg new file mode 100644 index 0000000..fcb2ad9 --- /dev/null +++ b/autoware_adapi_v1_msgs/vehicle/msg/DoorStatus.msg @@ -0,0 +1,9 @@ +# 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 diff --git a/autoware_adapi_v1_msgs/vehicle/msg/DoorStatusArray.msg b/autoware_adapi_v1_msgs/vehicle/msg/DoorStatusArray.msg new file mode 100644 index 0000000..a0c2b94 --- /dev/null +++ b/autoware_adapi_v1_msgs/vehicle/msg/DoorStatusArray.msg @@ -0,0 +1,2 @@ +builtin_interfaces/Time stamp +autoware_adapi_v1_msgs/DoorStatus[] doors diff --git a/autoware_adapi_v1_msgs/vehicle/msg/Gear.msg b/autoware_adapi_v1_msgs/vehicle/msg/Gear.msg new file mode 100644 index 0000000..09e1041 --- /dev/null +++ b/autoware_adapi_v1_msgs/vehicle/msg/Gear.msg @@ -0,0 +1,9 @@ +# constants +uint8 UNKNOWN = 0 +uint8 NEUTRAL = 1 +uint8 DRIVE = 2 +uint8 REVERSE = 3 +uint8 PARK = 4 +uint8 LOW = 5 + +uint8 status diff --git a/autoware_adapi_v1_msgs/vehicle/msg/HazardLights.msg b/autoware_adapi_v1_msgs/vehicle/msg/HazardLights.msg new file mode 100644 index 0000000..ca9cc2a --- /dev/null +++ b/autoware_adapi_v1_msgs/vehicle/msg/HazardLights.msg @@ -0,0 +1,6 @@ +# constants +uint8 UNKNOWN = 0 +uint8 DISABLE = 1 +uint8 ENABLE = 2 + +uint8 status diff --git a/autoware_adapi_v1_msgs/vehicle/msg/TurnIndicators.msg b/autoware_adapi_v1_msgs/vehicle/msg/TurnIndicators.msg new file mode 100644 index 0000000..e51859f --- /dev/null +++ b/autoware_adapi_v1_msgs/vehicle/msg/TurnIndicators.msg @@ -0,0 +1,7 @@ +# constants +uint8 UNKNOWN = 0 +uint8 DISABLE = 1 +uint8 LEFT = 2 +uint8 RIGHT = 3 + +uint8 status diff --git a/autoware_adapi_v1_msgs/vehicle/msg/VehicleKinematics.msg b/autoware_adapi_v1_msgs/vehicle/msg/VehicleKinematics.msg new file mode 100644 index 0000000..4c06560 --- /dev/null +++ b/autoware_adapi_v1_msgs/vehicle/msg/VehicleKinematics.msg @@ -0,0 +1,8 @@ +# Geographic point, using the WGS 84 reference ellipsoid. +# This data will be invalid If Autoware does not provide projection information between geographic coordinates and local coordinates. +geographic_msgs/GeoPointStamped geographic_pose + +# Local coordinate from the autoware +geometry_msgs/PoseWithCovarianceStamped pose +geometry_msgs/TwistWithCovarianceStamped twist +geometry_msgs/AccelWithCovarianceStamped accel diff --git a/autoware_adapi_v1_msgs/vehicle/msg/VehicleStatus.msg b/autoware_adapi_v1_msgs/vehicle/msg/VehicleStatus.msg new file mode 100644 index 0000000..4f89f61 --- /dev/null +++ b/autoware_adapi_v1_msgs/vehicle/msg/VehicleStatus.msg @@ -0,0 +1,6 @@ +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.