0
$\begingroup$

Rosanswers logo

I can't seem to figure this out:

ros2 topic pub /gripper_controller/commands std_msgs/msg/Float64MultiArray lay [TAB COMPLETE]

Now the message is auto-populated like this. I just change the data field:

ros2 topic pub /gripper_controller/commands std_msgs/msg/Float64MultiArray layout:\
\ \ dim:\ []\
\ \ data_offset:\ 0\
data:\ [0.2]\

^ When I try that, the error is:

yaml.scanner.ScannerError: mapping values are not allowed here in "", line 1, column 13: layout: dim: [] data_offset: 0data: [0.2]

Similar issues if I use the rqt message publisher.


Originally posted by AndyZe on ROS Answers with karma: 2331 on 2021-08-03

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Ah, found an example in ros2_control_demos:

ros2 topic pub /gripper_controller/commands std_msgs/msg/Float64MultiArray "data:
- 0.1"

Originally posted by AndyZe with karma: 2331 on 2021-08-03

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.