ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Here's a quick way:
rosbag play mybag.bag
rostopic echo /foo > output.txt
This will output all message in the topic /foo
to a yaml-formatted text file. You can then parse the file. It might be useful to output to multiple files for different fields. Let's say the message type on /foo
is Pose:
rosbag play mybag.bag
rostopic echo /foo/position/x > output_x.txt
rostopic echo /foo/position/y > output_y.txt
rostopic echo /foo/position/z > output_z.txt
You can also look into bagys, which are an extension of the concept above.