diff --git a/doc/source/api.rst b/doc/source/api.rst index 6db4b8b2e..188848eb0 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -357,6 +357,15 @@ Apply Transformations ~pytransform3d.transformations.scale_transform ~pytransform3d.transformations.adjoint_from_transform +Position+Quaternion Operations +------------------------------ + +.. autosummary:: + :toctree: _apidoc/ + :template: function.rst + + ~pytransform3d.transformations.pq_slerp + Dual Quaternion Operations -------------------------- diff --git a/pytransform3d/rotations/_slerp.py b/pytransform3d/rotations/_slerp.py index 0d2dc5e48..fdce62736 100644 --- a/pytransform3d/rotations/_slerp.py +++ b/pytransform3d/rotations/_slerp.py @@ -22,6 +22,17 @@ def axis_angle_slerp(start, end, t): ------- a : array, shape (4,) Interpolated axis of rotation and rotation angle: (x, y, z, angle) + + See Also + -------- + quaternion_slerp : + SLERP for quaternions. + + rotor_slerp : + SLERP for rotors. + + pytransform3d.transformations.pq_slerp : + SLERP for position + quaternion. """ start = check_axis_angle(start) end = check_axis_angle(end) @@ -54,6 +65,17 @@ def quaternion_slerp(start, end, t, shortest_path=False): ------- q : array, 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. """ start = check_quaternion(start) end = check_quaternion(end) @@ -137,6 +159,17 @@ def rotor_slerp(start, end, t, shortest_path=False): ------- rotor : array, shape (4,) Interpolated rotor: (a, b_yz, b_zx, b_xy) + + See Also + -------- + axis_angle_slerp : + SLERP for axis-angle representation. + + quaternion_slerp : + SLERP for quaternions. + + pytransform3d.transformations.pq_slerp : + SLERP for position + quaternion. """ start = check_rotor(start) end = check_rotor(end) diff --git a/pytransform3d/transformations/_dual_quaternion_operations.py b/pytransform3d/transformations/_dual_quaternion_operations.py index 16dfebf0c..c1a04acdb 100644 --- a/pytransform3d/transformations/_dual_quaternion_operations.py +++ b/pytransform3d/transformations/_dual_quaternion_operations.py @@ -147,6 +147,12 @@ def dual_quaternion_sclerp(start, end, t): Kavan, Collins, O'Sullivan, Zara: Dual Quaternions for Rigid Transformation Blending (2006), Technical report, Trinity College Dublin, https://users.cs.utah.edu/~ladislav/kavan06dual/kavan06dual.pdf + + See Also + -------- + pq_slerp : + An alternative approach is spherical linear interpolation (SLERP) with + position and quaternion. """ start = check_dual_quaternion(start) end = check_dual_quaternion(end) diff --git a/pytransform3d/transformations/_pq_operations.py b/pytransform3d/transformations/_pq_operations.py index 003ba51ed..cf63faf66 100644 --- a/pytransform3d/transformations/_pq_operations.py +++ b/pytransform3d/transformations/_pq_operations.py @@ -10,10 +10,6 @@ def pq_slerp(start, end, t): We will use spherical linear interpolation (SLERP) for the quaternion and linear interpolation for the position. - An alternative approach is screw linear interpolation (ScLERP) with dual - quaternions (see - :func:`pytransform3d.transformations.dual_quaternion_sclerp`). - Parameters ---------- start : array-like, shape (7,) @@ -29,6 +25,21 @@ def pq_slerp(start, end, t): ------- pq_t : array-like, shape (7,) Position and orientation quaternion: (x, y, z, qw, qx, qy, qz) + + See Also + -------- + dual_quaternion_sclerp : + An alternative approach is screw linear interpolation (ScLERP) with + dual quaternions. + + pytransform3d.rotations.axis_angle_slerp : + SLERP for axis-angle representation. + + pytransform3d.rotations.quaternion_slerp : + SLERP for quaternions. + + pytransform3d.rotations.rotor_slerp : + SLERP for rotors. """ start = check_pq(start) end = check_pq(end)