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

Store ROS messages in file ?

asked 2016-10-26 01:19:21 -0500

Aasiya Shaikh gravatar image

updated 2023-06-18 09:54:04 -0500

lucasw gravatar image

Hello

I am working on Some project, I have to store ROS messages in some File using C++ API's. I knew ROS BAG files which is excellent for storing ROS messages But i want to knew Is their any other supported files in ROS to store ROS message using C++ API's. If yes then which one is it ? Can anyone Suggest.

Can I read ROS .bag file in Reverse order ? If yes then how it can be done. Please can anyone tell me.

image:IMAGE !

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-10-26 17:07:00 -0500

tfoote gravatar image

You can use the rosbag C++ api to work with data stored in bag files. Including reverse iterating etch. There's API docs here

edit flag offensive delete link more

Comments

Thanks a lots

Aasiya Shaikh gravatar image Aasiya Shaikh  ( 2016-10-27 05:41:20 -0500 )edit
1

answered 2016-10-26 02:30:45 -0500

Yang gravatar image

Hi,you can store topic messages in files through rostopic echo /topic >>file.txt

edit flag offensive delete link more

Comments

Okay Thanks. Then please can to tell me how I can read these topic messages through API's as I have to reused this messages , in my program .

Aasiya Shaikh gravatar image Aasiya Shaikh  ( 2016-10-26 05:05:46 -0500 )edit

1.As tfoote said,use rosbag . 2.Print the message in file through standard c++.

Yang gravatar image Yang  ( 2016-10-26 20:32:21 -0500 )edit

Okay Thank you

Aasiya Shaikh gravatar image Aasiya Shaikh  ( 2016-10-27 05:41:34 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-10-26 01:19:21 -0500

Seen: 1,274 times

Last updated: Feb 07 '17