From 8c22181156f5eb5232f30ab7d96b5951187f7e02 Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Mon, 27 Jan 2025 10:57:06 -0800 Subject: [PATCH] Fix documentation typos. PiperOrigin-RevId: 720232771 Change-Id: I176db4d4168c37b2819df14b439c4cde838e2025 --- doc/APIreference/APItypes.rst | 4 +-- doc/APIreference/functions.rst | 2 +- doc/APIreference/functions_override.rst | 2 +- doc/XMLreference.rst | 18 ++++++------- doc/changelog.rst | 12 ++++----- doc/computation/fluid.rst | 2 +- doc/computation/index.rst | 12 ++++----- doc/mjx.rst | 2 +- doc/modeling.rst | 12 ++++----- doc/overview.rst | 4 +-- doc/programming/modeledit.rst | 2 +- doc/python.rst | 35 ++++++++++++++----------- doc/templates/layout.html | 6 ++--- doc/unity.rst | 2 +- 14 files changed, 59 insertions(+), 56 deletions(-) diff --git a/doc/APIreference/APItypes.rst b/doc/APIreference/APItypes.rst index 3f11ee5e..7e2befa0 100644 --- a/doc/APIreference/APItypes.rst +++ b/doc/APIreference/APItypes.rst @@ -28,7 +28,7 @@ MuJoCo defines a large number of types: - :ref:`mjOption` (embedded in :ref:`mjModel`). - :ref:`mjData`. - - :ref:`Auxillary struct types`, also used by the engine. + - :ref:`Auxiliary struct types`, also used by the engine. - Structs for collecting :ref:`simulation statistics`. - Structs for :ref:`abstract visualization`. - Structs used by the :ref:`openGL renderer`. @@ -752,7 +752,7 @@ modifiable inputs and write their outputs. .. _tyAuxStructure: -Auxillary +Auxiliary ^^^^^^^^^ These struct types are used in the engine and their names are prefixed with ``mj``. :ref:`mjVisual` diff --git a/doc/APIreference/functions.rst b/doc/APIreference/functions.rst index 19d792fd..e2f922c7 100644 --- a/doc/APIreference/functions.rst +++ b/doc/APIreference/functions.rst @@ -504,7 +504,7 @@ found, the function will return ``distmax`` and ``fromto``, if given, will be se .. TODO: b/339596989 - Improve mjc_Convex. For some colliders, a large, positive ``distmax`` will result in an accurate measurement. However, for collision - pairs which use the general ``mjc_Convex`` collider, the result will be approximate and likely innacurate. + pairs which use the general ``mjc_Convex`` collider, the result will be approximate and likely inaccurate. This is considered a bug to be fixed in a future release. In order to determine whether a geom pair uses ``mjc_Convex``, inspect the table at the top of `engine_collision_driver.c `__. diff --git a/doc/APIreference/functions_override.rst b/doc/APIreference/functions_override.rst index d34fa3f9..9d425623 100644 --- a/doc/APIreference/functions_override.rst +++ b/doc/APIreference/functions_override.rst @@ -228,7 +228,7 @@ found, the function will return ``distmax`` and ``fromto``, if given, will be se .. TODO: b/339596989 - Improve mjc_Convex. For some colliders, a large, positive ``distmax`` will result in an accurate measurement. However, for collision - pairs which use the general ``mjc_Convex`` collider, the result will be approximate and likely innacurate. + pairs which use the general ``mjc_Convex`` collider, the result will be approximate and likely inaccurate. This is considered a bug to be fixed in a future release. In order to determine whether a geom pair uses ``mjc_Convex``, inspect the table at the top of `engine_collision_driver.c `__. diff --git a/doc/XMLreference.rst b/doc/XMLreference.rst index 9a8a6e5d..3daec8d9 100644 --- a/doc/XMLreference.rst +++ b/doc/XMLreference.rst @@ -591,7 +591,7 @@ from its default. .. _option-flag-autoreset: :at:`autoreset`: :at-val:`[disable, enable], "enable"` - This flag disables the automatic reseting of the simulation state when numerical issues are detected. + This flag disables the automatic resetting of the simulation state when numerical issues are detected. .. _option-flag-override: @@ -604,7 +604,7 @@ from its default. This flag enables the computation of potential and kinetic energy in ``mjData.energy[0, 1]`` respectively, and displayed in the simulate GUI info overlay. Potential energy includes the gravitational component summed over all bodies :math:`\sum_b m_b g h` and energy stored in passive springs in joints, tendons and flexes - :math:`\tfrac{1}{2} k x^2`, where :math:`x` is the displacement and and :math:`k` is the spring constant. Kinetic + :math:`\tfrac{1}{2} k x^2`, where :math:`x` is the displacement and :math:`k` is the spring constant. Kinetic energy is given by :math:`\tfrac{1}{2} v^T M v`, where :math:`v` is the velocity and :math:`M` is the mass matrix. Note that potential and kinetic energy in constraints is not accounted for. @@ -1271,7 +1271,7 @@ The full list of processing steps applied by the compiler to each mesh is as fol :at:`maxhullvert`: :at-val:`int, "-1"` Maximum number of vertices in a mesh's convex hull. Currently this is implemented by asking qhull - `to teminate `__ after :at:`maxhullvert` vertices. The default + `to terminate `__ after :at:`maxhullvert` vertices. The default value of -1 means "unlimited". Positive values must be larger than 3. .. _asset-mesh-vertex: @@ -2122,7 +2122,7 @@ rotations as unit quaternions. (``mjData.qfrc_actuator``) rather than passive forces (``mjData.qfrc_passive``). Notionally, this means that gravity compensation is the result of a control system rather than natural buoyancy. In practice, enabling this flag is useful when joint-level actuator force clamping is used. In this case, the total actuation force applied on a joint, - including gravity compensation, is guaranteed to not exceeed the specified limits. See :ref:`CForceRange` and + including gravity compensation, is guaranteed to not exceed the specified limits. See :ref:`CForceRange` and :ref:`actuatorfrcrange` for more details on this type of force limit. .. _body-joint-margin: @@ -2505,7 +2505,7 @@ helps clarify the role of bodies and geoms in MuJoCo. `. The frame position is in the middle between the end points. If this attribute is specified, the remaining position and orientation-related attributes are ignored. The image on the right demonstrates use of :at:`fromto` with the four supported geoms, using identical Z values. The model is `here <_static/fromto.xml>`__. - Note that the :at:`fromto` semantics of *capsule* are unique: the two end points specify the segement around which + Note that the :at:`fromto` semantics of *capsule* are unique: the two end points specify the segment around which the radius defines the capsule surface. .. _body-geom-pos: @@ -2736,7 +2736,7 @@ and the +Y axis points up. Thus the frame position and orientation are the key a :at:`mode`: :at-val:`[fixed, track, trackcom, targetbody, targetbodycom], "fixed"` This attribute specifies how the camera position and orientation in world coordinates are computed in forward kinematics (which in turn determine what the camera sees). "fixed" means that the position and orientation specified - below are fixed relative to the the body where the camera is defined. "track" means that the camera position is at a + below are fixed relative to the body where the camera is defined. "track" means that the camera position is at a constant offset from the body in world coordinates, while the camera orientation is constant in world coordinates. These constants are determined by applying forward kinematics in qpos0 and treating the camera as fixed. Tracking can be used for example to position a camera above a body, point it down so it sees the body, and have it always remain @@ -4052,7 +4052,7 @@ cases, the user will specify a :el:`flexcomp` which will then automatically cons which is why the number of indices equals (dim+1) times the number of elements. In 2D, the vertices should be listed in counter-clockwise order. In 1D and 3D the order is irrelevant; in 3D the model compiler will rearrange the vertices as needed. Repeated vertex indices within a flex element are not allowed. The topology of the flex is not - enforced; it could corespond to a continuous soft body, or a collection of disconnected stretchable elements, or + enforced; it could correspond to a continuous soft body, or a collection of disconnected stretchable elements, or anything in-between. .. _deformable-flex-flatskin: @@ -4140,7 +4140,7 @@ stress-strain relationship.. See also :ref:`deformable ` objects. :at:`thickness`: :at-val:`real(1), "-1"` Shell thickness, units of length; only for used 2D flexes. Used to scale the stretching stiffness. This thickness can be set equal to 2 times the :ref:`radius ` in order to match the geometry, - but is exposed seperately since the radius might be constrained by considerations related to collision detection. + but is exposed separately since the radius might be constrained by considerations related to collision detection. .. _flex-contact: @@ -7099,7 +7099,7 @@ pipeline. These 3 sensors share some common properties: .. TODO: b/339596989 - Improve mjc_Convex. For some colliders, a positive :at:`cutoff` will result in an accurate measurement. However, for collision - pairs which use the general ``mjc_Convex`` collider, the result will be approximate and likely innacurate. + pairs which use the general ``mjc_Convex`` collider, the result will be approximate and likely inaccurate. This is considered a bug to be fixed in a future release. In order to determine whether a geom pair uses ``mjc_Convex``, inspect the table at the top of `engine_collision_driver.c `__. diff --git a/doc/changelog.rst b/doc/changelog.rst index 697604b9..00c92e4d 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -88,7 +88,7 @@ General 4. The not-useful ``convexhull`` compiler option (to disable computation of mesh convex hulls) has been removed. 5. Removed the deprecated ``mju_rotVecMat``, ``mju_rotVecMatT`` and ``mjv_makeConnector`` functions. 6. Sorting now uses a faster, native sort function (fixes :github:issue:`1638`). -7. The PBR texture layers introduced in 3.2.1 were refactored from seperate sub-elements to a single +7. The PBR texture layers introduced in 3.2.1 were refactored from separate sub-elements to a single :ref:`layer` sub-element. 8. The composite types box, cylinder, and sphere have been removed. Users should instead use the equivalent types available in :ref:`flexcomp`. @@ -178,7 +178,7 @@ General 4. Added the :ref:`nativeccd` flag. When this flag is enabled, general convex collision detection is handled with a new native code path, rather than `libccd `__. - This feature is in early stages of testing, but users who've experienced issues related to collsion detection are + This feature is in early stages of testing, but users who've experienced issues related to collision detection are welcome to experiment with it and report any issues. .. youtube:: kcM_oauk3ZA @@ -316,7 +316,7 @@ General The older functions have been removed from the Python bindings and will be removed from the C API in the next release. 5. Removed the ``actuator_actdim`` callback from actuator plugins. They now have the ``actdim`` attribute, which - must be used with actuators that write state to the ``act`` array. This fixed a crash which happend when + must be used with actuators that write state to the ``act`` array. This fixed a crash which happened when keyframes were used in a model with stateful actuator plugins. The PID plugin will give an error when the wrong value of actdim is provided. @@ -577,7 +577,7 @@ General 1. Improved the :ref:`discardvisual` compiler flag, which now discards all visual-only assets. See :ref:`discardvisual` for details. 2. Removed the :ref:`timer` for midphase colllision detection, it is now folded in with the narrowphase - timer. This is because timing the two phases seperately required fine-grained timers inside the collision + timer. This is because timing the two phases separately required fine-grained timers inside the collision functions; these functions are so small and fast that the timer itself was incurring a measurable cost. 3. Added the flag :ref:`bvactive` to ``visual/global``, allowing users to turn off visualisation of active bounding volumes (the red/green boxes in this :ref:`this changelog item`). For @@ -1050,7 +1050,7 @@ Simulate :width: 240px 6. Added Visualization tab to simulate UI, corresponding to elements of the :ref:`visual` MJCF element. After - modifying values in the GUI, a saved XML will contain the new values. The modifyable members of + modifying values in the GUI, a saved XML will contain the new values. The modifiable members of :ref:`mjStatistic` (:ref:`extent`, :ref:`meansize` and :ref:`center`) are computed by the compiler and therefore do not have defaults. In order for these attributes to appear in the saved XML, a value must be specified in the loaded XML. @@ -1169,7 +1169,7 @@ Python bindings passive viewer now also requires an explicit call to ``sync`` on its handle to pick up any update to the physics state. This is to avoid race conditions that can result in visual artifacts. See :ref:`documentation` for details. -#. The ``viewer.launch_repl`` function has been removed since its functionality is superceded by ``launch_passive``. +#. The ``viewer.launch_repl`` function has been removed since its functionality is superseded by ``launch_passive``. #. Added a small number of missing struct fields discovered through the new ``introspect`` metadata. Bug fixes diff --git a/doc/computation/fluid.rst b/doc/computation/fluid.rst index b006f758..24c259c2 100644 --- a/doc/computation/fluid.rst +++ b/doc/computation/fluid.rst @@ -135,7 +135,7 @@ also disables the inertia-based model for the parent body. The Elements of the model are a generalization of :cite:t:`andersen2005b` to 3 dimensions. The force :math:`\mathbf{f}_{\text{ellipsoid}}` and torque :math:`\mathbf{g}_{\text{ellipsoid}}` exerted by the fluid onto the solid are -the sum of of the terms +the sum of the terms .. math:: \begin{align*} diff --git a/doc/computation/index.rst b/doc/computation/index.rst index 048ac199..f6e84273 100644 --- a/doc/computation/index.rst +++ b/doc/computation/index.rst @@ -241,7 +241,7 @@ The computation of the constraint force is the hard part and will be described l description of the general framework by summarizing how the above quantities up to the constraint Jacobian are computed. - The applied force :math:`\tau` includes :ref:`passive ` forces from spring-dampers and fluid dynamics, - :ref:`actuation ` forces, and additonal forces specified by the user. + :ref:`actuation ` forces, and additional forces specified by the user. - The bias force :math:`c` includes Coriolis, centrifugal and gravitational forces. Their sum is computed using the Recursive Newton-Euler (RNE) algorithm with acceleration set to 0. - The joint-space inertia matrix :math:`M` is computed using the Composite Rigid-Body (CRB) algorithm. This matrix is @@ -414,7 +414,7 @@ with MuJoCo's operation as long as such user forces depend only on position and MuJoCo can compute three types of passive forces: -- Spring-dampers in joints and tendons. See the following attribues for details. +- Spring-dampers in joints and tendons. See the following attributes for details. |br| **Joints:** :ref:`stiffness`, :ref:`springref`, :ref:`damping`, :ref:`springdamper`. @@ -576,8 +576,8 @@ Fast implicit-in-velocity (``implicitfast``) increased stability, and is therefore a strict improvement. It is the recommended integrator for most models. **implicit**: The benefit over ``implicitfast`` is the implicit integration of Coriolis and centripetal forces, including - gyroscopic forces. The most common case where integrating such forces implicitly leads to noticable improvement is - when free objects with assymetric inertia are spinning quickly. `gyroscopic.xml <../_static/gyroscopic.xml>`__ + gyroscopic forces. The most common case where integrating such forces implicitly leads to noticeable improvement is + when free objects with asymmetric inertia are spinning quickly. `gyroscopic.xml <../_static/gyroscopic.xml>`__ shows an ellipsoid rolling on an inclined plane which quickly diverges with ``implicitfast`` but is stable with ``implicit``. **RK4**: @@ -646,7 +646,7 @@ Control: ``ctrl`` generalized forces directly (stateless actuators), or affect the actuator activations in ``mjData.act``, which then produce forces. -Auxillary Controls: ``qfrc_applied`` and ``xfrc_applied`` +Auxiliary Controls: ``qfrc_applied`` and ``xfrc_applied`` | ``mjData.qfrc_applied`` are directly applied generalized forces. | ``mjData.xfrc_applied`` are Cartesian wrenches applied to the CoM of individual bodies. This field is used for example, by the :ref:`native viewer` to apply mouse perturbations. @@ -1722,7 +1722,7 @@ The top-level function :ref:`mj_inverse` invokes the following sequence of compu Derivatives ----------- -MuJoCo's entire computational pipline including its constraint solver are analytically differentiable in principle. +MuJoCo's entire computational pipeline including its constraint solver are analytically differentiable in principle. Writing efficient implementations of these derivatives is a long term goal of the development team. Analytic derivatives of the smooth dynamics (excluding constraints) with respect to velocity are already computed and enable the two :ref:`implicit integrators`. diff --git a/doc/mjx.rst b/doc/mjx.rst index cc50fe2e..55f9aab3 100644 --- a/doc/mjx.rst +++ b/doc/mjx.rst @@ -50,7 +50,7 @@ The recommended way to install this package is via `PyPI ` attribute, which can be changed at runtime by setting the :ref:`mjOption.disableactuator` integer bitfield, allows the user to disable sets of actuators according to their :ref:`group`. This feature is convenient when one would like to use multiple types of -actuators for the same kinematic tree. For example consider a robot with firmware that supports mutiple control modes +actuators for the same kinematic tree. For example consider a robot with firmware that supports multiple control modes e.g., torque-control and position-control. In this case, one can define both types of actuators in the same MJCF model, assigning one type of actuator to group 0 and the other to group 1. @@ -1452,7 +1452,7 @@ elements available in MuJoCo. In addition to standard URDF files, MuJoCo can loa viewpoint of URDF) :el:`mujoco` element as a child of the top-level element :el:`robot`. This custom element can have sub-elements :ref:`compiler `, :ref:`option