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

why the time stamp of the message is later than the rosbag time?

asked 2017-01-11 20:03:26 -0500

pitpet gravatar image

I'm debugging my code with rosbag replay. In my code, I did tf transform like this:

tf.transformPose(target_frame, input_pose, output_pose);

Sometimes, there's an exception thrown, which read:

"Lookup would require extrapolation into the future.  Requested time 1484037737.206813097 but the latest data is at time 1484037724.492085834, when looking up transform from frame [odom] to frame [map]"

I checked in the debugger, and found the time stamp of the message input_pose is later than the rosbag time:

p input_pose.stamp_ 
$1  sec = 1484037737, nsec = 206813097
p ros::Time::now()
$2  sec = 1484037724, nsec = 918256570

Also, the rosbag play console shows:

 [PAUSED]   Bag Time: 1484037724.967132

The commands I used to run the rosbag is

rosbag play --clock --pause bagfile.bag

And the param use_sim_time is already set to true:

$rosparam get use_sim_time

Could anyone please help with this problem? Thanks!

edit retag flag offensive close merge delete


Is you data generated on the same computer that records the bag? if those happen on two different computers, it's possible that their clocks were out of sync.

ahendrix gravatar image ahendrix  ( 2017-01-11 21:47:39 -0500 )edit

It turns out to be I'm restarting the rosbag play again but the debugging process is not restarted.

pitpet gravatar image pitpet  ( 2017-01-13 03:53:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-01-13 03:53:53 -0500

pitpet gravatar image

It turns out to be I'm restarting the rosbag play again but the debugging process is not restarted.

edit flag offensive delete link more


@pitpet: please don't close questions when they are answered. It's better to just accept the answer in that case, as it's much more clear from the main question listing that the question was actually answered. You can accept an answer (even your own) by ticking the checkmark to the left of it.

gvdhoorn gravatar image gvdhoorn  ( 2017-01-13 04:25:41 -0500 )edit

Question Tools

1 follower


Asked: 2017-01-11 20:03:26 -0500

Seen: 259 times

Last updated: Jan 13 '17