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

Read bag files in visual studio

asked 2018-12-02 23:14:45 -0600

AutoCar gravatar image

I am wondering if there is any existing c++ api I can use to read a bag file without using any ROS package. I am writing a navigation algorithm for my robot and currently the algorithm does not use ROS at all. However, all my test data are in ros bag format. I would like to read the data from the bag file and debug my standalone program in Visual Studio.

edit retag flag offensive close merge delete


Anyone knows?

AutoCar gravatar image AutoCar  ( 2018-12-07 15:05:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-12-07 22:30:25 -0600

Hamid Didari gravatar image

updated 2018-12-08 03:41:04 -0600

you can use this command to convert bag file to text data and then use this in visual studio:

rostopic echo -b file.bag -p /topic > data.txt
edit flag offensive delete link more


but text file is very large and reading is very slow

AutoCar gravatar image AutoCar  ( 2018-12-20 18:20:21 -0600 )edit

Question Tools

1 follower


Asked: 2018-12-02 23:14:45 -0600

Seen: 543 times

Last updated: Dec 08 '18