ros / geometry2

A set of ROS packages for keeping track of coordinate transforms.
190 stars 275 forks source link

A mistake in tf2/Tutorials #517

Closed Mingrui-Yu closed 2 years ago

Mingrui-Yu commented 3 years ago

In the "Writing a tf2 listener (Python)", the first argument of "lookup_transform" is interpreted as "from this frame", and the second argument is interpreted as "to this frame".

Writing a tf2 listener (Python)

However, in the "Writing a tf2 listener (C++)", it is reversed. Writing a tf2 listener (C++)

According to the Code API, the latter is true.

Is this a mistake in the tutorials?

tfoote commented 2 years ago

No they're correct. This is an unfortunate ambiguity in common language around transforms. The transform from frame A to frame B is the transform which will take data from B to A. This is why the API uses target and source to be explicit about referencing the data source and target.

Mingrui-Yu commented 2 years ago

But why are the Python API and C++ API inconsistent? They are completely reversed. @tfoote