ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Revision history [back]

I had a similar problem some time ago and end up with a script. Please have a look at this question.

Basically the script allows you to convert any message to any just from a command line. For your case it will be something like:

$ rostopic echo /gazebo/model_states | ./ "{pose: 'pose[1]'}" | rostopic pub -r 100 /pelican/pose geometry_msgs/Pose

Although this is convenient for prototyping, for a production code it might be better to write a small node as @gary-servin suggests.