0
$\begingroup$

Rosanswers logo

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
true

Could anyone please help with this problem? Thanks!


Originally posted by pitpet on ROS Answers with karma: 38 on 2017-01-11

Post score: 0


Original comments

Comment by ahendrix on 2017-01-11:
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.

Comment by pitpet on 2017-01-13:
It turns out to be I'm restarting the rosbag play again but the debugging process is not restarted.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by pitpet with karma: 38 on 2017-01-13

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2017-01-13:
@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.

$\endgroup$

Your Answer

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