Improve sorting of samples in documentation.
PiperOrigin-RevId: 579847239 Change-Id: I392cd87b9a3e5616fcb10657db4ac81a38e430ed
This commit is contained in:
committed by
Copybara-Service
parent
8a5e2b19a8
commit
1881c2d881
+28
-27
@@ -73,33 +73,6 @@ Where the command line arguments are
|
|||||||
`start /affinity <https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/start>`__
|
`start /affinity <https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/start>`__
|
||||||
command on Windows (processor affinity cannot be specified through documented API means on macOS).
|
command on Windows (processor affinity cannot be specified through documented API means on macOS).
|
||||||
|
|
||||||
.. _saCompile:
|
|
||||||
|
|
||||||
`compile <https://github.com/google-deepmind/mujoco/blob/main/sample/compile.cc>`_
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
This code sample evokes the built-in parser and compiler. It implements all possible model conversions from (MJCF, URDF,
|
|
||||||
MJB) format to (MJCF, MJB, TXT) format. Models saved as MJCF use a canonical subset of our format as described in the
|
|
||||||
:doc:`../modeling` chapter, and therefore MJCF-to-MJCF conversion will generally result in a different file.
|
|
||||||
The TXT format is a human-readable road-map to the model. It cannot be loaded by MuJoCo, but can be a very useful aid
|
|
||||||
during model development. It is in one-to-one correspondence with the compiled mjModel. Note also that one can use the
|
|
||||||
function :ref:`mj_printData` to create a text file which is in one-to-one correspondence
|
|
||||||
with mjData, although this is not done by the code sample.
|
|
||||||
|
|
||||||
.. _saBasic:
|
|
||||||
|
|
||||||
`basic <https://github.com/google-deepmind/mujoco/blob/main/sample/basic.cc>`_
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
This code sample is a minimal interactive simulator. The model file must be provided as command-line argument. It
|
|
||||||
opens an OpenGL window using the platform-independent GLFW library, and renders the simulation state at 60 fps while
|
|
||||||
advancing the simulation in real-time. Press Backspace to reset the simulation. The mouse can be used to control the
|
|
||||||
camera: left drag to rotate, right drag to translate in the vertical plane, shift right drag to translate in the
|
|
||||||
horizontal plane, scroll or middle drag to zoom.
|
|
||||||
|
|
||||||
The :ref:`Visualization` programming guide below explains how visualization works. This code sample is a minimal
|
|
||||||
illustration of the concepts in that guide.
|
|
||||||
|
|
||||||
.. _saSimulate:
|
.. _saSimulate:
|
||||||
|
|
||||||
`simulate <https://github.com/google-deepmind/mujoco/blob/main/simulate>`_
|
`simulate <https://github.com/google-deepmind/mujoco/blob/main/simulate>`_
|
||||||
@@ -112,6 +85,7 @@ functionality. This code sample uses the native UI to render various controls, a
|
|||||||
illustration of how the new UI framework is intended to be used. Below is a screen-capture of ``simulate`` in action:
|
illustration of how the new UI framework is intended to be used. Below is a screen-capture of ``simulate`` in action:
|
||||||
|
|
||||||
.. youtube:: 0ORsj_E17B0
|
.. youtube:: 0ORsj_E17B0
|
||||||
|
:width: 95%
|
||||||
:align: center
|
:align: center
|
||||||
|
|
||||||
Interaction is done with the mouse; built-in help with a summary of available commands is available by pressing the
|
Interaction is done with the mouse; built-in help with a summary of available commands is available by pressing the
|
||||||
@@ -140,6 +114,33 @@ power settings, the OS may reduce the CPU frequency; this is because :ref:`simul
|
|||||||
the time in order to slow down to realtime. This results in inaccurate timings. To avoid this problem, change the
|
the time in order to slow down to realtime. This results in inaccurate timings. To avoid this problem, change the
|
||||||
Windows power plan so that the minimum processor state is 100%.
|
Windows power plan so that the minimum processor state is 100%.
|
||||||
|
|
||||||
|
.. _saCompile:
|
||||||
|
|
||||||
|
`compile <https://github.com/google-deepmind/mujoco/blob/main/sample/compile.cc>`_
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
This code sample evokes the built-in parser and compiler. It implements all possible model conversions from (MJCF, URDF,
|
||||||
|
MJB) format to (MJCF, MJB, TXT) format. Models saved as MJCF use a canonical subset of our format as described in the
|
||||||
|
:doc:`../modeling` chapter, and therefore MJCF-to-MJCF conversion will generally result in a different file.
|
||||||
|
The TXT format is a human-readable road-map to the model. It cannot be loaded by MuJoCo, but can be a very useful aid
|
||||||
|
during model development. It is in one-to-one correspondence with the compiled mjModel. Note also that one can use the
|
||||||
|
function :ref:`mj_printData` to create a text file which is in one-to-one correspondence
|
||||||
|
with mjData, although this is not done by the code sample.
|
||||||
|
|
||||||
|
.. _saBasic:
|
||||||
|
|
||||||
|
`basic <https://github.com/google-deepmind/mujoco/blob/main/sample/basic.cc>`_
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
This code sample is a minimal interactive simulator. The model file must be provided as command-line argument. It
|
||||||
|
opens an OpenGL window using the platform-independent GLFW library, and renders the simulation state at 60 fps while
|
||||||
|
advancing the simulation in real-time. Press Backspace to reset the simulation. The mouse can be used to control the
|
||||||
|
camera: left drag to rotate, right drag to translate in the vertical plane, shift right drag to translate in the
|
||||||
|
horizontal plane, scroll or middle drag to zoom.
|
||||||
|
|
||||||
|
The :ref:`Visualization` programming guide below explains how visualization works. This code sample is a minimal
|
||||||
|
illustration of the concepts in that guide.
|
||||||
|
|
||||||
.. _saRecord:
|
.. _saRecord:
|
||||||
|
|
||||||
`record <https://github.com/google-deepmind/mujoco/blob/main/sample/record.cc>`_
|
`record <https://github.com/google-deepmind/mujoco/blob/main/sample/record.cc>`_
|
||||||
|
|||||||
Reference in New Issue
Block a user