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

Treating a frame and a transform as the same is unclear without digging into source code #557

Open
roshambo919 opened this issue Dec 13, 2023 · 0 comments

Comments

@roshambo919
Copy link

It is my understanding that tf2's use of PyKDL to do transformations means that the position and orientation construct a classic transformation matrix:

T = [[ M,  p],
     [ 0,  1]]

When this type of transformation is applied to a point, the rotation of the point happens first, then the point is translated in the new rotated frame. It took me several hours of digging in the source code to determine this behavior. My personal definition of a reference frame is that it is the opposite order -- translation first then rotation -- as opposed to frame being synonymous with transform.

This is not necessarily a problem with tf2 BUT caused great headaches trying to understand how to define a frame because the ros2 tf2 tutorials only use translations when defining the frame and use the identity quaternion making it ambiguous which order the operations are applied from just the tutorials.

Moreover, this same behavior is evident when using the function do_transform_pose. That function treats the pose as a transform/frame. This means that a transform's position is defined IN THE ROTATED COORDINATE FRAME i.e. AFTER applying the pose's rotation. Personally, I dislike this definition since now the position is coupled with the orientation. Defining pose as first a translation then a rotation would decouple the two. But since that path is unlikely to ever be realized, I would greatly appreciate some enhanced documentation and/or clarification on my misunderstandings.

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

1 participant