MCPcopy Create free account
hub / github.com/MotrixLab/insactor / _compute_angular_velocity

Function _compute_angular_velocity

data/humanml3d_converter.py:226–234  ·  view source on GitHub ↗
(r, time_delta: float)

Source from the content-addressed store, hash-verified

224
225
226def _compute_angular_velocity(r, time_delta: float):
227 # assume the second last dimension is the time axis
228 diff_quat_data = quat_identity_like(r)
229 diff_quat_data[:-1, :] = quat_mul_norm(
230 r[1:, :], quat_inverse(r[:-1, :])
231 )
232 diff_angle, diff_axis = quat_angle_axis(diff_quat_data)
233 angular_velocity = diff_axis * diff_angle[..., None] / time_delta
234 return angular_velocity
235
236
237def get_ang_vel(rot, dt, target_dt, gt=None):

Callers 1

get_ang_velFunction · 0.70

Calls 4

quat_identity_likeFunction · 0.50
quat_mul_normFunction · 0.50
quat_inverseFunction · 0.50
quat_angle_axisFunction · 0.50

Tested by

no test coverage detected