Reputation: 392
Can anybody give me an example of geometry_msgs/PoseArray message using rostopic pub? I keep on getting errors when i try and interpret the syntax from the ROS documentation, a solid example would be really helpful.
Upvotes: 2
Views: 5703
Reputation: 1136
Do you mean something like this:
rostopic pub /my_topic geometry_msgs/PoseArray "{header: {frame_id: 'base_frame'}, poses: [{position: {x: 1.0, y: 0.0, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}, {position: {x: 1.1, y: 0.0, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}]}"
This will publish a PoseArray
message containing two poses to the topic my_topic
. Furthermore, if you are using bash I believe you can auto-complete the message by hitting tab.
Upvotes: 1