Fix pose extrapolation

past extrapolation was wrong
velocity was wrong invalid from client
This commit is contained in:
Patrick Nicolas
2024-03-14 20:01:20 +01:00
parent 5dc5117441
commit 295d502032
+2 -2
View File
@@ -46,11 +46,11 @@ xrt_space_relation pose_list::extrapolate(const xrt_space_relation & a, const xr
float dt = (t - tb) / 1.e9;
float dt2_over_2 = dt * dt / 2;
res.pose.position = b.pose.position + b.linear_velocity * dt;
res.pose.position = res.pose.position + lin_vel * dt;
if (res.relation_flags & XRT_SPACE_RELATION_ANGULAR_VELOCITY_VALID_BIT)
{
xrt_vec3 dtheta = b.angular_velocity * dt;
xrt_vec3 dtheta = res.angular_velocity * dt;
xrt_quat dq;
math_quat_exp(&dtheta, &dq);