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

Extract time from .bag file

asked 2014-12-22 08:15:32 -0500

erpa gravatar image

Hi, I am trying to process some bag files and, while I am able to get the timestamp for each message, I am not able to get the actual time the message was received. Is it possible to get it? I am using the python api and I could not find any documentations, any help is really appreciated! Thanks for your help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-12-24 11:09:37 -0500

tfoote gravatar image

You can get that information using the rosbag API. Take a look at the rosbag Cookbook wiki page. The time is in the tuple returned from read_messages().

edit flag offensive delete link more

Comments

Does the time refer to when rosbag received the message?

Murilo F. M. gravatar image Murilo F. M.  ( 2014-12-25 06:31:26 -0500 )edit

Yes that does refer to the receive time.

tfoote gravatar image tfoote  ( 2014-12-26 00:06:46 -0500 )edit

Thanks! I did not know that! I should probably delete my answer as it is inaccurate/misleading.

Murilo F. M. gravatar image Murilo F. M.  ( 2014-12-26 15:42:49 -0500 )edit

For some reason I was confused but yes the time is the third item in the tuple returned by read_messages(). Thanks for the help!

erpa gravatar image erpa  ( 2014-12-31 09:42:24 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-12-22 08:15:32 -0500

Seen: 3,730 times

Last updated: Dec 24 '14