Revert Eigen::EulerAngles use
Compare changes
@@ -22,7 +22,6 @@
@@ -117,7 +116,9 @@ inline constexpr T Deg2Rad(const T& deg)
@@ -128,7 +129,22 @@ inline Eigen::Matrix3d RPYtoRotationMatrix(double roll, double pitch, double yaw
System updates will be applied on Mar 14th between 7am and 9am, EST (UTC-05:00). This site will have intermittent downtime during that time.
rpy = rot.eulerAngles(2, 1, 0).reverse()
returns angles in range [-PI:PI]x[-PI:PI]x[0:PI].
rpy = Eigen::EulerAnglesZYXd(rot).angles().reverse()
returns angles in range [-PI:PI]x[-PI:PI]x[-PI:PI].
But these are bad. For first range, yaw angle cannot be negative : this
leads to un-necessary non trivial RPY decomposition, and to unstable
optimization result as we are not optimizing around 0.
For second ranges, there exist several RPY decomposition for the same
rotation (one of them being non-trivial too). Therefore the optimization
may also be unstable by oscillating between them.
We prefer to output angles in range [-PI:PI]x[-PI/2:PI/2]x[-PI:PI] : we
allow negative values to avoid oscillation artefacts, and minimize the
pitch angle to fix representation.
This revert changes brought by commit dff3cbdb in MR #34.
A real solution would be to use quaternions instead of these messy euler angles representations. Issue #8 has been opened.