From 5fe485064397cc8b825ff28ae7d28ec32df3ad86 Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Mon, 28 Aug 2023 10:22:52 -0700 Subject: [PATCH] Improve `mj_jac` documentation. Fixes #994 PiperOrigin-RevId: 560748977 Change-Id: Ic776d6450175a6620eb32ab8631dcca68c3088df --- doc/APIreference/functions.rst | 13 +++++++------ doc/APIreference/functions_override.rst | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/doc/APIreference/functions.rst b/doc/APIreference/functions.rst index 82ad9370..a80982ab 100644 --- a/doc/APIreference/functions.rst +++ b/doc/APIreference/functions.rst @@ -244,12 +244,13 @@ mj_jac .. mujoco-include:: mj_jac -This function computes an "end-effector" Jacobian, which is unrelated to the constraint Jacobian above. Any MuJoCo body -can be treated as end-effector, and the point for which the Jacobian is computed can be anywhere in space (it is treated -as attached to the body). The Jacobian has translational (jacp) and rotational (jacr) components. Passing NULL for -either pointer will skip part of the computation. Each component is a 3-by-nv matrix. Each row of this matrix is the -gradient of the corresponding 3D coordinate of the specified point with respect to the degrees of freedom. The ability -to compute end-effector Jacobians analytically is one of the advantages of working in minimal coordinates - so use it! +This function computes an end-effector kinematic Jacobian, describing the local linear relationship between the +degrees-of-freedom and a given point. Given a body specified by its integer id (``body``) and a 3D point in the world +frame (``point``) treated as attached to the body, the Jacobian has both translational (``jacp``) and rotational +(``jacr``) components. Passing ``NULL`` for either pointer will skip that part of the computation. Each component is a +3-by-nv matrix. Each row of this matrix is the gradient of the corresponding coordinate of the specified point with +respect to the degrees-of-freedom. The ability to compute end-effector Jacobians efficiently and analytically is one of +the advantages of working in minimal coordinates. .. _mj_jacBody: diff --git a/doc/APIreference/functions_override.rst b/doc/APIreference/functions_override.rst index c749668a..9152d5b7 100644 --- a/doc/APIreference/functions_override.rst +++ b/doc/APIreference/functions_override.rst @@ -128,12 +128,13 @@ space. .. _mj_jac: -This function computes an "end-effector" Jacobian, which is unrelated to the constraint Jacobian above. Any MuJoCo body -can be treated as end-effector, and the point for which the Jacobian is computed can be anywhere in space (it is treated -as attached to the body). The Jacobian has translational (jacp) and rotational (jacr) components. Passing NULL for -either pointer will skip part of the computation. Each component is a 3-by-nv matrix. Each row of this matrix is the -gradient of the corresponding 3D coordinate of the specified point with respect to the degrees of freedom. The ability -to compute end-effector Jacobians analytically is one of the advantages of working in minimal coordinates - so use it! +This function computes an end-effector kinematic Jacobian, describing the local linear relationship between the +degrees-of-freedom and a given point. Given a body specified by its integer id (``body``) and a 3D point in the world +frame (``point``) treated as attached to the body, the Jacobian has both translational (``jacp``) and rotational +(``jacr``) components. Passing ``NULL`` for either pointer will skip that part of the computation. Each component is a +3-by-nv matrix. Each row of this matrix is the gradient of the corresponding coordinate of the specified point with +respect to the degrees-of-freedom. The ability to compute end-effector Jacobians efficiently and analytically is one of +the advantages of working in minimal coordinates. .. _mj_jacBody: