MuJoCo: Difference between revisions

Jump to navigation Jump to search
186 bytes added ,  6 years ago
Marked this version for translation
(translation markup)
(Marked this version for translation)
Line 6: Line 6:
'''MuJoCo''' "''stands for Multi-Joint dynamics with Contact. It is a physics engine aiming to facilitate research and development in robotics, biomechanics, graphics and animation, and other areas where fast and accurate simulation is needed.''"
'''MuJoCo''' "''stands for Multi-Joint dynamics with Contact. It is a physics engine aiming to facilitate research and development in robotics, biomechanics, graphics and animation, and other areas where fast and accurate simulation is needed.''"


<!--T:4-->
It is frequently used with the associated Python module <code>mujoco_py</code> as an environment for Reinforcement Learning research.
It is frequently used with the associated Python module <code>mujoco_py</code> as an environment for Reinforcement Learning research.


<!--T:5-->
__TOC__
__TOC__


==Installation==
==Installation== <!--T:6-->


=== Base Files === <!--T:2-->
=== Base Files === <!--T:2-->


<!--T:7-->
First, the .mujoco folder in your home directory must be set up. MuJoCo '''requires a licence key''' to be placed in
First, the .mujoco folder in your home directory must be set up. MuJoCo '''requires a licence key''' to be placed in
~/.mujoco/mjkey.txt. This key obtained by e-mail after registration.
~/.mujoco/mjkey.txt. This key obtained by e-mail after registration.


<!--T:8-->
The appropriate (linux) MuJoCo distribution must also be downloaded and unzipped into the ~/.mujoco directory from the Download section of the [https://www.roboti.us/index.html MuJoCo website].
The appropriate (linux) MuJoCo distribution must also be downloaded and unzipped into the ~/.mujoco directory from the Download section of the [https://www.roboti.us/index.html MuJoCo website].


<!--T:9-->
Your ~/.mujoco folder should now look like this (the version might differ):
Your ~/.mujoco folder should now look like this (the version might differ):
{{Command
{{Command
Line 28: Line 33:
=== mujoco_py === <!--T:3-->
=== mujoco_py === <!--T:3-->


<!--T:10-->
The python interface to MuJoCo is the <code>mujoco_py</code> module. Getting it to work re somequires special steps because library paths need to be patched.
The python interface to MuJoCo is the <code>mujoco_py</code> module. Getting it to work re somequires special steps because library paths need to be patched.


<!--T:11-->
After using <code>module</code> to load the desired python version, you should set up a clean virtualenv and install the <code>mujoco_py</code> module:
After using <code>module</code> to load the desired python version, you should set up a clean virtualenv and install the <code>mujoco_py</code> module:


<!--T:12-->
{{Commands
{{Commands
|mkdir mujoco_env
|mkdir mujoco_env
Line 39: Line 47:
}}
}}


<!--T:13-->
Now the paths need to be patched with setrpaths.sh. Use the appropriate python version in the commands below if it is not 3.5:
Now the paths need to be patched with setrpaths.sh. Use the appropriate python version in the commands below if it is not 3.5:


<!--T:14-->
{{Commands
{{Commands
|setrpaths.sh --path $VIRTUAL_ENV/lib/python3.5/site-packages/mujoco_py
|setrpaths.sh --path $VIRTUAL_ENV/lib/python3.5/site-packages/mujoco_py
Line 47: Line 57:
}}
}}


<!--T:15-->
Now run the following command:
Now run the following command:


<!--T:16-->
{{Command|python -c "import mujoco_py"}}
{{Command|python -c "import mujoco_py"}}


<!--T:17-->
It should have crashed. However, it created the necessary paths to run:
It should have crashed. However, it created the necessary paths to run:


<!--T:18-->
{{Command|setrpaths.sh --path $VIRTUAL_ENV/lib/python3.5/site-packages/mujoco_py}}
{{Command|setrpaths.sh --path $VIRTUAL_ENV/lib/python3.5/site-packages/mujoco_py}}


<!--T:19-->
After that last command, mujoco_py should be ready to use in the virtual environment. If everything installed correctly, the command below should run without any errors:
After that last command, mujoco_py should be ready to use in the virtual environment. If everything installed correctly, the command below should run without any errors:
{{Command|python -c "import mujoco_py"}}
{{Command|python -c "import mujoco_py"}}


</translate>
</translate>
cc_staff
37

edits

Navigation menu