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

Function _compute_angular_velocity

data/kitml_converter.py:225–233  ·  view source on GitHub ↗
(r, time_delta: float)

Source from the content-addressed store, hash-verified

223
224
225def _compute_angular_velocity(r, time_delta: float):
226 # assume the second last dimension is the time axis
227 diff_quat_data = quat_identity_like(r)
228 diff_quat_data[:-1, :] = quat_mul_norm(
229 r[1:, :], quat_inverse(r[:-1, :])
230 )
231 diff_angle, diff_axis = quat_angle_axis(diff_quat_data)
232 angular_velocity = diff_axis * diff_angle[..., None] / time_delta
233 return angular_velocity
234
235
236def 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