Open main menu

Humanoid Robots Wiki β

Changes

MuJoCo WASM

139 bytes added, 19 May
no edit summary
== Building ==
 
=== 1. Install emscripten ===
First, you need to install emscripten, which is a compiler toolchain for WebAssembly.
==== 1.1. Get the emsdk repo ====
<code>
git clone https://github.com/emscripten-core/emsdk.git
</code>
==== 1.2. Enter that directory ====
<code>
cd emsdk
</code>
==== 1.3. Download and install the latest SDK tools ====
<code>
./emsdk install latest
</code>
==== 1.4. Make the "latest" SDK "active" ====
<code>
./emsdk activate latest
</code>
==== 1.5. Activate PATH and other environment variables ====
<code>
source ./emsdk_env.sh
The environment variables:
 
<code>
EMSDK = < path to emsdk dir >
</code>
==== 1.6. Now just try it! ====
<code>
emcc
<code>
./emsdk install 3.1.56 && ./emsdk activate 3.1.56 && source ./emsdk_env.sh
</code>
 
=== 2. Build the mujoco_wasm Binary ===
Next, you'll build the MuJoCo WebAssembly binary.
 
==== On Linux ====
<code>
mkdir build
cd build
emcmake cmake ..
make
</code>