Use the string (rot:lin) in mjdata.h to clarify where 6D motion vectors use the Featherstone convention. Also add clarifying text to the appropriate note in the documentation.

Fixes #982.

PiperOrigin-RevId: 589556339
Change-Id: I3e7ff185a089715a386694321d4b89d09d481cf9
This commit is contained in:
Yuval Tassa
2023-12-10 03:26:49 -08:00
committed by Copybara-Service
parent b22919543d
commit 1885d518eb
4 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -1219,9 +1219,9 @@ a frame at the center-of-mass of the local kinematic subtree (``mjData.subtree_c
This choice increases the precision of kinematic computations for mechanisms that are distant from the global origin. This choice increases the precision of kinematic computations for mechanisms that are distant from the global origin.
``cdof``: ``cdof``:
These 6D motion vectors describe the instantaneous axis of a degree-of-freedom and are used by all Jacobian functions. These 6D motion vectors (3 rotation, 3 translation) describe the instantaneous axis of a degree-of-freedom and are
Therefore, the minimal computation required for analytic Jacobians is :ref:`mj_kinematics` followed by used by all Jacobian functions. The minimal computation required for analytic Jacobians is :ref:`mj_kinematics`
:ref:`mj_comPos`. followed by :ref:`mj_comPos`.
``cinert``: ``cinert``:
These 10-vectors describe the inertial properties of a body in the c-frame and are used by the Composite Rigid Body These 10-vectors describe the inertial properties of a body in the c-frame and are used by the Composite Rigid Body
+3 -3
View File
@@ -237,7 +237,7 @@ struct mjData_ {
// computed by mj_fwdPosition/mj_comPos // computed by mj_fwdPosition/mj_comPos
mjtNum* subtree_com; // center of mass of each subtree (nbody x 3) mjtNum* subtree_com; // center of mass of each subtree (nbody x 3)
mjtNum* cdof; // com-based motion axis of each dof (nv x 6) mjtNum* cdof; // com-based motion axis of each dof (rot:lin) (nv x 6)
mjtNum* cinert; // com-based body inertia and mass (nbody x 10) mjtNum* cinert; // com-based body inertia and mass (nbody x 10)
// computed by mj_fwdPosition/mj_flex // computed by mj_fwdPosition/mj_flex
@@ -285,8 +285,8 @@ struct mjData_ {
mjtNum* actuator_velocity; // actuator velocities (nu x 1) mjtNum* actuator_velocity; // actuator velocities (nu x 1)
// computed by mj_fwdVelocity/mj_comVel // computed by mj_fwdVelocity/mj_comVel
mjtNum* cvel; // com-based velocity [3D rot; 3D tran] (nbody x 6) mjtNum* cvel; // com-based velocity (rot:lin) (nbody x 6)
mjtNum* cdof_dot; // time-derivative of cdof (nv x 6) mjtNum* cdof_dot; // time-derivative of cdof (rot:lin) (nv x 6)
// computed by mj_fwdVelocity/mj_rne (without acceleration) // computed by mj_fwdVelocity/mj_rne (without acceleration)
mjtNum* qfrc_bias; // C(qpos,qvel) (nv x 1) mjtNum* qfrc_bias; // C(qpos,qvel) (nv x 1)
+3 -3
View File
@@ -265,7 +265,7 @@ struct mjData_ {
// computed by mj_fwdPosition/mj_comPos // computed by mj_fwdPosition/mj_comPos
mjtNum* subtree_com; // center of mass of each subtree (nbody x 3) mjtNum* subtree_com; // center of mass of each subtree (nbody x 3)
mjtNum* cdof; // com-based motion axis of each dof (nv x 6) mjtNum* cdof; // com-based motion axis of each dof (rot:lin) (nv x 6)
mjtNum* cinert; // com-based body inertia and mass (nbody x 10) mjtNum* cinert; // com-based body inertia and mass (nbody x 10)
// computed by mj_fwdPosition/mj_flex // computed by mj_fwdPosition/mj_flex
@@ -313,8 +313,8 @@ struct mjData_ {
mjtNum* actuator_velocity; // actuator velocities (nu x 1) mjtNum* actuator_velocity; // actuator velocities (nu x 1)
// computed by mj_fwdVelocity/mj_comVel // computed by mj_fwdVelocity/mj_comVel
mjtNum* cvel; // com-based velocity [3D rot; 3D tran] (nbody x 6) mjtNum* cvel; // com-based velocity (rot:lin) (nbody x 6)
mjtNum* cdof_dot; // time-derivative of cdof (nv x 6) mjtNum* cdof_dot; // time-derivative of cdof (rot:lin) (nv x 6)
// computed by mj_fwdVelocity/mj_rne (without acceleration) // computed by mj_fwdVelocity/mj_rne (without acceleration)
mjtNum* qfrc_bias; // C(qpos,qvel) (nv x 1) mjtNum* qfrc_bias; // C(qpos,qvel) (nv x 1)
+3 -3
View File
@@ -4493,7 +4493,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=PointerType( type=PointerType(
inner_type=ValueType(name='mjtNum'), inner_type=ValueType(name='mjtNum'),
), ),
doc='com-based motion axis of each dof (nv x 6)', # pylint: disable=line-too-long doc='com-based motion axis of each dof (rot:lin) (nv x 6)', # pylint: disable=line-too-long
), ),
StructFieldDecl( StructFieldDecl(
name='cinert', name='cinert',
@@ -4703,14 +4703,14 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=PointerType( type=PointerType(
inner_type=ValueType(name='mjtNum'), inner_type=ValueType(name='mjtNum'),
), ),
doc='com-based velocity [3D rot; 3D tran] (nbody x 6)', # pylint: disable=line-too-long doc='com-based velocity (rot:lin) (nbody x 6)', # pylint: disable=line-too-long
), ),
StructFieldDecl( StructFieldDecl(
name='cdof_dot', name='cdof_dot',
type=PointerType( type=PointerType(
inner_type=ValueType(name='mjtNum'), inner_type=ValueType(name='mjtNum'),
), ),
doc='time-derivative of cdof (nv x 6)', # pylint: disable=line-too-long doc='time-derivative of cdof (rot:lin) (nv x 6)', # pylint: disable=line-too-long
), ),
StructFieldDecl( StructFieldDecl(
name='qfrc_bias', name='qfrc_bias',