Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
396 commits
Select commit Hold shift + click to select a range
dc54fff
Reimplemented SLURM. Testing time.
Hydrowelder Mar 8, 2026
83fa637
Basic SLURM functionality working! Now improving the dashboard to wor…
Hydrowelder Mar 9, 2026
7382089
General statusing improvements to work with SLURM
Hydrowelder Mar 10, 2026
d296472
Removed the dumb highlighting
Hydrowelder Mar 10, 2026
0acf89b
CSS fixes
Hydrowelder Mar 10, 2026
a5a4020
Removed indents from serialized jsons
Hydrowelder Mar 10, 2026
916c883
Added confetti!
Hydrowelder Mar 11, 2026
4918991
Including failed runs in model dump. Also fixed a bug where the refre…
Hydrowelder Mar 11, 2026
2eb7181
Added svg to package data
Hydrowelder Mar 11, 2026
804428f
Bump version
Hydrowelder Mar 11, 2026
b6f3ef6
Socials were not visible
Hydrowelder Mar 11, 2026
433367a
Added a progress bar to indicate progress of updating the site
Hydrowelder Mar 12, 2026
baf8a79
Added helper methods for making custom inertia from random draws, add…
Hydrowelder Mar 13, 2026
3d10125
Added docstrings and a lerp method
Hydrowelder Mar 13, 2026
58ecfe7
Added forcing funtion tools to assist with runtime force definitions
Hydrowelder Mar 14, 2026
f4d5d60
Adding results manager
Hydrowelder Mar 14, 2026
35b83f1
Lots of bugfixes to get the Monte Carlo working. Still some rough edg…
Hydrowelder Mar 14, 2026
b0b975c
Added a method to set the initial velocity condition of bodies. Also …
Hydrowelder Mar 15, 2026
56a9ab7
Fixed some bugs so that MJCF which rely on assets correctly use the r…
Hydrowelder Mar 15, 2026
e565a41
Removed the values class to just put those directly into the MojoMode…
Hydrowelder Mar 15, 2026
28b2bcf
Added a bunch of relative outputs
Hydrowelder Mar 15, 2026
cc60041
Added a second spring to the example and added an external tracking c…
Hydrowelder Mar 15, 2026
48803f5
Added a method to save video recordings as gif
Hydrowelder Mar 15, 2026
a9ac759
Added a method for the user to easily transfer information from gener…
Hydrowelder Mar 16, 2026
397b635
Improvements to forcing functions. Functions now have access to the m…
Hydrowelder Mar 16, 2026
a9b9a0c
Added scalar force and scalar torque
Hydrowelder Mar 16, 2026
98b7ded
Dashboard now works with a broadcast-listen scheme instead of client-…
Hydrowelder Mar 17, 2026
31a81ce
Added a notice to the user if the dashboard is still connecting.
Hydrowelder Mar 17, 2026
d9a4900
Changed ledger to use a named value dict instead of a dict
Hydrowelder Mar 17, 2026
b445b9a
Improved time predictions
Hydrowelder Mar 17, 2026
f24369e
Moved to new Dojo folder for expanding the FastAPI
Hydrowelder Mar 18, 2026
53143ee
Now showing success trials for eventual results viewer
Hydrowelder Mar 18, 2026
3c0038b
Fix opacity
Hydrowelder Mar 18, 2026
427334c
Reworked dashboard into Mojo Dojo so for future expansion to include …
Hydrowelder Mar 23, 2026
d6e592c
CSS fixes
Hydrowelder Mar 23, 2026
3b86f83
Autorefresh button fixed
Hydrowelder Mar 23, 2026
826b8da
Added mosaic viewer, now adding trial viewer
Hydrowelder Mar 23, 2026
61e867c
Barebones result viewer working
Hydrowelder Mar 23, 2026
7bc28aa
Expanded keyboard shortcut options for viewer
Hydrowelder Mar 24, 2026
803ac7a
Basic plotting working
Hydrowelder Mar 24, 2026
8b7a213
Works better on light and dark mode
Hydrowelder Mar 24, 2026
c684189
Result viewer now also redraws on theme change
Hydrowelder Mar 24, 2026
e396531
Converted to use a JSON for backend schema
Hydrowelder Mar 26, 2026
cedac43
JSON editor working
Hydrowelder Mar 26, 2026
44d1118
Made toast sticky. Also moved theme out of config so users can have t…
Hydrowelder Mar 26, 2026
e033688
Shareable links now work on HTTP connections
Hydrowelder Mar 26, 2026
613e42c
Improvements for mobile
Hydrowelder Mar 26, 2026
a63fff9
Updated styling for mobile
Hydrowelder Mar 26, 2026
df3cb6c
Added download options
Hydrowelder Mar 27, 2026
eadf155
Added LZ compression to link copying. Added better toast system
Hydrowelder Mar 27, 2026
d5b20fb
Added reset config button and a couple new config options
Hydrowelder Mar 27, 2026
e4d2ce0
Fixes to spike styling and prevented changing the spike toggle when h…
Hydrowelder Mar 27, 2026
a01bc26
State of the plotly plot is remebered when settings change
Hydrowelder Mar 29, 2026
37982ae
Light mode fix
Hydrowelder Mar 29, 2026
24e3144
Fixed a bug where changing the grid in autoscale also messed up the a…
Hydrowelder Mar 29, 2026
db8d352
Added a feature so that trial results can be viewed side by side
Hydrowelder Mar 29, 2026
b028bc5
Improved the styling for light and dark mode
Hydrowelder Mar 29, 2026
815bdba
CSS styling updates
Hydrowelder Mar 29, 2026
88b5f23
More CSS fixes
Hydrowelder Mar 30, 2026
b6db904
Upgrades to signal selectors
Hydrowelder Mar 30, 2026
63ce6c6
Fixed positions of dropdowns
Hydrowelder Mar 30, 2026
9bf37f3
Formatting
Hydrowelder Mar 30, 2026
cf5db18
Added more celebration sounds
Hydrowelder Mar 30, 2026
0624258
General CSS improvements for mobile and buttons
Hydrowelder Mar 30, 2026
ca16d49
Vs view can load load hundreds of results instead of just one other
Hydrowelder Mar 31, 2026
c73f7c5
Bugfixes for new batch viewer
Hydrowelder Mar 31, 2026
4412796
Triggering a sync when x or y axes are changed
Hydrowelder Mar 31, 2026
aa8c8c8
New outputs for joints. Also added the ability to show force vectors …
Hydrowelder Apr 2, 2026
1ea3ded
New output filter system. Also fixed a bug that made conservation of …
Hydrowelder Apr 2, 2026
e7a6d68
Fixed more bugs and validated physicality of point to point force
Hydrowelder Apr 2, 2026
2be11f4
Added clear button to filters
Hydrowelder Apr 3, 2026
efca588
Added quick filter options to axis selectors (now uses regex) and a c…
Hydrowelder Apr 3, 2026
789a8a6
Y axis chips now also show the color of the line they represent
Hydrowelder Apr 3, 2026
eca87c6
Fixed some minor bugs with the versus viewer
Hydrowelder Apr 3, 2026
3986118
Smart sorting list so that time is on top always
Hydrowelder Apr 3, 2026
dbe401f
Moved the versus apply button up into the dropdown
Hydrowelder Apr 3, 2026
fadf44c
Added fun messages while loading to give something to look at
Hydrowelder Apr 3, 2026
a2f16c1
Housekeeping. Added a logo to the CLI and serializing things before a…
Hydrowelder Apr 3, 2026
2d4518b
Fixed a bug that made it so completed jobs would prevent future autor…
Hydrowelder Apr 3, 2026
d528680
A couple performance boosts. Only columns the user actually wants are…
Hydrowelder Apr 3, 2026
9492d9d
Now starts to cache the data for vsDraft before the user requests it
Hydrowelder Apr 3, 2026
694ea45
Removed an empty template to fix an error message
Hydrowelder Apr 3, 2026
a34a17b
Fixed some unit tests
Hydrowelder Apr 4, 2026
3ea0baf
Updated to new stochas package
Hydrowelder Apr 4, 2026
4e4ebc1
Bump version
Hydrowelder Apr 4, 2026
4cfcdab
Bump version
Hydrowelder Apr 4, 2026
1c5f36a
Fixed logging so it works on Windows. Also updated some branding
Hydrowelder Apr 4, 2026
ac73351
Removed package find
Hydrowelder Apr 4, 2026
bcb4489
Ok this time for real
Hydrowelder Apr 4, 2026
76cf2c5
Update pipeline
Hydrowelder Apr 4, 2026
b077100
Many changes to how angles an eulerseq are handled
Hydrowelder Apr 4, 2026
c028a40
Updated all classes that effectively used a Pose to use Pose
Hydrowelder Apr 5, 2026
b12a38e
Added many coordinate system tools expanding both Pose and Orientations
Hydrowelder Apr 5, 2026
aed6194
Added abunch of unit tests
Hydrowelder Apr 5, 2026
f5ef478
Lots of new unit tests and static typing updates. Backend no longer r…
Hydrowelder Apr 5, 2026
cd5836e
Added unit tests for runtime tools
Hydrowelder Apr 5, 2026
099c65a
Added more loads unit tests
Hydrowelder Apr 5, 2026
e11abd6
Bump version
Hydrowelder Apr 5, 2026
3c8c804
Merge pull request #4 from Hydrowelder/1-coordinate-system-improvements
Hydrowelder Apr 5, 2026
73cf8ac
Added undo/redo feature
Hydrowelder Apr 5, 2026
a3ad939
History stack now persists between refresh and page changes
Hydrowelder Apr 5, 2026
d8f1f04
Fixes to autoscaling
Hydrowelder Apr 5, 2026
e65acff
Added a transition in to the plot
Hydrowelder Apr 6, 2026
211582f
Everything I tried failed, so this is just gonna stay broke
Hydrowelder Apr 6, 2026
12d05d6
Added annotations to the plot
Hydrowelder Apr 6, 2026
e759e49
Improved the formatting and highlighting of errors in JSON
Hydrowelder Apr 6, 2026
3bcb2a1
Added a shape configurer
Hydrowelder Apr 6, 2026
ee76b27
Bumped version
Hydrowelder Apr 6, 2026
ba5d825
Merge pull request #5 from Hydrowelder/3-dojo-improvements
Hydrowelder Apr 6, 2026
965e64e
Added Geom output options
Hydrowelder Apr 7, 2026
d7c3d72
Made font bigger
Hydrowelder Apr 7, 2026
aaaa215
Added polish to shapes by showing the active mode on the button, addi…
Hydrowelder Apr 9, 2026
99cc7c4
Added log settings for plot
Hydrowelder Apr 9, 2026
b658918
Added toggle option for equalities to allow simple runtime modification
Hydrowelder Apr 9, 2026
a9416c8
Added password protection option for site as well as an error page
Hydrowelder Apr 9, 2026
f6bd115
Bump version
Hydrowelder Apr 9, 2026
1f3213d
Merge pull request #9 from Hydrowelder/7-dojo-polishing-and-feature-e…
Hydrowelder Apr 9, 2026
312c73c
Defaults to return quad instead of full rotation matrix
Hydrowelder Apr 10, 2026
7ddc010
Added ability to change the reference frame for valid quaternions
Hydrowelder Apr 10, 2026
c2bdf5a
Fixed a bug where columns that should have been available were not
Hydrowelder Apr 11, 2026
0747e52
Merge pull request #11 from Hydrowelder/10-rotations-in-dojo
Hydrowelder Apr 11, 2026
d6977a1
Initial version written. Not working with SSH
Hydrowelder Apr 11, 2026
ff76ab4
Basic reloader working
Hydrowelder Apr 11, 2026
7f4254d
Made it so that the reload is recursive allowing for more complex mod…
Hydrowelder Apr 11, 2026
18df721
Merge pull request #12 from Hydrowelder/8-development-environment
Hydrowelder Apr 11, 2026
e8c7c18
Bump version
Hydrowelder Apr 11, 2026
3d26f2e
Added option to use MjViewer for web viewer (in case X11 is not avail…
Hydrowelder Apr 11, 2026
6038ec0
Refactored mojo reloaded. Added some polish so that camera angles are…
Hydrowelder Apr 11, 2026
948f62d
Incorporated runtime into the Reloaded. Users can now playback the ge…
Hydrowelder Apr 11, 2026
48d0757
Added playback speed options
Hydrowelder Apr 11, 2026
f26e2d7
Force and torque arrows now appear in the OpenGL viewer (in the same …
Hydrowelder Apr 12, 2026
53429c3
Added load arrows to the mjviser viewer. Sadly, they appear to be cen…
Hydrowelder Apr 12, 2026
9eca16f
Merge pull request #13 from Hydrowelder/8-development-environment
Hydrowelder Apr 12, 2026
646a769
Bump version
Hydrowelder Apr 12, 2026
5a9d261
Putting together user guides for using Mojo
Hydrowelder Apr 12, 2026
878b8bc
Wrote a ton of user guides on how to use MuJoCo Mojo
Hydrowelder Apr 13, 2026
702bb2d
Fixed badges
Hydrowelder Apr 13, 2026
e7ca11d
Added system preference to site
Hydrowelder Apr 13, 2026
e1e28f6
Added docs workflow
Hydrowelder Apr 13, 2026
19a17b6
Updated docs deployment to include dependencies install
Hydrowelder Apr 13, 2026
e4fb13a
Simplify dependency install
Hydrowelder Apr 13, 2026
e09957d
Fixed asset links to be relative instead of absolute
Hydrowelder Apr 13, 2026
89ba3c5
Added new matrix types and improved the initial velocity setter
Hydrowelder Apr 14, 2026
545abeb
Converted Mesh to a discrimitated union type
Hydrowelder Apr 14, 2026
750b0fe
Added a chip to Dojo to indicate if a live connection is present or not
Hydrowelder Apr 14, 2026
43337b6
Bump version
Hydrowelder Apr 14, 2026
562d4e6
Merge pull request #16 from Hydrowelder/14-validation-improvement-for…
Hydrowelder Apr 14, 2026
8bc52e7
Beginning conversion to use a dict for y axis config
Hydrowelder Apr 15, 2026
b1bb6a6
Basic line editor Dropdown built
Hydrowelder Apr 16, 2026
040d0af
Better dropdown options
Hydrowelder Apr 17, 2026
a037c94
Made font bigger on plot
Hydrowelder Apr 17, 2026
2b0d968
Added resolution download options
Hydrowelder Apr 17, 2026
02a8587
Hopeful fix for the password bug
Hydrowelder Apr 17, 2026
2d24f0e
Bump version
Hydrowelder Apr 17, 2026
7770547
Merge pull request #19 from Hydrowelder/17-dojo-line-customization
Hydrowelder Apr 17, 2026
e925aca
Added support for dcmotor
Hydrowelder Apr 18, 2026
484cddd
Added dcmotor to actuator class
Hydrowelder Apr 18, 2026
4894935
Updated to match MuJoCo 3.7.0!
Hydrowelder Apr 18, 2026
e5a441d
Update mujoco dependency to 3.7.0
Hydrowelder Apr 18, 2026
c23606d
Merge pull request #21 from Hydrowelder/20-bring-support-up-to-mujoco…
Hydrowelder Apr 18, 2026
e31b5d6
Switched to using parquet instead of duckdb
Hydrowelder Apr 18, 2026
61a5d73
Added a method to make an orientation from a rotation object
Hydrowelder Apr 18, 2026
cfdcd8e
Fixed position of cursor-help
Hydrowelder Apr 18, 2026
1f241f2
Bump version
Hydrowelder Apr 18, 2026
28f3961
Merge pull request #23 from Hydrowelder/22-resultsmanager-improvements
Hydrowelder Apr 18, 2026
d67e1a1
Basic optimizer written
Hydrowelder Apr 19, 2026
861e38c
Fixed a race condition for optimization with multi proc
Hydrowelder Apr 19, 2026
5eaa110
Added the ability to view optuna-dashboard in dojo
Hydrowelder Apr 19, 2026
6abf9e0
Reworked to unblock the / endpoint
Hydrowelder Apr 19, 2026
c62847d
Additional stability for thread safe ops
Hydrowelder Apr 19, 2026
f8577f6
Added user guide and new arguments for optimizer
Hydrowelder Apr 20, 2026
d126f9c
Added optmization toolkit
Hydrowelder Apr 20, 2026
3b256c6
Quickfix
Hydrowelder Apr 20, 2026
ab7bd1f
Merge pull request #24 from Hydrowelder/2-optimization-toolbox
Hydrowelder Apr 20, 2026
cf71bc0
Rewrote features list
Hydrowelder Apr 20, 2026
7e1cf66
Moved design value and stochas main functionality to stochas
Hydrowelder Apr 21, 2026
481d3cb
Support for new stochas distribution
Hydrowelder Apr 21, 2026
1994248
Fix test
Hydrowelder Apr 21, 2026
3ae5eb2
Upgrade stochas requirement
Hydrowelder Apr 21, 2026
2c7bde0
Added logo to readme
Hydrowelder Apr 24, 2026
cf3ac49
Added the ability to run a reloaded session from a model config file.…
Hydrowelder Apr 25, 2026
58f06ed
Merge pull request #27 from Hydrowelder/25-run-single-option
Hydrowelder Apr 25, 2026
b7a6fc5
Update pyproject.toml
Hydrowelder Apr 29, 2026
b636db2
Added copy docs pre commit hook
Hydrowelder May 2, 2026
3fad215
Add intermittent ruff check
Hydrowelder May 2, 2026
1de542c
Running ruff with the copy
Hydrowelder May 2, 2026
ef23971
Only run copy on changes
Hydrowelder May 2, 2026
3611668
Fixes to the rt_inertia_world method
Hydrowelder May 2, 2026
f739b20
Replace unordered list characters
Hydrowelder May 2, 2026
4abb6fa
Fully renamed result manager to signal manager
Hydrowelder May 2, 2026
342e3e4
Added a method to walk through bodies recursively
Hydrowelder May 2, 2026
54a3e60
Refined nomenclature
Hydrowelder May 2, 2026
d3c4a0a
Completed the tennis racket theorem example
Hydrowelder May 2, 2026
03f136d
Bump version
Hydrowelder May 2, 2026
be2ee7d
Merge pull request #29 from Hydrowelder/28-inertial-outputs-fixes
Hydrowelder May 2, 2026
4a0853f
Added a new DataFrame wrapper for supercharged data analysis
Hydrowelder May 2, 2026
08a7610
Moved dataframe to utils and added filters classes to allow for filte…
Hydrowelder May 2, 2026
0b51ba7
Added the ability to use a filter map when applying filters instead o…
Hydrowelder May 2, 2026
89fd3b3
Reworked to MojoFrame class which just register a namespace with Pol…
Hydrowelder May 2, 2026
ed17f52
Added savgol filter and documentation
Hydrowelder May 2, 2026
dd09e87
Simplified to make the MojoFrame have the method to make a new instan…
Hydrowelder May 3, 2026
38e9390
Merge pull request #31 from Hydrowelder/30-mojodataframe
Hydrowelder May 3, 2026
ab53298
Bump version
Hydrowelder May 3, 2026
0b8a925
Added support for Python 3.14 and MuJoCo v3.8.0
Hydrowelder May 3, 2026
99efb1b
Added hatch as dev dependency
Hydrowelder May 3, 2026
fc42d29
Update pyproject.toml with new configurations
Hydrowelder May 4, 2026
5f4dbf7
Update build system and project metadata
Hydrowelder May 4, 2026
81610b3
Refactoring for new layout
Hydrowelder May 5, 2026
0aee5a7
Renamed dataframe. Added MojoDataFrame and filters to import path
Hydrowelder May 6, 2026
848ebc9
Cleaned up subgroups arg for post
Hydrowelder May 6, 2026
c571235
Added a time filter for dataframes
Hydrowelder May 7, 2026
5b137b6
Bump version
Hydrowelder May 7, 2026
41fe427
Merge pull request #35 from Hydrowelder/32-fixes-for-314
Hydrowelder May 7, 2026
8462c13
Huge speed improvement for signal manager. Switched to use contiguous…
Hydrowelder May 8, 2026
c3afc13
Baseline load profiled
Hydrowelder May 8, 2026
3dd82f0
Fix circular import
Hydrowelder May 8, 2026
537e5d7
Merge pull request #36 from Hydrowelder/34-add-jax-for-applied-loads
Hydrowelder May 8, 2026
d576d15
Added vertex to face proximity calculations
Hydrowelder May 9, 2026
68da196
Added face to face proximity calculator
Hydrowelder May 9, 2026
26739ef
Incorporated convex hull calculation into the proximity mixin instead…
Hydrowelder May 9, 2026
c6b7aa9
Fixed futures import issue
Hydrowelder May 9, 2026
74857a0
Added a ton of unit tests for proximities and did a refactor of proxi…
Hydrowelder May 10, 2026
4b81517
Refactored to split proximity into its own class and a mixin
Hydrowelder May 10, 2026
0d7f44f
Passing tests. Testing with visualization
Hydrowelder May 10, 2026
770a6cd
Updating to test visualization of proximities
Hydrowelder May 10, 2026
f6e43a6
Fix missing dir
Hydrowelder May 10, 2026
0e86466
Thread safety fixes
Hydrowelder May 11, 2026
3a94bcb
Added support for proximity visualization in Reloaded
Hydrowelder May 11, 2026
49facb4
Bump version
Hydrowelder May 11, 2026
64ef9dd
Merge pull request #37 from Hydrowelder/33-clearances
Hydrowelder May 11, 2026
81ea6e5
Fix badges
Hydrowelder May 11, 2026
b17f713
Added the ability to create custom meshes using trimesh. Also added a…
Hydrowelder May 17, 2026
d0aae96
Bump version
Hydrowelder May 17, 2026
c6214e0
Merge pull request #39 from Hydrowelder/38-trimesh-constructors
Hydrowelder May 17, 2026
444da69
Merge branch 'master' into 26-filter-stack
Hydrowelder May 17, 2026
911265a
refactor dojo UI: TypeScript project, semantic CSS design system, tem…
Hydrowelder May 18, 2026
e04e486
Unapplied changes are stored in a draft state
Hydrowelder May 19, 2026
26ffd09
Improved format of dropdowns
Hydrowelder May 19, 2026
df160a4
Updated requirements
Hydrowelder May 19, 2026
6622f8c
Added a notification history and more toast messages
Hydrowelder May 20, 2026
8076bc0
Automatically parse filter failurs
Hydrowelder May 20, 2026
3b0b27c
Added profile saving for configurations users like and want to persis…
Hydrowelder May 20, 2026
e8a6779
Profiles now warn to overwrite. Added duplicate filter button
Hydrowelder May 20, 2026
6378267
Merge pull request #40 from Hydrowelder/26-filter-stack
Hydrowelder May 20, 2026
213b797
Bump version
Hydrowelder May 20, 2026
5fa82ed
Added an init command to start fresh projects
Hydrowelder May 21, 2026
5695029
Updated docs to include an API reference
Hydrowelder May 21, 2026
b680159
Now renumbering trial nums on a trial expansion
Hydrowelder May 21, 2026
5bdb5f2
Switch to a hatchling build system (again)
Hydrowelder May 21, 2026
7993aa4
Merge branch 'master' into 41-project-init
Hydrowelder May 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
enable-cache: true
- name: Install Python 3.13
run: uv python install 3.13
- name: Generate API reference pages
run: uv run --python 3.13 --group dev python mujoco-mojo/scripts/gen_ref_pages.py
- run: uv run --python 3.13 --group dev zensical build --clean
- uses: actions/upload-pages-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mojo.log
mojo.log.*

site
docs/reference/
mojo-models
textures

Expand Down
9 changes: 9 additions & 0 deletions docs/user-guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,5 +306,14 @@ MuJoCo does not currently ship first-party Python typing stubs. To enable proper

---

!!! tip "Tip: Scaffold a New Project"
Before diving into the generate script, run `mujoco-mojo init` in a new directory to get a working project skeleton — `simulation.py`, `run.sh`, and `reloaded.sh` — pre-wired and ready to edit.

```bash linenums="0"
mujoco-mojo init
```

See the [Initializing a Project](init.md) guide for details.

!!! success
This concludes our basic overview of the core concepts to MuJoCo Mojo. The next guide will cover how to get started with assembling your first model with the [generate script](generate-script.md).
65 changes: 65 additions & 0 deletions docs/user-guides/init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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

```bash linenums="0"
mujoco-mojo init [--optimizer]
```

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)

```bash linenums="0"
mujoco-mojo init
```

`simulation.py` will contain stubs for `generate` and `runtime`. `run.sh` will call `mujoco-mojo run monte-carlo`.

---

## Optimization

```bash linenums="0"
mujoco-mojo init --optimizer
```

`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:

```bash linenums="0"
bash run.sh
```

!!! tip
Use `reloaded.sh` during development to get rapid visual feedback on your model without running a full campaign.

```bash linenums="0"
bash reloaded.sh
```
47 changes: 39 additions & 8 deletions docs/user-guides/reloaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@ mujoco-mojo reloaded --generator my_sim.Experiment.generate

The `reloaded` command is highly flexible, allowing you to specify different viewers, initial seeds, and even pass custom arguments to your scripts.

| Argument | Description |
|:-------------------|:--------------------------------------------------------------------------|
| `--help` | Describes all available arguments. Used on its own. |
| `--generator` | **(Required)** Import path to your `MojoGenerate` function. |
| `--runtime` | Optional import path to your `MojoRuntime` function. |
| `--user-interface` | Choose your viewer: `opengl` (native), `viser`, or `mjviser` (web-based). |
| `--seed` | Set the global seed for stochastic draws. |
| `--port` | Port for the web-based viewers (default: `8080`). |
| Argument | Shortcut | Description |
|:-------------------|:---------|:-------------------------------------------------------------------------------|
| `--help` | | Describes all available arguments. Used on its own. |
| `--generator` | `-g` | Import path to your `generate` function. |
| `--config` | `-c` | Path to a saved `model_config.json`. Mutually exclusive with `--generator`. |
| `--runtime` | `-r` | Optional import path to your `runtime` function. |
| `--workdir` | `-w` | Workspace directory for output files (default: `mojo-models`). |
| `--user-interface` | `-ui` | Choose your viewer: `opengl` (native), `viser`, or `mjviser` (web-based). |
| `--trial-num` | `-tn` | Load the random state for a specific trial number (default: `0`). |
| `--seed` | `-s` | Set the global seed for stochastic draws. |
| `--overrides` | `-o` | Path to a NamedValue overrides JSON file. Fixes specific distribution draws. |
| `--gen-arg` | `-ga` | Positional argument forwarded to the generator. Repeatable. |
| `--gen-kwarg` | `-gk` | Keyword argument (`key=value`) forwarded to the generator. Repeatable. |
| `--port` | `-p` | Port for the web-based viewers (default: `8080`). |

---

Expand All @@ -41,6 +47,31 @@ Once Reloaded is running, your terminal becomes an interactive command center. Y

---

## Loading a Saved Model Config

As an alternative to calling a generator function, Reloaded can load a previously saved `model_config.json` directly using `--config`. This is useful when you want to inspect the exact model that was used in a specific trial without running any Python generation logic.

```bash linenums="0"
mujoco-mojo reloaded --config ./results/trial_0042/model_config.json
```

This mode is mutually exclusive with `--generator`.

---

## Inspecting a Specific Trial

When iterating on a stochastic simulation, it is often necessary to reproduce the exact random state of a particular trial. Pass `--trial-num` to seed the session with that trial's distribution draws.

```bash linenums="0"
# Open trial 42 in the viewer, using the same seed and random draws as the original campaign
mujoco-mojo reloaded -g sim.generate -r sim.runtime --seed 123 --trial-num 42
```

Combined with `--overrides`, you can also lock specific named values to fixed quantities while keeping everything else stochastic, which helps isolate the effect of individual parameters.

---

## Workflow

### MJCF Prototyping
Expand Down
18 changes: 8 additions & 10 deletions docs/user-guides/running-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,23 @@ Mojo uses a single, unified command structure for all job types. By adjusting a

### Running a Single Trial

To run exactly one trial (usually trial `0`), simply set the trial count to `1` or specify a specific trial number.
Use `mujoco-mojo run single` when you want to execute exactly one trial. It accepts the same arguments as `run monte-carlo` and is the recommended command when running a baseline or re-running an individual trial for inspection.

```bash linenums="0"
# Run one trial using nominal values
mujoco-mojo run monte-carlo --generator sim.generate --runtime sim.runtime --seed 123 --n-trial 1
# Run trial 0 (nominal values)
mujoco-mojo run single -g sim.generate -r sim.runtime --seed 123

# Or run a specific trial from a previous distribution
mujoco-mojo run monte-carlo -g sim.generate -r sim.runtime --seed 123 --trial-num 42
# Re-run a specific trial from a previous campaign
mujoco-mojo run single -g sim.generate -r sim.runtime --seed 123 --trial-num 42
```

???+ note "Note: Nominal Run"
For stochastic values, trial number `0` will use the distribution's `nominal_value` (if provided). This allows you to not only be able to recreate a model, but also build a "baseline" simulation.
Trial number `0` uses each distribution's `nominal_value` (if one was provided). This gives you a deterministic baseline that reflects design intent rather than a stochastic draw.

This helps you with defining the design intent, rather than letting chaos take over!

More than one `--trial-num` argument can be passed to the command. This will make it so those select trials are run:
You can also target specific trials within a full `run monte-carlo` campaign by passing `--trial-num` one or more times. This is useful for re-running failed trials without re-running the entire job.

```bash linenums="0"
# This will run trials 12 and 42
# Re-run only trials 12 and 42
mujoco-mojo run monte-carlo -g sim.generate -r sim.runtime --seed 123 --trial-num 12 --trial-num 42
```

Expand Down
34 changes: 30 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ nav:
- User Guide:
# - user-guide.md
- Getting Started: user-guides/getting-started.md
- Initializing a Project: user-guides/init.md
- Generate Script: user-guides/generate-script.md
- Runtime Script: user-guides/runtime-script.md
- Running Jobs:
Expand All @@ -27,7 +28,30 @@ nav:
- Mosaic: user-guides/mosaic.md
- Optimization: user-guides/optimization.md
- Reloaded: user-guides/reloaded.md
# - Code Reference: reference/
- Code Reference:
- reference/index.md
- mujoco_mojo:
- reference/mujoco_mojo/index.md
- MojoModel: reference/mujoco_mojo/mojo_model.md
- Base: reference/mujoco_mojo/base.md
- Visualization: reference/mujoco_mojo/visualization.md
- Typing: reference/mujoco_mojo/typing.md
# - Stochas: reference/mujoco_mojo/stochas.md
- MJCF: reference/mujoco_mojo/mjcf.md
- Runtime:
- reference/mujoco_mojo/runtime/index.md
- Load: reference/mujoco_mojo/runtime/load.md
- RuntimeManager: reference/mujoco_mojo/runtime/runtime_manager.md
- SignalManager: reference/mujoco_mojo/runtime/signal_manager.md
- VideoRecorder: reference/mujoco_mojo/runtime/video_recorder.md
- Utils:
- reference/mujoco_mojo/utils/index.md
- Color: reference/mujoco_mojo/utils/color.md
- Runner: reference/mujoco_mojo/utils/runner.md
- Proximity: reference/mujoco_mojo/utils/proximity.md
- Filters: reference/mujoco_mojo/utils/filters.md
- Interp: reference/mujoco_mojo/utils/interp.md
- Dataframe: reference/mujoco_mojo/utils/dataframe.md
- About: about.md

theme:
Expand Down Expand Up @@ -81,12 +105,14 @@ plugins:
- search
- open-in-new-tab:
add_icon: true
# gen-files and literate-nav are MkDocs-only plugins; zensical ignores them.
# Reference pages are pre-generated by scripts/gen_ref_pages.py instead.
# - gen-files:
# scripts:
# - scripts/gen_ref_pages.py
- literate-nav:
nav_file: SUMMARY.md
- section-index
# - literate-nav:
# nav_file: SUMMARY.md
# - section-index
- mkdocstrings:
handlers:
python:
Expand Down
14 changes: 9 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "mujoco-mojo"
version = "2.2.2"
dynamic = ["version"]
description = "A complete MJCF lifecycle and trial orchestration suite for MuJoCo, powered by Pydantic v2."
readme = "README.md"
requires-python = ">=3.12"
Expand Down Expand Up @@ -94,8 +94,12 @@ dev = [
[project.scripts]
mujoco-mojo = "mujoco_mojo.utils.layers.cli:cli_app"

[tool.setuptools.package-data]
"*" = ["*.html", "*.js", "*.mp3", "*.svg", "*.css"]
[tool.hatch.version]
source = "vcs"
fallback-version = "0.0.0"

[tool.hatch.build.targets.wheel]
packages = ["src/mujoco_mojo"]

[tool.ruff]
exclude = ["typings", "scripts/templating/sensor_template.py"]
Expand Down
98 changes: 75 additions & 23 deletions scripts/gen_ref_pages.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,87 @@
"""Generate the code reference pages and navigation."""
"""
Generate API reference pages in docs/reference/.

Run this script before building the docs site:

python scripts/gen_ref_pages.py

The output is written to docs/reference/ and is consumed by zensical (or
mkdocs) via the ::: autodoc directives. The directory is gitignored; this
script must be run as part of the CI pipeline before zensical build.
"""

from pathlib import Path

import mkdocs_gen_files
ROOT = Path(__file__).parent.parent
DOCS_REF = ROOT / "docs" / "reference"

# ---------------------------------------------------------------------------
# Modules to document: (dotted identifier, output path relative to DOCS_REF)
# ---------------------------------------------------------------------------
MODULES: list[tuple[str, str]] = [
# top-level package
("mujoco_mojo", "mujoco_mojo/index.md"),
("mujoco_mojo.mojo_model", "mujoco_mojo/mojo_model.md"),
("mujoco_mojo.base", "mujoco_mojo/base.md"),
("mujoco_mojo.visualization", "mujoco_mojo/visualization.md"),
# typing — enums and type aliases (some not re-exported at top level)
("mujoco_mojo.typing", "mujoco_mojo/typing.md"),
# stochas — distributions and named values (has items not in top-level __all__)
("mujoco_mojo.stochas", "mujoco_mojo/stochas.md"),
# runtime
("mujoco_mojo.runtime", "mujoco_mojo/runtime/index.md"),
("mujoco_mojo.runtime.load", "mujoco_mojo/runtime/load.md"),
("mujoco_mojo.runtime.runtime_manager", "mujoco_mojo/runtime/runtime_manager.md"),
("mujoco_mojo.runtime.signal_manager", "mujoco_mojo/runtime/signal_manager.md"),
("mujoco_mojo.runtime.video_recorder", "mujoco_mojo/runtime/video_recorder.md"),
# utils
("mujoco_mojo.utils", "mujoco_mojo/utils/index.md"),
("mujoco_mojo.utils.color", "mujoco_mojo/utils/color.md"),
("mujoco_mojo.utils.runner", "mujoco_mojo/utils/runner.md"),
("mujoco_mojo.utils.proximity", "mujoco_mojo/utils/proximity.md"),
("mujoco_mojo.utils.filters", "mujoco_mojo/utils/filters.md"),
("mujoco_mojo.utils.interp", "mujoco_mojo/utils/interp.md"),
("mujoco_mojo.utils.dataframe", "mujoco_mojo/utils/dataframe.md"),
]

# ---------------------------------------------------------------------------
# Hand-written stub for mujoco_mojo.mjcf (too large to autodoc)
# ---------------------------------------------------------------------------
MJCF_STUB = """\
# mujoco\\_mojo.mjcf

The `mujoco_mojo.mjcf` subpackage provides the complete Python object model
for the MuJoCo XML schema. It mirrors the official XML structure closely, so
the best reference is the upstream documentation:

[MuJoCo XML Reference :material-open-in-new:](https://mujoco.readthedocs.io/en/stable/XMLreference.html){ .md-button .md-button--primary target=_blank }

All `mjcf` types are re-exported from the top-level `mujoco_mojo` namespace,
so you rarely need to import directly from `mujoco_mojo.mjcf`.

nav = mkdocs_gen_files.Nav() # type: ignore
```python
import mujoco_mojo as mojo

root = Path(__file__).parent.parent
src = root / "src"
body = mojo.Body(name=mojo.BodyName("my_body"))
```
"""

for path in sorted(src.rglob("*.py")):
module_path = path.relative_to(src).with_suffix("")
doc_path = path.relative_to(src).with_suffix(".md")
full_doc_path = Path("reference", doc_path)

parts = tuple(module_path.parts)
def main() -> None:
DOCS_REF.mkdir(parents=True, exist_ok=True)

if parts[-1] == "__init__":
parts = parts[:-1]
doc_path = doc_path.with_name("index.md")
full_doc_path = full_doc_path.with_name("index.md")
elif parts[-1] == "__main__":
continue
for module, rel_path in MODULES:
dest = DOCS_REF / rel_path
dest.parent.mkdir(parents=True, exist_ok=True)
dest.write_text(f"::: {module}\n", encoding="utf-8")
print(f" {dest.relative_to(ROOT)}")

nav[parts] = doc_path.as_posix()
mjcf_page = DOCS_REF / "mujoco_mojo" / "mjcf.md"
mjcf_page.write_text(MJCF_STUB, encoding="utf-8")
print(f" {mjcf_page.relative_to(ROOT)}")

with mkdocs_gen_files.open(full_doc_path, "w") as fd:
ident = ".".join(parts)
fd.write(f"::: {ident}")
print(f"\nWrote {len(MODULES) + 1} pages to {DOCS_REF.relative_to(ROOT)}/")

mkdocs_gen_files.set_edit_path(full_doc_path, path.relative_to(root))

with mkdocs_gen_files.open("reference/SUMMARY.md", "w") as nav_file:
nav_file.writelines(nav.build_literate_nav())
if __name__ == "__main__":
main()
Empty file.
Loading
Loading