Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is arguments of lookupTransform opposite? #108

Closed
garaemon opened this issue Oct 22, 2015 · 3 comments
Closed

Is arguments of lookupTransform opposite? #108

garaemon opened this issue Oct 22, 2015 · 3 comments

Comments

@garaemon
Copy link

tf document and header says:

void Transformer::lookupTransform(const std::string& target_frame, 
                                           const std::string& source_frame,
                                           const ros::Time& time, StampedTransform& transform) const

But in tf_echo, the order looks opposite.
https://github.com/ros/geometry/blob/indigo-devel/tf/src/tf_echo.cpp#L107

echoListener.tf.lookupTransform(source_frameid, target_frameid, ros::Time(), echo_transform);

cc: @wkentaro

@wkentaro
Copy link

I have tested the lookupTransform with rviz and static_transform_publisher below, and I think these are target/source_frame are opposite.
jsk-ros-pkg/jsk_recognition#1274

image

@tfoote
Copy link
Member

tfoote commented Oct 22, 2015

It depends on if your referring to the transform of the coordinate or a point between the coordinate frames.

tf_echo and the broadcasters are focused on the transforms between the coordinate frames. When you're building the tree that is what you want to pay attention to.

When you're using the tf tree you care about transforming data. lookupTransform is looking up the transform for an object in the source frame, into the target frame. Which is the inverse of the transform of the coordinate frames that tf_echo would report or that you would publish.

@ros-discourse
Copy link

This issue has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/nomenclature-of-tf-echo-and-tf-listener/36985/7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants