How is a std_msgs/msg/ByteMultiArray message published via CLI?
I can see how a std_msgs/msg/Byte message is published via CLI, in fact, there are two ways to do this. (see https://answers.ros.org/question/3752...)
And I know how other MultiArray messages are published via CLI. (see https://answers.ros.org/question/1890...)
But how do you do that for a std_msgs/msg/ByteMultiArray? I have tried:
bash
ros2 topic pub -1 /whatever std_msgs/msg/ByteMultiArray "{data: [{3}, {4}]}"
and
bash
ros2 topic pub -1 /whatever std_msgs/msg/ByteMultiArray "{data: [0x03, 0x04]}"
But both comes back with:
Failed to populate field: The 'data' field must be a set or sequence and each value of type 'bytes'
Other info: - Ubuntu 20 - galactic
Trying all the usual patterns I could think of, I similarly wasn't able to get this to work from the CLI, so perhaps its a bug, and it may merit a Github issue (or perhaps I wasn't creative enough with my syntax).
As an aside, please note the deprecation warning:
I am using
std_msgs/msg/ByteMultiArray
because its something that everyone can try. The actual thing I'm trying to do is to pub a custom message with abyte[]
fieldIssue raised at https://github.com/ros2/ros2cli/issue...