Difference between revisions of "Mujoco WASM Build From Source"

From Humanoid Robots Wiki
Jump to: navigation, search
(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...")
 
Line 21: Line 21:
 
   cd ..
 
   cd ..
 
   </syntaxhighlight>
 
   </syntaxhighlight>
 +
 +
Proceed with the next steps once you've made suggested changes to your codebase to allow for a WASM build.
  
 
4. '''Prepare the Build Environment:'''
 
4. '''Prepare the Build Environment:'''

Revision as of 21:52, 20 July 2024

Suggestions to Build MuJoCo WASM with Release 3.1.6

1. Clone the MuJoCo Repository:

   git clone --branch 3.1.6 https://github.com/deepmind/mujoco.git
   cd mujoco

2. Clone the Emscripten SDK Repository:

   git clone https://github.com/emscripten-core/emsdk.git
   cd emsdk

3. Install and Activate Emscripten:

   ./emsdk install latest
   ./emsdk activate latest
   source ./emsdk_env.sh
   cd ..

Proceed with the next steps once you've made suggested changes to your codebase to allow for a WASM build.

4. Prepare the Build Environment:

   mkdir build
   cd build

5. Run Emscripten CMake Commands:

   emcmake cmake ..
   emmake make

6. Deploy and Run Locally:

   emrun --no_browser --port 8080 .

7. Optional Cleanup and Repeat Steps if Necessary:

   rm -rf *
   emcmake cmake ..
   emmake make

8. Install the Build:

   cmake --install .
   sudo cmake --install .


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.