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

Which is the rigth way to add scale to a fcl::Transform3f? #507

Closed
marcobeninca71 opened this issue Oct 27, 2020 · 2 comments
Closed

Which is the rigth way to add scale to a fcl::Transform3f? #507

marcobeninca71 opened this issue Oct 27, 2020 · 2 comments

Comments

@marcobeninca71
Copy link

Hello everybody
I'm using your library in my CAD/CAM application to check for collisions. Everything looks great but I'm not sure which is the rigth way to add a scale to a fcl::Transform3f. I have a function to translate my affine transformation to fcl::Transform3f but when I try to apply a scale (using the fcl::Transform3f::scale function) I always get an error from the compiler compiling fcl::Transform3f in Eigen:

error C2338: THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS

This is because the fcl::Transform3f is not defined as Isometry
Any idea?
Marco

@SeanCurtis-TRI
Copy link
Contributor

This is because the fcl::Transform3f is not defined as Isometry (emphasis mine)

I think you mean because it is defined as Isometry. This was changed a couple of years ago (#318) in order to improve performance of computing transform inverses (see Eigen documentation on Transform::inverse(). Obviously, that leaves this use case out in the cold. As scale factors mean that it's no longer an isometry.

There are two options:

  1. Change Transform back to Affine or AffineCompact. That would support your use case, but increase the cost of every inverse operation.
  2. You pre-apply your scale to the geometry and make your transform purely the pose. I don't know how hard that would be for you.

@marcobeninca71
Copy link
Author

I think you mean because it is defined as Isometry

Yes sorry it was a typo.
Actually I've already apply solution 2: each time the user scale an object the geometry is recalculated applying the scale
Thanks for the quick reply
Marco

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

2 participants