ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you can use bagpy in python, give which topic you want, the topic data will be automatically extracted into a csv file.

For example, if you want to extract '/odom' topic, after running below code, you will find a csv file named "odom.csv" in the script folder. Hope it helps.

from bagpy import bagreader

b = bagreader('./sample_mission.bag')
bmesg = b.message_by_topic('/odom')