pytransform3d.rotations.quaternion_slerp#

pytransform3d.rotations.quaternion_slerp(start, end, t, shortest_path=False)[source]#

Spherical linear interpolation.

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)

tfloat in [0, 1]

Position between start and end

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 (4,)

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

See also

axis_angle_slerp

SLERP for axis-angle representation.

rotor_slerp

SLERP for rotors.

pytransform3d.transformations.pq_slerp

SLERP for position + quaternion.

Examples using pytransform3d.rotations.quaternion_slerp#

Interpolate Between Quaternion Orientations

Interpolate Between Quaternion Orientations

Quaternion SLERP

Quaternion SLERP