Delete testxml code sample.
PiperOrigin-RevId: 573202693 Change-Id: Ic8d284293bd5c51693415d4186bb0b72a5416dca
This commit is contained in:
committed by
Copybara-Service
parent
d88675a034
commit
fb4cf472ed
+9
-7
@@ -139,15 +139,17 @@ General
|
||||
:ref:`mjDEPTH_ZERONEAR` and :ref:`mjDEPTH_ZEROFAR`, which can be used to set the new ``readDepthMap`` attribute in
|
||||
:ref:`mjrContext`` to control how the depth returned by :ref:`mjr_readPixels` is mapped from ``znear`` to ``zfar``.
|
||||
`Contribution <https://github.com/google-deepmind/mujoco/pull/978>`__ by `Levi Burner <https://github.com/aftersomemath>`__.
|
||||
25. Deleted the code sample ``testxml``. The functionality provided by this utility is implemented in the
|
||||
`WriteReadCompare <https://github.com/google-deepmind/mujoco/blob/main/test/xml/xml_native_writer_test.cc>__ test.
|
||||
|
||||
Python bindings
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
25. Fixed `#870 <https://github.com/google-deepmind/mujoco/issues/870>`__ where calling ``update_scene`` with an invalid
|
||||
26. Fixed `#870 <https://github.com/google-deepmind/mujoco/issues/870>`__ where calling ``update_scene`` with an invalid
|
||||
camera name used the default camera.
|
||||
26. Added ``user_scn`` to the :ref:`passive viewer<PyViewerPassive>` handle, which allows users to add custom
|
||||
27. Added ``user_scn`` to the :ref:`passive viewer<PyViewerPassive>` handle, which allows users to add custom
|
||||
visualization geoms (`#1023 <https://github.com/google-deepmind/mujoco/issues/870>`__).
|
||||
27. Added optional boolean keyword arguments ``show_left_ui`` and ``show_right_ui`` to the functions ``viewer.launch``
|
||||
28. Added optional boolean keyword arguments ``show_left_ui`` and ``show_right_ui`` to the functions ``viewer.launch``
|
||||
and ``viewer.launch_passive``, which allow users to launch a viewer with UI panels hidden.
|
||||
|
||||
Simulate
|
||||
@@ -157,21 +159,21 @@ Simulate
|
||||
:align: right
|
||||
:width: 240px
|
||||
|
||||
28. Added **state history** mechanism to :ref:`simulate<saSimulate>` and the managed
|
||||
29. Added **state history** mechanism to :ref:`simulate<saSimulate>` and the managed
|
||||
:ref:`Python viewer<PyViewerManaged>`. State history can be viewed by scrubbing the History slider and (more
|
||||
precisely) with the left and right arrow keys. See screen capture:
|
||||
|
||||
29. The ``LOADING...`` label is now shown correctly.
|
||||
30. The ``LOADING...`` label is now shown correctly.
|
||||
`Contribution <https://github.com/google-deepmind/mujoco/pull/1070>`__ by
|
||||
`Levi Burner <https://github.com/aftersomemath>`__.
|
||||
|
||||
Bug fixes
|
||||
^^^^^^^^^
|
||||
|
||||
30. Fixed a bug that was causing :ref:`geom margin<body-geom-margin>` to be ignored during the construction of
|
||||
31. Fixed a bug that was causing :ref:`geom margin<body-geom-margin>` to be ignored during the construction of
|
||||
midphase collision trees.
|
||||
|
||||
31. Fixed a bug that was generating incorrect values in ``efc_diagApprox`` for weld equality constraints.
|
||||
32. Fixed a bug that was generating incorrect values in ``efc_diagApprox`` for weld equality constraints.
|
||||
|
||||
|
||||
Version 2.3.7 (July 20, 2023)
|
||||
|
||||
@@ -165,7 +165,7 @@ links below, to make this documentation self-contained.
|
||||
`mjxmacro.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjxmacro.h>`__
|
||||
This file is optional and is not included by mujoco.h. It defines :ref:`X Macros <tyXMacro>` that can
|
||||
automate the mapping of mjModel and mjData into scripting languages, as well as other operations that require
|
||||
accessing all fields of mjModel and mjData. See code sample :ref:`testxml.cc <saTestXML>`.
|
||||
accessing all fields of mjModel and mjData.
|
||||
`mjexport.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjexport.h>`__
|
||||
Macros used for exporting public symbols from the MuJoCo library. This header should not be used directly by client
|
||||
code.
|
||||
|
||||
@@ -26,28 +26,6 @@ profiling. The results are then printed in the console. To simulate controlled d
|
||||
one can either install the control callback :ref:`mjcb_control`, or set control signals
|
||||
explicitly as explained in the :ref:`simulation loop <siSimulation>` section below.
|
||||
|
||||
.. _saTestXML:
|
||||
|
||||
`testxml <https://github.com/google-deepmind/mujoco/blob/main/sample/testxml.cc>`_
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This code sample tests the parser, compiler and XML writer. The testing code does the following:
|
||||
|
||||
- Parse and compile a specified XML model in MJCF or URDF. This yields an mjModel structure ready for simulation;
|
||||
- Save the model as a temporary MJCF file, using a "canonical" subset of MJCF where a number of conversions have
|
||||
already been performed by the compiler;
|
||||
- Parse and compile the temporary MJCF file. This yields a second mjModel structure ready for simulation;
|
||||
- Compare the two mjModel structures field by field, and print the field with the largest numerical difference. Since
|
||||
MJCF is a text format, the real-valued numbers saved in it have lower precision than the double precision used
|
||||
internally, thus we cannot expect the two models to be identical on the bit level. But we can expect the largest
|
||||
difference to be on the order of 1e-6. A substantially larger difference indicates a bug in the parser, compiler or
|
||||
XML writer - and should be reported.
|
||||
|
||||
The code uses the :ref:`X Macros <tyXMacro>` described in the Reference chapter. This is a convenient way
|
||||
to apply the same operation to all fields in mjModel, without explicitly typing their names. The code sample
|
||||
:ref:`simulate.cc <saSimulate>` also uses X Macros to implement a watch, where the user can type the name of any mjData
|
||||
field which is resolved at runtime.
|
||||
|
||||
.. _saCompile:
|
||||
|
||||
`compile <https://github.com/google-deepmind/mujoco/blob/main/sample/compile.cc>`_
|
||||
|
||||
@@ -676,10 +676,7 @@ correct way to do it is the hard way:
|
||||
mju_copy(myqposqvel, d->qpos, m->nq + m->nv);
|
||||
|
||||
The :ref:`X Macros <tyXMacro>` defined in the optional header file ``mjxmacro.h`` can be used to automate allocation of
|
||||
data structure that match mjModel and mjData, for example when writing a MuJoCo wrapper for a scripting language. In
|
||||
the code sample :ref:`testxml.cc <saTestXML>` we use these unusual macros to compare all data arrays from two instances
|
||||
of mjModel and find the one with the largest difference. Apparently X Macros were invented in the 1960's for assembly
|
||||
language, and remain a great idea.
|
||||
data structure that match mjModel and mjData, for example when writing a MuJoCo wrapper for a scripting language.
|
||||
|
||||
.. _siStack:
|
||||
|
||||
@@ -841,13 +838,6 @@ forces are disabled) the underlying physical system is energy-conserving. In tha
|
||||
the total energy indicate inaccuracies in numerical integration. For such systems the Runge-Kutta integrator has much
|
||||
better performance than the default semi-implicit Euler integrator.
|
||||
|
||||
Finally, the user can implement additional diagnostics as needed. Two examples were provided in the code samples
|
||||
``testxml.cc`` and ``derivative.cc``, where we computed model mismatches after save and load, and assessed the accuracy
|
||||
of the numerical derivatives respectively. Key to such diagnostics is to implement two different algorithms or
|
||||
simulation paths that compute the same quantity, and compare the results numerically. This type of sanity check is
|
||||
essential when dealing with complex dynamical systems where we do not really know what the numerical output should be;
|
||||
if we knew that, we would not be using a simulator in the first place.
|
||||
|
||||
.. _siJacobian:
|
||||
|
||||
Jacobians
|
||||
|
||||
Reference in New Issue
Block a user