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_internal_debug_msgs): add MultiArray msgs #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions autoware_internal_debug_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions autoware_internal_debug_msgs/msg/MultiArrayDimension.msg
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions autoware_internal_debug_msgs/msg/MultiArrayLayout.msg
Original file line number Diff line number Diff line change
@@ -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