From 5107c31c061b0152221d3ec0b553f7b0baea8e48 Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Mon, 30 Mar 2026 05:11:55 -0700 Subject: [PATCH] Add missing API documentation entries. PiperOrigin-RevId: 891658745 Change-Id: I7fa4f0535e72eaaf8964ce3f1bcf4bf87486580a --- doc/APIreference/APIfunctions.rst | 2 + doc/APIreference/APItypes.rst | 77 +++++++++++++++++++++ doc/APIreference/functions.rst | 107 ++++++++++++++++++++++++++++++ include/mujoco/mujoco.h | 2 +- 4 files changed, 187 insertions(+), 1 deletion(-) diff --git a/doc/APIreference/APIfunctions.rst b/doc/APIreference/APIfunctions.rst index 962520b1..9686131d 100644 --- a/doc/APIreference/APIfunctions.rst +++ b/doc/APIreference/APIfunctions.rst @@ -42,6 +42,7 @@ API function can be classified as: - **Threads, Plugins, Derivatives** - :ref:`Derivatives`. + - :ref:`Signed Distance Functions`. - :ref:`Thread` |-| -related functions. - :ref:`Plugin` |-| -related functions. @@ -57,6 +58,7 @@ API function can be classified as: - :ref:`Attachment`. - :ref:`Tree elements`. - :ref:`Non-tree elements`. + - :ref:`Set actuator parameters`. - :ref:`Assets`. - :ref:`Find and get utilities`. - :ref:`Attribute setters`. diff --git a/doc/APIreference/APItypes.rst b/doc/APIreference/APItypes.rst index 5fc71074..b5fde31f 100644 --- a/doc/APIreference/APItypes.rst +++ b/doc/APIreference/APItypes.rst @@ -379,6 +379,26 @@ Types of data fields returned by contact sensors. .. mujoco-include:: mjtConDataField +.. _mjtRayDataField: + +mjtRayDataField +~~~~~~~~~~~~~~~ + +Data fields returned by rangefinder sensors. + +.. mujoco-include:: mjtRayDataField + + +.. _mjtCamOutBit: + +mjtCamOutBit +~~~~~~~~~~~~ + +Camera output type bitflags. These are used in ``m->cam_output``. + +.. mujoco-include:: mjtCamOutBit + + .. _mjtSameFrame: mjtSameFrame @@ -401,6 +421,16 @@ can override this choice. Only the user can set the ``INIT`` policy (initialized .. mujoco-include:: mjtSleepPolicy +.. _mjtLRMode: + +mjtLRMode +~~~~~~~~~ + +Mode for actuator length range computation. Used in ``mjLROpt.mode``. + +.. mujoco-include:: mjtLRMode + + .. _mjtFlexSelf: mjtFlexSelf @@ -779,6 +809,24 @@ Type of orientation specifier. .. mujoco-include:: mjtOrientation +.. _mjtMeshInertia: + +mjtMeshInertia +~~~~~~~~~~~~~~ + +Type of mesh inertia computation. + +.. mujoco-include:: mjtMeshInertia + +.. _mjtMeshBuiltin: + +mjtMeshBuiltin +~~~~~~~~~~~~~~ + +Type of built-in procedural mesh. + +.. mujoco-include:: mjtMeshBuiltin + .. _tyPluginEnums: @@ -919,6 +967,24 @@ Options for configuring the automatic :ref:`actuator length-range computation`. + +.. mujoco-include:: mjCache + +.. _mjtTaskStatus: + +mjtTaskStatus +~~~~~~~~~~~~~ + +Status values for :ref:`mjTask`. + +.. mujoco-include:: mjtTaskStatus + .. _mjTask: mjTask @@ -926,6 +992,7 @@ mjTask This is a representation of a task to be run asynchronously inside of an :ref:`mjThreadPool` . It is created in the :ref:`mju_threadPoolEnqueue` method of the :ref:`mjThreadPool` and is used to join the task at completion. +The ``status`` field uses values from :ref:`mjtTaskStatus`. .. mujoco-include:: mjTask @@ -1570,6 +1637,16 @@ triggered by the compiler and the engine during various phases of the computatio .. mujoco-include:: mjpPlugin +.. _mjSDF: + +mjSDF +~~~~~ + +Data structure used by the :ref:`Signed Distance Functions` API for computing distances and +gradients between SDF geoms. + +.. mujoco-include:: mjSDF + .. _mjpResourceProvider: mjpResourceProvider diff --git a/doc/APIreference/functions.rst b/doc/APIreference/functions.rst index 60819311..df6381f5 100644 --- a/doc/APIreference/functions.rst +++ b/doc/APIreference/functions.rst @@ -3126,6 +3126,37 @@ All outputs are optional. *Nullable:* ``Dquat``, ``Dvel``, ``Dscale`` +.. _Signeddistancefunction: + +Signed Distance Functions +^^^^^^^^^^^^^^^^^^^^^^^^^ +.. _mjc_getSDF: + +`mjc_getSDF <#mjc_getSDF>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjc_getSDF + +get sdf from geom id + +.. _mjc_distance: + +`mjc_distance <#mjc_distance>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjc_distance + +signed distance function + +.. _mjc_gradient: + +`mjc_gradient <#mjc_gradient>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjc_gradient + +gradient of sdf + .. _Plugins-api: Plugins @@ -4551,6 +4582,82 @@ Add default. *Nullable:* ``parent`` +.. _Setactuatorparameters: + +Set actuator parameters +^^^^^^^^^^^^^^^^^^^^^^^ +.. _mjs_setToMotor: + +`mjs_setToMotor <#mjs_setToMotor>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjs_setToMotor + +Set actuator to motor; return error if any. + +.. _mjs_setToPosition: + +`mjs_setToPosition <#mjs_setToPosition>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjs_setToPosition + +Set actuator to position; return error if any. + +.. _mjs_setToIntVelocity: + +`mjs_setToIntVelocity <#mjs_setToIntVelocity>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjs_setToIntVelocity + +Set actuator to integrated velocity; return error if any. + +.. _mjs_setToVelocity: + +`mjs_setToVelocity <#mjs_setToVelocity>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjs_setToVelocity + +Set actuator to velocity servo; return error if any. + +.. _mjs_setToDamper: + +`mjs_setToDamper <#mjs_setToDamper>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjs_setToDamper + +Set actuator to activate damper; return error if any. + +.. _mjs_setToCylinder: + +`mjs_setToCylinder <#mjs_setToCylinder>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjs_setToCylinder + +Set actuator to hydraulic or pneumatic cylinder; return error if any. + +.. _mjs_setToMuscle: + +`mjs_setToMuscle <#mjs_setToMuscle>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjs_setToMuscle + +Set actuator to muscle; return error if any.a + +.. _mjs_setToAdhesion: + +`mjs_setToAdhesion <#mjs_setToAdhesion>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mjs_setToAdhesion + +Set actuator to active adhesion; return error if any. + .. _AddAssets: Assets diff --git a/include/mujoco/mujoco.h b/include/mujoco/mujoco.h index 44455b86..362f16e9 100644 --- a/include/mujoco/mujoco.h +++ b/include/mujoco/mujoco.h @@ -1418,7 +1418,7 @@ MJAPI char* mju_strncpy(char *dst, const char *src, int n); MJAPI mjtNum mju_sigmoid(mjtNum x); -//---------------------------------- Signed Distance Function -------------------------------------- +//---------------------------------- Signed Distance Functions ------------------------------------- // get sdf from geom id MJAPI const mjpPlugin* mjc_getSDF(const mjModel* m, int id);