You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What: SO2::normalized and SO3::normalized remove the drift that a long composition chain puts into a rotation. Poses drift in the same way (odometry composes an SE2 each tick), but SE2 and SE3 have no normalized. The only fix today is to rebuild the pose with from_parts. Add pub fn normalized(self) -> Self, with #[inline] and #[must_use], to both types: Self::from_parts(self.rotation.normalized(), self.translation). The translation does not change.
Where: crates/multicalc/src/spatial/lie/se2.rs and crates/multicalc/src/spatial/lie/se3.rs. Copy SO3::normalized in lie/so3.rs. Tests go in crates/multicalc/tests/suite/spatial/lie.rs.
How to test: cargo test -p multicalc. Copy so2_normalized_removes_composition_drift in lie.rs. For SE2: compose SE2::from_parts(SO2::from_angle(0.3), Vector::new([0.1, 0.0])) 10 000 times, assert that the rotation norm drifted by more than f64::EPSILON, then assert that normalized() gives a rotation norm within f64::EPSILON of 1 and the same translation (exact equality). For SE3: compose a pose 10 000 times, and assert that normalized() gives a quaternion norm within 4.0 * f64::EPSILON of 1 and the same translation.
Activity