Cannot/don't know how to publish message with `byte[]` field
Open
Nobody has claimed this yet.
bug
help wanted
- Dominant language
- Python
- Stars
- 262
- Forks
- 228
- Avg merge
- 23h 15m
- Merged PRs (30d)
- 12
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 20.04
- Installation type:
- binaries
- Version or commit hash:
- ros2cli 0.13.4
- DDS implementation:
- rmw_cyclonedds_cpp: 0.22.5
- Client library (if applicable):
- N/A
Steps to reproduce issue
Trying to ros2 topic pub a std_msgs/msg/ByteMultiArray message. 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]}"
Expected behavior
Successful publishing.
Actual behavior
Error response:
Failed to populate field: The 'data' field must be a set or sequence and each value of type 'bytes'
Additional information
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ros2 topic pub entry point and reproduce the std_msgs/msg/ByteMultiArray command using the examples in the issue. Trace how the CLI populates the data field and verify that a byte sequence such as [0x03, 0x04] publishes successfully without the reported type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100