[ros-users] About tf and synchronization
Wim Meeussen
meeussen at willowgarage.com
Wed Dec 22 16:44:42 UTC 2010
> So, for the future, I suppose I always have to try to match the time
> of one of the messages, in this case, the point cloud, but, it could
> have been the timestamp of the odometry of amcl_pose?. Is it correct?
You don't have a choice, you need the timestamp of the object you are
transforming. So in your case you are transforming the pc_current
object:
tlistener.transformPointCloud("/map", pc_current, pc_tf);
So you need the timestamp of the pc_current object in the waitForTransform call:
tlistener.waitForTransform("/map", pc_current.header.frame_id,
pc_current.header.stamp, ros::Duration(3.0));
The API of tf2 merges the call to waitForTransform and transformObject
into one single call, so it will be impossible to make this kind
mistake.
Wim
--
--
Wim Meeussen
Willow Garage Inc.
<http://www.willowgarage.com)
More information about the ros-users
mailing list