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

How to get the time on bag file?

asked 2012-09-01 06:08:02 -0600

bkim gravatar image

updated 2012-09-01 06:11:59 -0600


I am trying to graph robot's distance from a particular point over time. I have a bag file, and wondering if I can get the duration in the bag file. For instance, if I play a x.bag file, I have the following information:

[PAUSED] Bag Time: 1346096057.781698 Duration: 1.680327 / 19.253778

Is there a way to get that duration in a code?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-09-01 10:33:48 -0600

joq gravatar image

From the command line, use rosbag info.

There is also a code API for both C++ and Python.

edit flag offensive delete link more

Question Tools


Asked: 2012-09-01 06:08:02 -0600

Seen: 3,858 times

Last updated: Sep 01 '12