Skip to content

Commit 9b16e8c

Browse files
committed
Merge branch 'main' into dta/fix_for_sumo
# Conflicts: # judo/controller/controller.py # judo/utils/hierarchical_mj_rollout_backend.py # pixi.lock # pyproject.toml
2 parents b326d25 + a44456b commit 9b16e8c

41 files changed

Lines changed: 6344 additions & 4876 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/precommit.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- uses: prefix-dev/setup-pixi@v0.9.3
1919
with:
2020
pixi-version: latest
21+
environments: dev-mjwarp
2122
cache: true
2223

2324
# ── Stubs cache ────────────────────────────────────────────────
@@ -30,14 +31,14 @@ jobs:
3031

3132
- name: Generate stubs if cache miss
3233
if: steps.typings-cache.outputs.cache-hit != 'true'
33-
run: pixi run -e dev pybind11-stubgen mujoco -o typings/
34+
run: pixi run -e dev-mjwarp pybind11-stubgen mujoco -o typings/
3435

3536
# ── Linting & type checking ────────────────────────────────────
3637
- name: Run Ruff Linter
37-
run: pixi run -e dev ruff check judo/ tests/ --output-format=github
38+
run: pixi run -e dev-mjwarp ruff check judo/ tests/ --output-format=github
3839

3940
- name: Run Ruff Formatter
40-
run: pixi run -e dev ruff format judo/ tests/ --diff
41+
run: pixi run -e dev-mjwarp ruff format judo/ tests/ --diff
4142

4243
- name: Run Pyright
43-
run: pixi run -e dev pyright
44+
run: pixi run -e dev-mjwarp pyright

.github/workflows/test_gpu.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Test (GPU / MJWarp)
2+
3+
# on:
4+
# push:
5+
# branches: [main]
6+
# pull_request:
7+
# branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test-mjwarp:
14+
runs-on: github-gpu-runner
15+
timeout-minutes: 30
16+
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- uses: prefix-dev/setup-pixi@v0.9.3
21+
with:
22+
pixi-version: latest
23+
environments: dev-test-mjwarp
24+
cache: true
25+
26+
# ── mujoco_extensions build cache ───────────────────────────────
27+
- name: Restore mujoco_extensions build cache
28+
id: ext-cache
29+
uses: actions/cache@v5
30+
with:
31+
path: |
32+
mujoco_extensions/build
33+
mujoco_extensions/policy_rollout/*.so
34+
key: mujoco-ext-gpu-${{ hashFiles('pixi.lock', 'mujoco_extensions/**/*.cpp', 'mujoco_extensions/**/*.h', 'mujoco_extensions/**/CMakeLists.txt') }}
35+
36+
- name: Build mujoco_extensions (cache miss)
37+
if: steps.ext-cache.outputs.cache-hit != 'true'
38+
run: pixi run -e dev-mjwarp build
39+
40+
# ── Download mesh assets (avoid xdist race) ────────────────────
41+
- name: Download meshes from release
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: pixi run -e dev-mjwarp python -c "from judo.utils.assets import download_and_extract_meshes; from judo import MODEL_PATH; download_and_extract_meshes(str(MODEL_PATH))"
45+
46+
# ── Pre-warm robot_descriptions cache (avoid xdist race) ───────
47+
- name: Cache mujoco_menagerie meshes
48+
run: pixi run -e dev-mjwarp python -c "from robot_descriptions import spot_mj_description"
49+
50+
# ── Tests ───────────────────────────────────────────────────────
51+
- name: Run MPC GPU tests
52+
run: pixi run -e dev-mjwarp pytest tests/test_run_mpc.py -rsx -n=1 --timeout=300

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,6 @@ wheelhouse/
199199

200200
# byproduct
201201
meshes.zip
202+
203+
# generated dataset
204+
*.h5

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# v0.1.0
2+
3+
## Added
4+
* Added support for parallelization using MJWarp
5+
* Parallel simulation backend using MJWarp
6+
* GPU accelerated data collection in run_mpc
7+
8+
## Changed
9+
* Added an optional GPU test since GPU runners aren't currently available on repo
10+
11+
## Dev
12+
* Updated mujoco to `>=3.5.0` to support MJWarp
13+
114
# v0.0.7
215

316
## Added

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ if __name__ == "__main__":
122122
```
123123

124124
To see more information about the available tasks, please refer to [the task README](judo/tasks/README.md).
125+
For batched MPC trajectory generation, see [run_mpc/README.md](run_mpc/README.md).
125126

126127
## 3. Running `judo` as a Dependency
127128
You can easily install `judo` as a dependency in your own project. A few comments:

judo/controller/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Copyright (c) 2025 Robotics and AI Institute LLC. All rights reserved.
22

3-
from judo.controller.controller import Controller, ControllerConfig, make_controller
3+
from judo.controller.controller import (
4+
BatchedControllers,
5+
Controller,
6+
ControllerConfig,
7+
make_controller,
8+
)
49
from judo.controller.overrides import (
510
set_default_caltech_leap_cube_overrides,
611
set_default_cartpole_overrides,
@@ -20,6 +25,7 @@
2025
set_default_spot_overrides()
2126

2227
__all__ = [
28+
"BatchedControllers",
2329
"Controller",
2430
"ControllerConfig",
2531
"make_controller",

0 commit comments

Comments
 (0)