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

Convert CARMEN log file to rosbag

asked 2017-05-05 05:16:48 -0500

mitaka gravatar image

This is more of a question of 'Which docs should I read'.

I have some CARMEN log files which I need to convert to rosbag. I have read about bag and msg formats, however, I do not quite understand how do I store information from the original file in the bag format.

So, for example, I have a line:

ODOM 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1202839366.707501 lakebodom 0.128184

The format for ODOM is already known, and it is:

ODOM x y theta tv rv accel

As I understand, I can store messages in bags, and messages contain entries in such format:

<type> <name>

For example, int64 var_name.

So I could probably fill the msg for this particular record with stuff like float32 x_a and so on, but how do I assign values? How do I store information that x_a is 0.000000?

I also don't understand this: bags can contain a whole lot of different records, such as chunks, connections, message data, etc., but how do I know what to use and what not to use? As of now, I can only imagine writing a lot of messages.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-05-05 07:24:43 -0500

gvdhoorn gravatar image

updated 2017-05-05 07:27:34 -0500

The only thing you need to figure out is which ROS messages to map your Carmen log lines to.

After you've figured that out, read up on the Python RosBag API, write a simple conversion script and have that read in your Carmen log and write out the relevant messages to the bag. The rest ("chunks, connections, message data, etc") is taken care of for you.


Edit: a quick Google shows that someone at PAL Robotics has actually already done all of this for you. See artivis/carmen_publisher.


Edit2: and some related questions right here on ROS Answers: #q90266, #q95496 and #q95046.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-05-05 05:16:48 -0500

Seen: 883 times

Last updated: May 05 '17