Sensors of type user no longer require objtype and objname. If unspecified, the objtype will be mjOBJ_UNKNOWN. Also, `user sensors datatype default is now "real"`.

PiperOrigin-RevId: 489652972
Change-Id: I0a8f21ee1a2f5292e6bbcfe3785536cfd1498b85
This commit is contained in:
Yuval Tassa
2022-11-19 02:04:53 -08:00
committed by Copybara-Service
parent 6f2092bef2
commit 221c63d744
8 changed files with 96 additions and 14 deletions
+6 -6
View File
@@ -3913,7 +3913,7 @@ at a specified body, in global coordinates.
.. _sensor-clock:
:el-prefix:`sensor/` **clock** (*)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This element creates sensor that returns the simulation time.
@@ -3934,12 +3934,12 @@ bodies whose center of mass is of interest.
:at:`name`, :at:`noise`, :at:`cutoff`, :at:`user`
See :ref:`CSensor`.
:at:`objtype`: :at-val:`(any element type that can be named), required`
:at:`objtype`: :at-val:`(any element type that can be named), optional`
Type of the MuJoCo object to which the sensor is attached. This together with the objname attribute determines the
actual object.
:at:`objname`: :at-val:`string, required`
actual object. If unspecified, will be :ref:`mjOBJ_UNKNOWN<mjtObj>`.
:at:`objname`: :at-val:`string, optional`
Name of the MuJoCo object to which the sensor is attached.
:at:`datatype`: :at-val:`[real, positive, axis, quaternion], required`
:at:`datatype`: :at-val:`[real, positive, axis, quaternion], "real"`
The type of output generated by this sensor. "axis" means a unit-length 3D vector. "quat" means a unit quaternion.
These need to be declared because when MuJoCo adds noise, it must respect the vector normalization. "real" means a
generic array (or scalar) of real values to which noise can be added independently.
@@ -3952,7 +3952,7 @@ bodies whose center of mass is of interest.
.. _keyframe:
**keyframe** (*)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
This is a grouping element for keyframe definitions. It does not have attributes. Keyframes can be used to create a
library of states that are of interest to the user, and to initialize the simulation state to one of the states in the