0
$\begingroup$

Rosanswers logo

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.


Originally posted by mitaka on ROS Answers with karma: 1 on 2017-05-05

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2017-05-05

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.