我正在使用rosbag重播调试我的代码。在我的代码中,我做了如下转换:
tf.transformPose(target_frame, input_pose, output_pose);
有时会抛出一个例外,其中包括:
"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]"
我检查了调试器,发现消息input_pose的时间戳晚于rosbag时间:
p input_pose.stamp_
$1 sec = 1484037737, nsec = 206813097
p ros::Time::now()
$2 sec = 1484037724, nsec = 918256570
此外,rosbag播放控制台显示:
[PAUSED] Bag Time: 1484037724.967132
我用来运行rosbag的命令是
rosbag play --clock --pause bagfile.bag
param use_sim_time已设置为true:
$rosparam get use_sim_time
true
有人可以帮忙解决这个问题吗?谢谢!
答案 0 :(得分:1)
看起来你有一些较低费率的tf源发布。您可以查看tf_monitor
或view_frames
。
另外,在进行transformPose
之前(使用waitForTransform()
),您是否在等待转换准备就绪?
答案 1 :(得分:0)
结果是我再次重新启动rosbag play
,但调试过程没有重新开始。