geometry icon indicating copy to clipboard operation
geometry copied to clipboard

tf package: Transformer::lookupTwist(...) results seem to be wrong

Open tfoote opened this issue 11 years ago • 4 comments

Originally filed here: https://code.ros.org/trac/ros-pkg/ticket/5309

The results I get from Transformer::lookupTwist(...) are not w.r.t. the reference_frame as the documentation claims them to be.

To reproduce: I have two frames: /EE (the moving endeffector) and /Base (the static global world frame). I want to know the relative velocity of /EE, i.e. not expressed in /Base but in the frame /EE. According to the documentation I have to call:

tf_listener.lookupTwist("/EE", "/Base", "/EE", tf::Point(0,0,0), "/EE", ...) , which means /EE is the tracking frame, /Base the observation frame, /EE the reference frame, and /EE the reference_point frame. But the resulting velocity is according to the /Base frame, NOT /EE!

I suppose the bug is in line 555 of tf.cpp:

lookupTransform(reference_frame,tracking_frame,target_time,inverse); It should be replaced by:

lookupTransform(reference_frame,observation_frame,target_time,inverse); At least in my case this solves the problem, but i'm not 100% sure, if this is always true, somebody should re-check.

Line in question is now here: https://github.com/ros/geometry/blob/hydro-devel/tf/src/tf.cpp#L315

tfoote avatar Oct 30 '13 17:10 tfoote

@wmeeusse can you check this logic? I can do the update if necessary.

tfoote avatar Oct 30 '13 17:10 tfoote

Has this been fixed?

vannem95 avatar Aug 31 '18 05:08 vannem95

Would like to know the same. I'm using lookupTwistFull on indigo and I still cannot get the twist expressed in the reference frame.

MauroPfister avatar Jun 04 '19 14:06 MauroPfister

@tfoote is that fixed now!!! because I need to express the velocity from base_link frame to the camera frame

LArayane avatar Aug 25 '19 14:08 LArayane