pytransform3d.rotations
.matrix_slerp#
- pytransform3d.rotations.matrix_slerp(start, end, t)[source]#
Spherical linear interpolation (SLERP) for rotation matrices.
We compute the difference between two orientations \(\boldsymbol{R}_{AB} = \boldsymbol{R}^{-1}_{WA}\boldsymbol{R}_{WB}\), convert it to a rotation vector \(Log(\boldsymbol{R}_{AB}) = \boldsymbol{\omega}_{AB}\), compute a fraction of it \(t\boldsymbol{\omega}_{AB}\) with \(t \in [0, 1]\), and use the exponential map to concatenate the fraction of the difference \(\boldsymbol{R}_{WA} Exp(t\boldsymbol{\omega}_{AB})\).
- Parameters:
- startarray-like, shape (3, 3)
Rotation matrix to represent start orientation.
- endarray-like, shape (3, 3)
Rotation matrix to represent end orientation.
- tfloat in [0, 1]
Position between start and goal.
- Returns:
- R_tarray, shape (3, 3)
Interpolated orientation.
See also
axis_angle_slerp
SLERP axis-angle representation.
quaternion_slerp
SLERP for quaternions.
rotor_slerp
SLERP for rotors.
pytransform3d.transformations.pq_slerp
SLERP for position + quaternion.