Open main menu

Humanoid Robots Wiki β

Changes

Mujoco WASM Build From Source

1,435 bytes added, 20 July
Created page with "== Suggestions to Build MuJoCo WASM with Release 3.1.6 == 1. '''Clone the MuJoCo Repository:''' <syntaxhighlight lang="sh"> git clone --branch 3.1.6 https://github.com..."
== Suggestions to Build MuJoCo WASM with Release 3.1.6 ==


1. '''Clone the MuJoCo Repository:'''
<syntaxhighlight lang="sh">
git clone --branch 3.1.6 https://github.com/deepmind/mujoco.git
cd mujoco
</syntaxhighlight>

2. '''Clone the Emscripten SDK Repository:'''
<syntaxhighlight lang="sh">
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
</syntaxhighlight>

3. '''Install and Activate Emscripten:'''
<syntaxhighlight lang="sh">
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd ..
</syntaxhighlight>

4. '''Prepare the Build Environment:'''
<syntaxhighlight lang="sh">
mkdir build
cd build
</syntaxhighlight>

5. '''Run Emscripten CMake Commands:'''
<syntaxhighlight lang="sh">
emcmake cmake ..
emmake make
</syntaxhighlight>

6. '''Deploy and Run Locally:'''
<syntaxhighlight lang="sh">
emrun --no_browser --port 8080 .
</syntaxhighlight>

7. '''Optional Cleanup and Repeat Steps if Necessary:'''
<syntaxhighlight lang="sh">
rm -rf *
emcmake cmake ..
emmake make
</syntaxhighlight>

8. '''Install the Build:'''
<syntaxhighlight lang="sh">
cmake --install .
sudo cmake --install .
</syntaxhighlight>


=== Notes ===
* Ensure that the Emscripten environment is correctly activated before starting the build process.
* Regularly clean the build directory to maintain a clean build environment.