Initializing a New Project¶
Abstract
The mujoco-mojo init command scaffolds a new project in the current directory, providing ready-to-run starter files for Monte Carlo campaigns or optimization studies.
Usage¶
With no flags, the command generates a standard Monte Carlo project. Pass --optimizer to include an objective function stub for use with mujoco-mojo run optimization.
Generated Files¶
Running mujoco-mojo init produces three files in the current directory:
| File | Purpose |
|---|---|
simulation.py |
Simulation stubs: UserData, generate, and runtime |
run.sh |
Pre-configured shell script to launch the campaign |
reloaded.sh |
Shell script to open the interactive viewer |
Both shell scripts are made executable and resolve their paths relative to their own location, so they can be invoked from any working directory.
Monte Carlo (default)¶
simulation.py will contain stubs for generate and runtime. run.sh will call mujoco-mojo run monte-carlo.
Optimization¶
simulation.py will additionally contain an objective stub. run.sh will call mujoco-mojo run optimization.
Next Steps¶
After running init, fill in your generate and runtime functions, then launch your campaign: