Recording tf to rosbag and playing back at reduced speed

asked 2014-10-23 16:02:54 -0600

Dave Coleman gravatar image

This worked in Hydro but appears to be broken in Indigo perhaps.

I'm recording a robot experiment using

rosbag record /tf /tf_static /camera/depth_registered/points /robot/joint_states -O trial1.bag

Then I play it back with

rosbag play --clock -r 0.1 trial1.bag

But in MoveIt! I get the tf error:

 WARN ros.moveit_ros_planning: Unable to transform object from frame 'camera_depth_optical_frame' to planning frame '/base' (Lookup would require extrapolation into the past.  Requested time 1414097890.120901958 but the earliest data is at time 1414097890.730995187, when looking up transform from frame [camera_depth_optical_frame] to frame [base])

But the error goes away if I use a -r 1 instead of -r 0.1 - meaning if I run it in regular time it works fine.

I tried setting

 rosparam set use_sim_time true

But that doesn't seem to do anything.

Also, I converted the tf tree to pdf and everything looks correct. So I have some kind of timing error....

edit retag flag offensive close merge delete

Comments

If it works at normal speed. I'd guess moveit is trying to transform before all the transforms are republished.

tfoote gravatar image tfoote  ( 2014-10-23 16:11:46 -0600 )edit

This is the opposite of the problem I see most of the time - your tf history doesn't go back in time far enough.

ahendrix gravatar image ahendrix  ( 2014-10-23 18:03:23 -0600 )edit

Is this solved Mr. Coleman?

fvd gravatar image fvd  ( 2020-02-29 06:37:33 -0600 )edit