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.
Asked
Active
Viewed 4,905 times
2
-
Questions seeking debugging help ("why isn't this code working?") must include the *desired behaviour*, a *specific problem or error* and the *shortest code necessary to reproduce it* in the question itself. Questions without a clear problem statement are not useful to other readers. See: [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) – Mark Booth Jan 10 '17 at 10:41
-
Clearly you know nothing about ROS. This is not a debugging question. Why don't you pipe down and look for verification points on another thread? – Ben Bird Jan 10 '17 at 17:42
-
If you want your question answered then you need to give more information. Stack overflow is not a place to get example code, it is a place to [ask practical, answerable questions based on actual problems that you face](http://stackoverflow.com/help/dont-ask). My comment was not meant as a criticism, it was meant to help you make your question into one which was more likely to be answered. I would have told you to do exactly the same if you'd asked the question on [Robotics.se] Stack Exchange. – Mark Booth Jan 11 '17 at 09:58
1 Answers
1
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.

José Sánchez
- 1,126
- 2
- 11
- 20