Repository navigation
conversions for Eigen::Isometry3d - #335
Conversation
| t.transform.translation.y = T.translation().y(); | ||
| t.transform.translation.z = T.translation().z(); | ||
|
|
||
| Eigen::Quaterniond q(T.rotation()); |
There was a problem hiding this comment.
Affine3d::rotation() performs a costly SVD.
| msg.orientation.y = Eigen::Quaterniond(in.rotation()).y(); | ||
| msg.orientation.z = Eigen::Quaterniond(in.rotation()).z(); | ||
| msg.orientation.w = Eigen::Quaterniond(in.rotation()).w(); | ||
| Eigen::Quaterniond q(in.linear()); |
There was a problem hiding this comment.
compute the quaternion only once!
| msg.orientation.y = q.y(); | ||
| msg.orientation.z = q.z(); | ||
| msg.orientation.w = q.w(); | ||
| if (msg.orientation.w < 0) { |
There was a problem hiding this comment.
Constrain quaternions to the half-space w >= 0 as in tf1.
tfoote
left a comment
There was a problem hiding this comment.
Thanks for adding this support.
|
@tfoote Do you plan a new release of geometry2 any time soon? |
|
Yes, I've just cleared the backlog of PRs and plan to release after the next indigo/kinetic sync |
|
This change needs to be ported to the ros2 version of geometry2 for moveit's conversion: https://github.com/ros2/geometry2 |
|
Ideally the whole geometry2 would be synced to the ros2 version |
As of C++11, the size() method of a std::list is guaranteed to have constant cost, so we don't need to track the message count ourselves. Signed-off-by: Chris Lalancette <[email protected]>
In the vein of ros/geometry#113, I added converters for
Eigen::Isometry3dalso totf2_eigen.Eigen::Affine3dcannot exploit the SE(3) structure of transforms and thus needs toHence,
Affine3dshould be actually avoided.