[ros-users] About tf and synchronization

Jack O'Quin jack.oquin at gmail.com
Tue Dec 21 16:22:52 UTC 2010


On Tue, Dec 21, 2010 at 9:07 AM, Rodrigo Baravalle <rbaravalle at gmail.com> wrote:
> Hello everyone!
>
> I am trying to build a 3D map of the surrounding environment of a
> robot. I am using a swissranger SR4000 camera and a xsens mti sensor:
> the first gives me the 3D point cloud and the second the values of the
> rotation of the camera at each moment.
>
> Each sensor is well integrated with ROS and is broadcasting its values
> correctly. I am also using amcl to get the actual pose of the robot
> with a 2D map I have already constructed. These sensors are mounted on
> a wheelchair which has a 2D laser in the center. The sensors are a bit
> displaced from the center of the wheelchair, and so I have constructed
> the transformation of the camera (using sendTransform from the package
> tf) to the center of the robot.
>
> I want to use the values of the xsens sensor (rotation) and amcl
> (translation) at the same time to know where to put each incoming
> point cloud. For better synchronization, what I do is to call the
> camera and the xsens when I receive a new position by amcl. The first
> step I  do is to transform the point cloud to the frame "/map", which
> is returned by amcl, so then I could sum all the incomings point
> clouds.
>
> The problem is that I always get an error message like this:
>
> "You requested a transform that is 12.571 miliseconds in the past,
> but the most recent transform in the tf buffer is 49.194 miliseconds old.
>  When trying to transform between /swissranger and /map."
>
> At this moment, the chain of frames is: map - odom - base_link - swissranger
>
> I have already tried with "waitForTransform" between the two frames,
> but nothing seems to happen. I can see by using "rosrun tf
> view_frames" that amcl is publishing things in the future: "
> Broadcaster: /amcl ... Most recent transform: -0.086 sec old ... ".
>
> I changed the value "transform_tolerance" from the amcl launch to 0.0,
> but it does not changed the result.
>
> What can I do to solve this problem? Maybe it is not necessary to
> transform between swissranger and map, and I could use directly the
> values from amcl and the xsens sensor to transform the point cloud?
> The last option seems to be a bit dirty, also.

I've been having similar problems trying to transform Velodyne 3D
PointCloud data into the /odom frame on a moving vehicle. There is a
delay in transmitting the /odom -> /vehicle transform, but
WaitForTransform() does not seem to resolve it properly.

I hope the solution to your problem will give me a clue what to do. Tf
problems can be really difficult to debug.
-- 
 joq



More information about the ros-users mailing list