fix Eigen::Affine3d for Kinetic#1091
Conversation
|
I find this hard(er) to read, I know what a Would it hurt to only change this for melodic? Or maybe split it into internal and external api cases so that plugins etc still stay compatible? If so I would vote for using |
|
@simonschmeisser I don't get your point yet. I think there is no question in applying those changes both in Kinetic and Melodic as there is a severe performance penalty connected with calling Replacing So are you asking to apply this type change in Melodic and keep |
|
My concerns are confirmed: #1096 fails when trying to assign Affine3d (as a result of tf2 conversion) to Isometry3d. Tully accepted a while ago a patch to support Isometry in tf1. So we would need to file a similar patch for tf2 as well. Any volunteers? |
I will look into this. |
|
Just noticed that we will need to switch to Eigen::Isometry in |
|
I agree I think we should not change kinetic-devel, and do it the better way for melodic-devel using Isometry3d |
|
I rebased and retargeted this PR to Kinetic. |
|
I'm not super comfortable making this kind of change in the kinetic branch, but also do not feel super strongly about it. Would like to hear other's thoughts. |
|
Can you motivate your objections? This is just performance improvement. No API changes. |
|
Rebased, to resolve merge conflicts. |
|
I have not yet compiled and tested this PR but from reading through it does look safe. I still have slight theoretical objections about limiting the amount of changes in a somewhat stable branch but that is more a general issue I guess and not to be discussed here. I'm really happy this has been fixed in a type-safe manner in melodic and can be bribed by proposed speed improvements (do we have a way to put that into numbers?) for kinetic |
|
Would be indeed interesting to put this in numbers, e.g. performing some random RobotState updates... |
davetcoleman
left a comment
There was a problem hiding this comment.
I reviewed this again more thoroughly and it looks safe
This attempts to fix #1073, i.e. using Eigen::Affine3d while actually Eigen::Isometry3d is intended.
Instead of changing the actual type throughout the source, I followed @v4hn's suggestion and
rotation()->linear()inverse()->inverse(Eigen::Isometry)ortranspose()if applied to 3x3 rotation matrix onlyThis implicitly assumes that the linear part of all matrices is orthonormal and doesn't need an SVD to separate the rotation matrix from a (diagonal) scaling matrix.
Changing the type to Eigen::Isometry3d would do these simplifications automatically.
However, for Kinetic we don't want to break API that much.