From f85cfb8ed238e08002578fce547b073cc0be6f5c Mon Sep 17 00:00:00 2001 From: Kevin Zakka Date: Tue, 4 Oct 2022 07:07:21 -0700 Subject: [PATCH] Fix broken simulate links. PiperOrigin-RevId: 478775551 Change-Id: I1c4f43c7cbe01f267948f5915a7511744eb0d158 --- doc/APIreference.rst | 30 ++++++++++++++------------- doc/XMLreference.rst | 12 +++++------ doc/modeling.rst | 19 +++++++++--------- doc/overview.rst | 3 +-- doc/programming.rst | 48 +++++++++++++++++++++----------------------- simulate/README.md | 10 +++++++++ 6 files changed, 64 insertions(+), 58 deletions(-) create mode 100644 simulate/README.md diff --git a/doc/APIreference.rst b/doc/APIreference.rst index 9e689ec0..9b33a285 100644 --- a/doc/APIreference.rst +++ b/doc/APIreference.rst @@ -723,7 +723,7 @@ mjtMouse | Defined in `mjvisualize.h `_ | These are the mouse actions that the abstract visualizer recognizes. It is up to the user to intercept mouse events - and translate them into these actions, as illustrated in ``simulate.cc``. + and translate them into these actions, as illustrated in :ref:`simulate.cc `. .. _mjtPertBit: @@ -2960,9 +2960,9 @@ mjcb_time extern mjfTime mjcb_time; Installing this callback enables the built-in profiler, and keeps timing statistics in ``mjData.timer``. The return type -is mjtNum, while the time units are up to the user. ``simulate.cc`` assumes the unit is 1 millisecond. In order to be -useful, the callback should use high-resolution timers with at least microsecond precision. This is because the -computations being timed are very fast. +is mjtNum, while the time units are up to the user. :ref:`simulate.cc ` assumes the unit is 1 millisecond. +In order to be useful, the callback should use high-resolution timers with at least microsecond precision. This is +because the computations being timed are very fast. .. _mjcb_act_dyn: @@ -3029,8 +3029,8 @@ String constants ^^^^^^^^^^^^^^^^ The string constants described here are provided for user convenience. They correspond to the English names of lists of -options, and can be displayed in menus or dialogs in a GUI. The code sample :ref:`saSimulate` illustrates how they can -be used. +options, and can be displayed in menus or dialogs in a GUI. The code sample :ref:`simulate.cc ` illustrates +how they can be used. .. _mjDISABLESTRING: @@ -3104,7 +3104,7 @@ mjVISSTRING | [1]: the string "0" or "1" indicating if the flag is on or off by default, as set by :ref:`mjv_defaultOption`; -| [2]: one-character string with a suggested keyboard shortcut, used in ``simulate.cc``. +| [2]: one-character string with a suggested keyboard shortcut, used in :ref:`simulate.cc `. .. _mjRNDSTRING: @@ -3239,9 +3239,10 @@ API functions The main header `mujoco.h `_ exposes a very large number of functions. However the functions that most users are likely to need are a small fraction. For example, -``simulate.cc`` which is as elaborate as a MuJoCo application is likely to get, calls around 40 of these functions, -while ``basic.cc`` calls around 20. The rest are explosed just in case someone has a use for them. This includes us as -users of MuJoCo -- we do our own work with the public library instead of relying on internal builds. +:ref:`simulate.cc ` which is as elaborate as a MuJoCo application is likely to get, calls around 40 +of these functions, while ``basic.cc`` calls around 20. The rest are explosed just in case someone has a use for +them. This includes us as users of MuJoCo -- we do our own work with the public library instead of relying on +internal builds. .. _Activation: @@ -4712,7 +4713,7 @@ Interaction ^^^^^^^^^^^ These function implement abstract mouse interactions, allowing control over cameras and perturbations. Their use is well -illustrated in ``simulate.cc``. +illustrated in :ref:`simulate.cc `. .. _mjv_defaultCamera: @@ -4915,7 +4916,7 @@ This function is used for mouse selection. Previously selection was done via Ope ray intersections which are much more efficient. aspectratio is the viewport width/height. relx and rely are the relative coordinates of the 2D point of interest in the viewport (usually mouse cursor). The function returns the id of the geom under the specified 2D point, or -1 if there is no geom (note that they skybox if present is not a model geom). -The 3D coordinates of the clicked point are returned in selpnt. See ``simulate.cc`` for an illustration. +The 3D coordinates of the clicked point are returned in selpnt. See :ref:`simulate.cc ` for an illustration. .. _Visualization-api: @@ -4924,7 +4925,7 @@ Visualization The functions in this section implement abstract visualization. The results are used by the OpenGL rendered, and can also be used by users wishing to implement their own rendered, or hook up MuJoCo to advanced rendering tools such as -Unity or Unreal Engine. See ``simulate.cc`` for illustration of how to use these functions. +Unity or Unreal Engine. See :ref:`simulate.cc ` for illustration of how to use these functions. .. _mjv_defaultOption: @@ -5069,7 +5070,8 @@ Update skins. OpenGL rendering ^^^^^^^^^^^^^^^^ -These functions expose the OpenGL renderer. See ``simulate.cc`` for illustration of how to use these functions. +These functions expose the OpenGL renderer. See :ref:`simulate.cc ` for an illustration +of how to use these functions. .. _mjr_defaultContext: diff --git a/doc/XMLreference.rst b/doc/XMLreference.rst index 2dd6cb07..86457ae7 100644 --- a/doc/XMLreference.rst +++ b/doc/XMLreference.rst @@ -116,8 +116,7 @@ how to use includes and how to modularize large files if desired. The unique top-level element, identifying the XML file as an MJCF model file. :at:`model`: :at-val:`string, "MuJoCo Model"` - The name of the model. This name is shown in the title bar of `simulate.cc - `_. + The name of the model. This name is shown in the title bar of :ref:`simulate.cc `. .. _compiler: @@ -606,9 +605,9 @@ is effectively a miscellaneous subsection. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This element specifies settings that affect the quality of the rendering. Larger values result in higher quality but -possibly slower speed. Note that `simulate.cc `_ -displays the frames per second (FPS). The target FPS is 60 Hz; if the number shown in the visualizer is substantially -lower, this means that the GPU is over-loaded and the visualization should somehow be simplified. +possibly slower speed. Note that :ref:`simulate.cc ` displays the frames per second (FPS). The target FPS is 60 Hz; if the +number shown in the visualizer is substantially lower, this means that the GPU is over-loaded and the visualization +should somehow be simplified. :at:`shadowsize`: :at-val:`int, "4096"` This attribute specifies the size of the square texture used for shadow mapping. Higher values result is smoother @@ -3908,8 +3907,7 @@ the nkey attribute of :ref:`size `, and the number of elements defined her defined here, the undefined keyframes have all their data set to 0, except for the qpos attribute which is set to mjModel.qpos0. The user can also set keyframe data in mjModel at runtime; this data will then appear in the saved MJCF model. Note that -in `simulate.cc `_ the simulation state can be copied -into a selected keyframe and vice versa. +in :ref:`simulate.cc ` the simulation state can be copied into a selected keyframe and vice versa. .. _key: diff --git a/doc/modeling.rst b/doc/modeling.rst index 2612cf81..44ae8625 100644 --- a/doc/modeling.rst +++ b/doc/modeling.rst @@ -58,8 +58,8 @@ exceptions; the user can implement similar error-interception functionality at r The entire process of parsing and compilation is very fast - less than a second if the model does not contain large meshes or actuator lengthranges that need to be computed via simulation. This makes it possible to design models -interactively, by re-loading often and visualizing the changes. Note that the `simulate.cc`_ code sample has a -keyboard shortcut for re-loading the current model (Ctrl+L). +interactively, by re-loading often and visualizing the changes. Note that the :ref:`simulate.cc ` code +sample has a keyboard shortcut for re-loading the current model (Ctrl+L). .. _Save: @@ -493,8 +493,8 @@ There is also a second Noslip solver, which is a post-processing step enabled by noslip iterations. All these algorithm settings can be specified in the :ref:`option