From 684b748b60cec799c50bd323fdf0a37824f1bd1d Mon Sep 17 00:00:00 2001 From: vish0012 Date: Fri, 20 Dec 2024 13:41:08 +0900 Subject: [PATCH] feat(autoware_internal_debug_msgs): add MultiArray msgs Signed-off-by: vish0012 --- autoware_internal_debug_msgs/CMakeLists.txt | 2 ++ .../msg/MultiArrayDimension.msg | 11 ++++++ .../msg/MultiArrayLayout.msg | 34 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 autoware_internal_debug_msgs/msg/MultiArrayDimension.msg create mode 100644 autoware_internal_debug_msgs/msg/MultiArrayLayout.msg diff --git a/autoware_internal_debug_msgs/CMakeLists.txt b/autoware_internal_debug_msgs/CMakeLists.txt index 78b423e..3889dc0 100644 --- a/autoware_internal_debug_msgs/CMakeLists.txt +++ b/autoware_internal_debug_msgs/CMakeLists.txt @@ -15,6 +15,8 @@ set(msg_files "msg/Int64Stamped.msg" "msg/Int64MultiArrayStamped.msg" "msg/StringStamped.msg" + "msg/MultiArrayLayout.msg" + "msg/MultiArrayDimension.msg" ) set(msg_dependencies diff --git a/autoware_internal_debug_msgs/msg/MultiArrayDimension.msg b/autoware_internal_debug_msgs/msg/MultiArrayDimension.msg new file mode 100644 index 0000000..05bb4d8 --- /dev/null +++ b/autoware_internal_debug_msgs/msg/MultiArrayDimension.msg @@ -0,0 +1,11 @@ +# This is from ros2 common_interfaces. +# https://github.com/ros2/common_interfaces/blob/master/std_msgs/msg/MultiArrayDimension.msg + +# This was originally provided as an example message. +# It is deprecated as of Foxy +# It is recommended to create your own semantically meaningful message. +# However if you would like to continue using this please use the equivalent in example_msgs. + +string label # label of given dimension +uint32 size # size of given dimension (in type units) +uint32 stride # stride of given dimension diff --git a/autoware_internal_debug_msgs/msg/MultiArrayLayout.msg b/autoware_internal_debug_msgs/msg/MultiArrayLayout.msg new file mode 100644 index 0000000..b19a663 --- /dev/null +++ b/autoware_internal_debug_msgs/msg/MultiArrayLayout.msg @@ -0,0 +1,34 @@ +# This is from ros2 common_interfaces. +# https://github.com/ros2/common_interfaces/blob/master/std_msgs/msg/MultiArrayLayout.msg + +# This was originally provided as an example message. +# It is deprecated as of Foxy +# It is recommended to create your own semantically meaningful message. +# However if you would like to continue using this please use the equivalent in example_msgs. + +# The multiarray declares a generic multi-dimensional array of a +# particular data type. Dimensions are ordered from outer most +# to inner most. +# +# Accessors should ALWAYS be written in terms of dimension stride +# and specified outer-most dimension first. +# +# multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k] +# +# A standard, 3-channel 640x480 image with interleaved color channels +# would be specified as: +# +# dim[0].label = "height" +# dim[0].size = 480 +# dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image) +# dim[1].label = "width" +# dim[1].size = 640 +# dim[1].stride = 3*640 = 1920 +# dim[2].label = "channel" +# dim[2].size = 3 +# dim[2].stride = 3 +# +# multiarray(i,j,k) refers to the ith row, jth column, and kth channel. + +autoware_internal_debug_msgs/MultiArrayDimension[] dim # Array of dimension properties +uint32 data_offset # padding bytes at front of data