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

Storing the data inside an array as rosbag

asked 2014-05-28 04:00:50 -0600

Latif Anjum gravatar image


Is there a way I can store data in my array (inside a c++ program) as rosbag? Just like I can store it as txt or csv file. I know we can store data being published over a ros topic as rosbag but I am wondering if I can do that without publishing the data on rostopic.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-05-28 16:11:05 -0600

jbinney gravatar image

rosbag has a C++ API that you can use directly in your code:

But I think everything you store will need to be ROS messages. So you'd need to define a ROS message type for your array, e.g. a file called "Foo.msg" which contains "float64[] some_array". Then you need to get catkin to generate code wrappers for that message.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-05-28 04:00:50 -0600

Seen: 777 times

Last updated: May 28 '14