File size: 2,436 Bytes
2c55b92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.. raw:: html

    <div id="fetchlines"/>


.. _API:

=========
Functions
=========

The main header `mujoco.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mujoco.h>`_ exposes a
large number of functions. However the functions that most users are likely to need are a small fraction.

API function can be classified as:

- **Main entry points**
   - :ref:`Parse and compile<Parseandcompile>` an :ref:`mjModel` from XML files and assets.
   - :ref:`Main simulation<Mainsimulation>` entry points, including :ref:`mj_step`.

- **Support functions**
   - :ref:`Support<Support>` functions requiring :ref:`mjModel` and :ref:`mjData`.
   - Pipeline :ref:`components<Components>`, called from :ref:`mj_step`, :ref:`mj_forward` and :ref:`mj_inverse`.
   - :ref:`Sub components<Subcomponents>` of the simulation pipeline.
   - :ref:`Ray casting<Raycollisions>`.
   - :ref:`Printing<Printing>` of various quantities.
   - :ref:`Virtual file system<Virtualfilesystem>`, used to load assets from memory.
   - :ref:`Initialization<Initialization>` of data structures.
   - :ref:`Error and memory<Errorandmemory>`.
   - :ref:`Miscellaneous<Miscellaneous>` functions.

- **Visualization, Rendering, UI**
   - :ref:`Abstract interaction<Interaction>`: mouse control of cameras and perturbations.
   - :ref:`Abstract Visualization<Visualization-api>`.
   - :ref:`OpenGL rendering<OpenGLrendering>`.
   - :ref:`UI framework<UIframework>`.

- **Threads, Plugins, Derivatives**
   - :ref:`Derivatives<Derivatives-api>`.
   - :ref:`Thread<Thread>` |-| -related functions.
   - :ref:`Plugin<Plugins-api>` |-| -related functions.

- **Math**
   - Aliases for C :ref:`standard math<Standardmath>` functions.
   - :ref:`Vector math<Vectormath>`.
   - :ref:`Sparse math<Sparsemath>`.
   - :ref:`Quaternions<Quaternions>`.
   - :ref:`Pose transformations<Poses>`.
   - :ref:`Matrix decompositions and solvers<Decompositions>`.

- **Model editing**
   - :ref:`Attachment<Attachment>`.
   - :ref:`Tree elements<AddTreeElements>`.
   - :ref:`Non-tree elements<AddNonTreeElements>`.
   - :ref:`Assets<AddAssets>`.
   - :ref:`Find and get utilities<FindAndGetUtilities>`.
   - :ref:`Attribute setters<AttributeSetters>`.
   - :ref:`Attribute getters<AttributeGetters>`.
   - :ref:`Spec utilities<SpecUtilities>`.
   - :ref:`Element initialization<ElementInitialization>`.
   - :ref:`Element casting<ElementCasting>`.

.. include:: functions.rst