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!
↧