pytransform3d.batch_rotations.quaternion_slerp_batch

pytransform3d.batch_rotations.quaternion_slerp_batch(start, end, t, shortest_path=False)[source]

Spherical linear interpolation for a batch of steps.

Parameters
startarray-like, shape (4,)

Start unit quaternion to represent rotation: (w, x, y, z)

endarray-like, shape (4,)

End unit quaternion to represent rotation: (w, x, y, z)

tarray-like, shape (n_steps,)

Steps between start and goal, must be in interval [0, 1]

shortest_pathbool, optional (default: False)

Resolve sign ambiguity before interpolation to find the shortest path. The end quaternion will be picked to be close to the start quaternion.

Returns
Qarray, shape (n_steps, 4)

Interpolated unit quaternions

Examples using pytransform3d.batch_rotations.quaternion_slerp_batch