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

Convert legacy logs to ROS bag

asked 2016-11-03 16:00:15 -0500

TinyTheBrontosaurus gravatar image

Is there a way to convert legacy logs to ROS bags?

I have a set of sensors logs that were recorded before my project started using ROS. I am now converting everything to use ROS, but I still want to use my old logs for replay purposes. I have already written code that converts those old logs to ROS messages (which conveniently also serves as the direct interface to the sensor). Now I'm trying to replay the old logs, using simulated time. There are several sensor-logs that need to by synchronized. From what I've read, if these were originally created as ROS bags, this would not be an issue.

The solution as I see it is to either convert the existing logs to ROS bags, or find a way to control the simulation time of the roscore without ROS bags or gazebo.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-03 18:25:30 -0500

gvdhoorn gravatar image

You can probably use the rosbag API to write the message instances that you already have to a bag file. After that you could use them like any other bag.

Provided you set the timestamps correctly, things should be properly synchronised then.

edit flag offensive delete link more


Thanks! I was hoping there was an easy answer I was missing.

TinyTheBrontosaurus gravatar image TinyTheBrontosaurus  ( 2016-11-04 09:06:23 -0500 )edit

If you feel your question was answered, could you please mark it as such by ticking the checkmark to the left of the answer? Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-05 06:43:59 -0500 )edit

Unless your request is urgent, I will mark your answer as soon as a get it working. I will likely add more details as well.

TinyTheBrontosaurus gravatar image TinyTheBrontosaurus  ( 2016-11-08 08:54:39 -0500 )edit

No, no urgency at all.

We just like to avoid questions remaining 'unresolved', as it means that future readers will not know whether the answer(s) actually answered the question.

That is all.

Take all the time you need.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-08 12:07:36 -0500 )edit

Question Tools

1 follower


Asked: 2016-11-03 16:00:15 -0500

Seen: 172 times

Last updated: Nov 03 '16