Fix angular velocity sign in pose_list

The angular velocity was worked out with the wrong formula. It used
dq * q, but it should be dq * q^-1 (the inverse of q, which is just
its conjugate here because q is normalized).

Using q instead of its inverse pointed the angular velocity the wrong
way. Games read this value when you let go of a controller, so thrown
objects came out spinning wrong.
This commit is contained in:
schlegp
2026-09-01 21:38:03 +02:00
committed by xytovl
parent 9e9fc859f5
commit d81be2ae03
+1 -1
View File
@@ -285,7 +285,7 @@ std::pair<XrTime, xrt_space_relation> pose_list::get_at(XrTime at_timestamp_ns)
(*orientation.dy)[1],
(*orientation.dy)[2],
(*orientation.dy)[3]};
Eigen::Quaternionf half_ω = dq * q;
Eigen::Quaternionf half_ω = dq * q.conjugate();
flags(XRT_SPACE_RELATION_ANGULAR_VELOCITY_VALID_BIT);
ret.angular_velocity = {