Skip to content

Commit 48b7a49

Browse files
committed
move to consistently using rpy/xyz not rpy-xyz
1 parent f4706db commit 48b7a49

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

‎spatialmath/base/transforms3d.py‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,21 +1800,21 @@ def rot2jac(R, representation='rpy-xyz'):
18001800
:return: Jacobian matrix
18011801
:rtype: ndarray(6,6)
18021802
1803-
Computes the transformation from spatial velocity, where rotation rate is
1804-
expressed as angular velocity, to analytical rates where the rotational part
1805-
is expressed as rate of change in some other representation
1803+
Computes the transformation from spatial velocity :math:`\nu`, where
1804+
rotation rate is expressed as angular velocity, to analytical rates
1805+
:math:`\dvec{x}` where the rotational part is expressed as rate of change in
1806+
some other representation
18061807
18071808
.. math::
1809+
\dvec{x} = \mat{A} \vec{\nu}
18081810
1809-
\dvec{x} = \mat{A} \vec{\mu}
1810-
1811-
:math:`\mat{A}` is a block diagonal matrix
1811+
where :math:`\mat{A}` is a block diagonal 6x6 matrix
18121812
18131813
================== ========================================
18141814
``representation`` Rotational representation
18151815
================== ========================================
1816-
``'rpy-xyz'`` RPY angular rates in XYZ order (default)
1817-
``'rpy-zyx'`` RPY angular rates in XYZ order
1816+
``'rpy/xyz'`` RPY angular rates in XYZ order (default)
1817+
``'rpy/zyx'`` RPY angular rates in XYZ order
18181818
``'eul'`` Euler angular rates in ZYZ order
18191819
``'exp'`` exponential coordinate rates
18201820
================= ========================================
@@ -1829,14 +1829,14 @@ def rot2jac(R, representation='rpy-xyz'):
18291829
if ishom(R):
18301830
R = base.t2r(R)
18311831

1832-
R = R.T
1833-
1834-
if representation == 'rpy-xyz':
1835-
rpy = tr2rpy(R, 'xyz')
1836-
A = rpy2jac(rpy, 'xyz')
1837-
elif representation == 'rpy-zyx':
1838-
rpy = tr2rpy(R, 'zyx')
1839-
A = rpy2jac(rpy, 'zyx')
1832+
# R = R.T
1833+
1834+
if representation == 'rpy/xyz':
1835+
rpy = tr2rpy(R, order='xyz')
1836+
A = rpy2jac(rpy, order='xyz')
1837+
elif representation == 'rpy/zyx':
1838+
rpy = tr2rpy(R, order='zyx')
1839+
A = rpy2jac(rpy, order='zyx')
18401840
elif representation == 'eul':
18411841
eul = tr2eul(R)
18421842
A = eul2jac(eul)

0 commit comments

Comments
 (0)