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

Storing the data inside an array as rosbag

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

Latif Anjum gravatar image

Hi,

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.

regards

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

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

jbinney gravatar image

rosbag has a C++ API that you can use directly in your code: http://wiki.ros.org/rosbag/Code%20API

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

Stats

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

Seen: 783 times

Last updated: May 28 '14