-
Notifications
You must be signed in to change notification settings - Fork 1
200 lines (172 loc) · 8.36 KB
/
Copy pathpages.yml
File metadata and controls
200 lines (172 loc) · 8.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
name: Deploy Visual Report to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install system dependencies (OSMesa for headless rendering)
run: sudo apt-get update && sudo apt-get install -y libosmesa6-dev
- name: Install package with demo + WBC dependencies
run: uv pip install --system -e ".[demo,wbc]"
- name: Install unitree SDK, CPU PyTorch, and lerobot
run: |
# unitree-sdk2py is installed directly from the fork (not a pyproject
# extra — PyPI rejects packages with git-based direct references).
uv pip install --system "unitree-sdk2py @ git+https://github.com/MiaoDX-fork-and-pruning/unitree_sdk2_python_uv.git"
uv pip install --system torch --index-url https://download.pytorch.org/whl/cpu
uv pip install --system lerobot
uv pip install --system loguru pygame scipy pyyaml
- name: Cache HuggingFace models
uses: actions/cache@v4
with:
path: ~/.cache/huggingface/hub
key: hf-models-${{ runner.os }}-v1
- name: Run MuJoCo grasp example
env:
MUJOCO_GL: osmesa
run: python examples/demos/mujoco/grasp.py --report --output-dir ./harness_output
- name: Run G1 WBC reach example
env:
MUJOCO_GL: osmesa
run: python examples/demos/g1/wbc_reach.py --report --output-dir ./harness_output
- name: Run LeRobot G1 locomotion example
env:
MUJOCO_GL: osmesa
run: python examples/demos/g1/lerobot_locomotion.py --report --output-dir ./harness_output
- name: Run native LeRobot G1 (GR00T) example
env:
MUJOCO_GL: osmesa
run: python examples/demos/g1/lerobot_native.py --controller groot --report --output-dir ./harness_output
- name: Run native LeRobot G1 (SONIC) example
env:
MUJOCO_GL: osmesa
run: python examples/demos/g1/lerobot_native.py --controller sonic --report --output-dir ./harness_output
- name: Run SONIC planner example
env:
MUJOCO_GL: osmesa
run: python examples/demos/sonic/locomotion.py --report --assert-success --output-dir ./harness_output
- name: Run SONIC motion tracking example
env:
MUJOCO_GL: osmesa
run: python examples/demos/sonic/tracking.py --report --assert-success --output-dir ./harness_output
- name: Build static pages (landing)
run: |
mkdir -p _site
cp .github/pages/index.html _site/index.html
- name: Build demo reports
run: |
# --- Demo 1: Simple Grasp (with Meshcat 3D) ---
mkdir -p _site/grasp
cp harness_output/report.html _site/grasp/index.html
for cp_dir in harness_output/mujoco_grasp/trial_001/*/; do
cp_name=$(basename "$cp_dir")
mkdir -p "_site/grasp/${cp_name}"
cp "${cp_dir}"*_rgb.png "_site/grasp/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"*_depth_viz.png "_site/grasp/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"meshcat_scene.html "_site/grasp/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"metadata.json "_site/grasp/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"state.json "_site/grasp/${cp_name}/" 2>/dev/null || true
done
cp harness_output/mujoco_grasp/trial_001/autonomous_report.json _site/grasp/ 2>/dev/null || true
cp harness_output/mujoco_grasp/trial_001/alarms.json _site/grasp/ 2>/dev/null || true
cp harness_output/mujoco_grasp/trial_001/phase_manifest.json _site/grasp/ 2>/dev/null || true
# --- Demo 2: G1 WBC Reach ---
mkdir -p _site/g1-reach
cp harness_output/g1_wbc_reach_report.html _site/g1-reach/index.html
for cp_dir in harness_output/g1_wbc_reach/trial_001/*/; do
cp_name=$(basename "$cp_dir")
mkdir -p "_site/g1-reach/${cp_name}"
cp "${cp_dir}"*_rgb.png "_site/g1-reach/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"*_depth_viz.png "_site/g1-reach/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"meshcat_scene.html "_site/g1-reach/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"metadata.json "_site/g1-reach/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"state.json "_site/g1-reach/${cp_name}/" 2>/dev/null || true
done
# --- Demo 3: LeRobot G1 Locomotion ---
mkdir -p _site/g1-loco
cp harness_output/lerobot_g1_report.html _site/g1-loco/index.html
for cp_dir in harness_output/lerobot_g1/trial_001/*/; do
cp_name=$(basename "$cp_dir")
mkdir -p "_site/g1-loco/${cp_name}"
cp "${cp_dir}"*_rgb.png "_site/g1-loco/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"metadata.json "_site/g1-loco/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"state.json "_site/g1-loco/${cp_name}/" 2>/dev/null || true
done
# --- Demo 4a: Native LeRobot G1 (GR00T) ---
mkdir -p _site/g1-native-groot
cp harness_output/lerobot_g1_native_groot_report.html _site/g1-native-groot/index.html
for cp_dir in harness_output/lerobot_g1_native_groot/trial_001/*/; do
cp_name=$(basename "$cp_dir")
mkdir -p "_site/g1-native-groot/${cp_name}"
cp "${cp_dir}"*_rgb.png "_site/g1-native-groot/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"metadata.json "_site/g1-native-groot/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"state.json "_site/g1-native-groot/${cp_name}/" 2>/dev/null || true
done
# --- Demo 4b: Native LeRobot G1 (SONIC) ---
mkdir -p _site/g1-native-sonic
cp harness_output/lerobot_g1_native_sonic_report.html _site/g1-native-sonic/index.html
for cp_dir in harness_output/lerobot_g1_native_sonic/trial_001/*/; do
cp_name=$(basename "$cp_dir")
mkdir -p "_site/g1-native-sonic/${cp_name}"
cp "${cp_dir}"*_rgb.png "_site/g1-native-sonic/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"metadata.json "_site/g1-native-sonic/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"state.json "_site/g1-native-sonic/${cp_name}/" 2>/dev/null || true
done
# --- Demo 5: SONIC Planner ---
mkdir -p _site/sonic-planner
cp harness_output/sonic_locomotion_report.html _site/sonic-planner/index.html
for cp_dir in harness_output/sonic_locomotion/trial_001/*/; do
cp_name=$(basename "$cp_dir")
mkdir -p "_site/sonic-planner/${cp_name}"
cp "${cp_dir}"*_rgb.png "_site/sonic-planner/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"metadata.json "_site/sonic-planner/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"state.json "_site/sonic-planner/${cp_name}/" 2>/dev/null || true
done
# --- Demo 6: SONIC Motion Tracking ---
mkdir -p _site/sonic
cp harness_output/sonic_tracking_report.html _site/sonic/index.html
for cp_dir in harness_output/sonic_tracking/trial_001/*/; do
cp_name=$(basename "$cp_dir")
mkdir -p "_site/sonic/${cp_name}"
cp "${cp_dir}"*_rgb.png "_site/sonic/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"metadata.json "_site/sonic/${cp_name}/" 2>/dev/null || true
cp "${cp_dir}"state.json "_site/sonic/${cp_name}/" 2>/dev/null || true
done
- name: Upload Pages artifact
if: always()
uses: actions/upload-pages-artifact@v3
with:
path: _site
- name: Upload site content for downstream workflows
if: always()
uses: actions/upload-artifact@v4
with:
name: site-content
path: _site
deploy:
needs: build
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4