ssmjviser 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. ssmjviser-1.0.0/.github/CODEOWNERS +1 -0
  2. ssmjviser-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +23 -0
  3. ssmjviser-1.0.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  4. ssmjviser-1.0.0/.github/ISSUE_TEMPLATE/improvement.md +13 -0
  5. ssmjviser-1.0.0/.github/ISSUE_TEMPLATE/task.md +12 -0
  6. ssmjviser-1.0.0/.github/pull_request_template.md +24 -0
  7. ssmjviser-1.0.0/.github/workflows/ci.yml +371 -0
  8. ssmjviser-1.0.0/.github/workflows/release.yml +291 -0
  9. ssmjviser-1.0.0/.gitignore +15 -0
  10. ssmjviser-1.0.0/CHANGELOG.md +230 -0
  11. ssmjviser-1.0.0/CITATION.cff +29 -0
  12. ssmjviser-1.0.0/CODE_OF_CONDUCT.md +13 -0
  13. ssmjviser-1.0.0/CONTRIBUTING.md +125 -0
  14. ssmjviser-1.0.0/LICENSE +21 -0
  15. ssmjviser-1.0.0/PKG-INFO +442 -0
  16. ssmjviser-1.0.0/README.md +404 -0
  17. ssmjviser-1.0.0/SECURITY.md +7 -0
  18. ssmjviser-1.0.0/assets/readme/ada_live.jpg +0 -0
  19. ssmjviser-1.0.0/assets/readme/ada_live.webp +0 -0
  20. ssmjviser-1.0.0/assets/readme/g1.jpg +0 -0
  21. ssmjviser-1.0.0/assets/readme/g1.webp +0 -0
  22. ssmjviser-1.0.0/assets/readme/geodude_contacts.jpg +0 -0
  23. ssmjviser-1.0.0/assets/readme/geodude_contacts.webp +0 -0
  24. ssmjviser-1.0.0/assets/readme/geodude_preview.jpg +0 -0
  25. ssmjviser-1.0.0/assets/readme/geodude_preview.webp +0 -0
  26. ssmjviser-1.0.0/assets/readme/geodude_replay.jpg +0 -0
  27. ssmjviser-1.0.0/assets/readme/geodude_replay.webp +0 -0
  28. ssmjviser-1.0.0/assets/readme/shadow_hand.jpg +0 -0
  29. ssmjviser-1.0.0/assets/readme/shadow_hand.webp +0 -0
  30. ssmjviser-1.0.0/docs/api.md +105 -0
  31. ssmjviser-1.0.0/examples/basic_launch.py +46 -0
  32. ssmjviser-1.0.0/examples/custom_panel.py +62 -0
  33. ssmjviser-1.0.0/examples/gui_demo.py +66 -0
  34. ssmjviser-1.0.0/examples/viewer_demo.py +83 -0
  35. ssmjviser-1.0.0/pyproject.toml +94 -0
  36. ssmjviser-1.0.0/scripts/check_readme.py +106 -0
  37. ssmjviser-1.0.0/scripts/e2e/__init__.py +4 -0
  38. ssmjviser-1.0.0/scripts/e2e/channels.py +166 -0
  39. ssmjviser-1.0.0/scripts/e2e/clients.py +147 -0
  40. ssmjviser-1.0.0/scripts/e2e/contacts.py +191 -0
  41. ssmjviser-1.0.0/scripts/e2e/fixtures.py +132 -0
  42. ssmjviser-1.0.0/scripts/e2e/images.py +200 -0
  43. ssmjviser-1.0.0/scripts/e2e/lifecycle.py +84 -0
  44. ssmjviser-1.0.0/scripts/e2e/live_view.py +135 -0
  45. ssmjviser-1.0.0/scripts/e2e/oracles.py +346 -0
  46. ssmjviser-1.0.0/scripts/e2e/package_checks.py +153 -0
  47. ssmjviser-1.0.0/scripts/e2e/preview.py +233 -0
  48. ssmjviser-1.0.0/scripts/e2e/readme.py +98 -0
  49. ssmjviser-1.0.0/scripts/e2e/recording.py +74 -0
  50. ssmjviser-1.0.0/scripts/e2e/rendering.py +189 -0
  51. ssmjviser-1.0.0/scripts/e2e/robots.py +127 -0
  52. ssmjviser-1.0.0/scripts/e2e/run.py +93 -0
  53. ssmjviser-1.0.0/scripts/e2e/ssrobot_adapters.py +47 -0
  54. ssmjviser-1.0.0/scripts/e2e/ssrobot_contacts.py +187 -0
  55. ssmjviser-1.0.0/scripts/e2e/ssrobot_live.py +259 -0
  56. ssmjviser-1.0.0/scripts/e2e/ssrobot_preview.py +274 -0
  57. ssmjviser-1.0.0/scripts/e2e/ssrobot_replay.py +370 -0
  58. ssmjviser-1.0.0/scripts/e2e/textures.py +158 -0
  59. ssmjviser-1.0.0/scripts/e2e/trace_channels.py +111 -0
  60. ssmjviser-1.0.0/scripts/e2e/trace_images.py +137 -0
  61. ssmjviser-1.0.0/scripts/e2e/trace_preview.py +231 -0
  62. ssmjviser-1.0.0/scripts/e2e/trace_replay.py +123 -0
  63. ssmjviser-1.0.0/scripts/media/README.md +59 -0
  64. ssmjviser-1.0.0/scripts/media/capture.py +473 -0
  65. ssmjviser-1.0.0/scripts/release/guard.py +92 -0
  66. ssmjviser-1.0.0/scripts/release/installed.py +48 -0
  67. ssmjviser-1.0.0/scripts/release/published.py +65 -0
  68. ssmjviser-1.0.0/scripts/release/report.py +103 -0
  69. ssmjviser-1.0.0/scripts/release-precheck.sh +47 -0
  70. ssmjviser-1.0.0/scripts/smoke_wheel.sh +83 -0
  71. ssmjviser-1.0.0/scripts/typing/check.sh +41 -0
  72. ssmjviser-1.0.0/scripts/typing/consumer.py +110 -0
  73. ssmjviser-1.0.0/scripts/typing/misuse.py +21 -0
  74. ssmjviser-1.0.0/scripts/typing/mypy.ini +6 -0
  75. ssmjviser-1.0.0/src/mj_viser/__init__.py +32 -0
  76. ssmjviser-1.0.0/src/mj_viser/channels.py +421 -0
  77. ssmjviser-1.0.0/src/mj_viser/contacts.py +288 -0
  78. ssmjviser-1.0.0/src/mj_viser/geom_builders.py +217 -0
  79. ssmjviser-1.0.0/src/mj_viser/gui.py +50 -0
  80. ssmjviser-1.0.0/src/mj_viser/integrations/__init__.py +8 -0
  81. ssmjviser-1.0.0/src/mj_viser/integrations/ssrobot/__init__.py +84 -0
  82. ssmjviser-1.0.0/src/mj_viser/integrations/ssrobot/channels.py +180 -0
  83. ssmjviser-1.0.0/src/mj_viser/integrations/ssrobot/preview.py +266 -0
  84. ssmjviser-1.0.0/src/mj_viser/integrations/ssrobot/replay.py +259 -0
  85. ssmjviser-1.0.0/src/mj_viser/live.py +197 -0
  86. ssmjviser-1.0.0/src/mj_viser/mesh_utils.py +67 -0
  87. ssmjviser-1.0.0/src/mj_viser/panels.py +58 -0
  88. ssmjviser-1.0.0/src/mj_viser/preview.py +481 -0
  89. ssmjviser-1.0.0/src/mj_viser/py.typed +0 -0
  90. ssmjviser-1.0.0/src/mj_viser/recording.py +193 -0
  91. ssmjviser-1.0.0/src/mj_viser/scene.py +311 -0
  92. ssmjviser-1.0.0/src/mj_viser/sensor_panel.py +159 -0
  93. ssmjviser-1.0.0/src/mj_viser/viewer.py +368 -0
  94. ssmjviser-1.0.0/uv.lock +905 -0
@@ -0,0 +1 @@
1
+ * @siddhss5
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a reproducible bug
4
+ labels: bug
5
+ ---
6
+
7
+ ## Environment
8
+ - OS:
9
+ - Python version:
10
+ - mj_viser version or commit:
11
+ - How it was installed (release wheel, pip, uv):
12
+ - ssrobot version or commit (if using `mj_viser.integrations.ssrobot`):
13
+
14
+ ## Reproduction
15
+ <!-- Minimal steps to reproduce the problem. -->
16
+
17
+ ## Expected behavior
18
+
19
+ ## Actual behavior
20
+
21
+ ## Logs / traceback
22
+ ```
23
+ ```
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Viser
4
+ url: https://github.com/viser-project/viser/issues
5
+ about: Problems in Viser itself (the browser client, recordings, or its server).
6
+ - name: ssrobot
7
+ url: https://github.com/personalrobotics/ssrobot/issues
8
+ about: Problems in ssrobot runs, bundles, or the reference robots.
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: Improvement
3
+ about: Propose an enhancement to existing functionality
4
+ labels: enhancement
5
+ ---
6
+
7
+ ## Motivation
8
+ <!-- What problem or limitation prompts this improvement? -->
9
+
10
+ ## Proposal
11
+ <!-- What should change, concretely? -->
12
+
13
+ ## Alternatives considered
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: Task
3
+ about: A planned unit of work
4
+ labels: task
5
+ ---
6
+
7
+ ## Goal
8
+
9
+ ## Acceptance criteria
10
+ - [ ]
11
+
12
+ ## Notes
@@ -0,0 +1,24 @@
1
+ ## Summary
2
+
3
+ <!-- One or two sentences describing what this PR does and why. -->
4
+
5
+ ## Changes
6
+
7
+ <!-- Bulleted list of the concrete changes made. -->
8
+ -
9
+
10
+ ## Testing
11
+
12
+ - [ ] `uv run ruff check .` and `uv run ruff format --check .` pass
13
+ - [ ] `uv run mypy src` passes
14
+ - [ ] `scripts/smoke_wheel.sh dist/smoke locked` passes
15
+ - [ ] The ssrobot integration jobs pass (if `mj_viser.integrations.ssrobot` changed)
16
+
17
+ ## Breaking changes
18
+
19
+ - [ ] None
20
+ - [ ] Yes (describe migration below):
21
+
22
+ ## Related issues
23
+
24
+ <!-- e.g. Fixes #123 -->
@@ -0,0 +1,371 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+ # The release workflow runs these same jobs on the commit it releases, then publishes
10
+ # the dist artifact they verified.
11
+ workflow_call:
12
+ # Nightly: the newest dependency releases on every Python, without waiting for a push.
13
+ schedule:
14
+ - cron: "0 7 * * *"
15
+
16
+ concurrency:
17
+ group: ci-${{ github.ref }}
18
+ cancel-in-progress: true
19
+
20
+ permissions:
21
+ contents: read
22
+
23
+ # Third-party actions are pinned to commit SHAs (tag in the trailing comment).
24
+ jobs:
25
+ # Gates, then build the sdist and the wheel (from the sdist) exactly once.
26
+ build:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
30
+
31
+ - name: Set up uv
32
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
33
+ with:
34
+ enable-cache: true
35
+ python-version: "3.12"
36
+
37
+ - name: Install locked dependencies
38
+ run: uv sync --locked --all-extras
39
+
40
+ - name: Ruff lint
41
+ run: uv run ruff check .
42
+
43
+ - name: Ruff format check
44
+ run: uv run ruff format --check .
45
+
46
+ - name: Strict type check
47
+ run: uv run mypy src
48
+
49
+ - name: Build sdist and wheel
50
+ run: |
51
+ uv build --out-dir dist
52
+ (cd dist && sha256sum * > SHA256SUMS && cat SHA256SUMS)
53
+
54
+ # The wheel's long description, rendered as PyPI renders it: every image and link
55
+ # absolute and resolving to this repository's main branch where it points there.
56
+ - name: Check the README as PyPI shows it
57
+ run: uv run --no-project --with "readme-renderer[md]==44.0" python scripts/check_readme.py dist .
58
+
59
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
60
+ with:
61
+ name: dist
62
+ path: dist/
63
+ if-no-files-found: error
64
+
65
+ # A downstream project's strict type check against the uploaded wheel (py.typed).
66
+ typed-consumer:
67
+ needs: build
68
+ runs-on: ubuntu-latest
69
+ steps:
70
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
71
+
72
+ - name: Set up uv
73
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
74
+ with:
75
+ enable-cache: true
76
+ python-version: "3.12"
77
+
78
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
79
+ with:
80
+ name: dist
81
+ path: dist/
82
+
83
+ - name: Verify artifact hashes
84
+ run: (cd dist && sha256sum -c SHA256SUMS)
85
+
86
+ - name: Strict type check of a downstream consumer
87
+ run: scripts/typing/check.sh "$(ls dist/ssmjviser-*.whl)" typed-consumer.json
88
+
89
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
90
+ with:
91
+ name: typed-consumer
92
+ path: typed-consumer.json
93
+ if-no-files-found: error
94
+
95
+ # Tests run against the uploaded wheel, not a rebuild. One job per (Python, environment)
96
+ # so they run in parallel. Pull requests check the locked versions on every Python plus
97
+ # the declared minimums and the newest releases; main, nightly, and manual runs also check
98
+ # the newest releases on every Python.
99
+ test:
100
+ name: test (${{ matrix.python }}, ${{ matrix.env }})
101
+ needs: build
102
+ runs-on: ubuntu-latest
103
+ strategy:
104
+ fail-fast: false
105
+ matrix:
106
+ include: >-
107
+ ${{ fromJSON(github.event_name == 'pull_request' && '[
108
+ {"python": "3.11", "env": "lowest"},
109
+ {"python": "3.11", "env": "locked"},
110
+ {"python": "3.12", "env": "locked"},
111
+ {"python": "3.13", "env": "locked"},
112
+ {"python": "3.14", "env": "locked"},
113
+ {"python": "3.14", "env": "latest"}
114
+ ]' || '[
115
+ {"python": "3.11", "env": "lowest"},
116
+ {"python": "3.11", "env": "locked"},
117
+ {"python": "3.12", "env": "locked"},
118
+ {"python": "3.13", "env": "locked"},
119
+ {"python": "3.14", "env": "locked"},
120
+ {"python": "3.11", "env": "latest"},
121
+ {"python": "3.12", "env": "latest"},
122
+ {"python": "3.13", "env": "latest"},
123
+ {"python": "3.14", "env": "latest"}
124
+ ]') }}
125
+ steps:
126
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
127
+
128
+ - name: Set up uv
129
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
130
+ with:
131
+ enable-cache: true
132
+ python-version: ${{ matrix.python }}
133
+
134
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
135
+ with:
136
+ name: dist
137
+ path: dist/
138
+
139
+ - name: Verify artifact hashes
140
+ run: (cd dist && sha256sum -c SHA256SUMS)
141
+
142
+ # Public robots from MuJoCo Menagerie, pinned to one commit: a textured arm with cameras
143
+ # (trossen_wxai), a gripper with tendons (robotiq_2f85), and a legged robot (unitree_go1),
144
+ # with sites in several groups between them.
145
+ - name: Fetch robot fixtures
146
+ run: |
147
+ git init -q menagerie
148
+ git -C menagerie remote add origin https://github.com/google-deepmind/mujoco_menagerie.git
149
+ git -C menagerie sparse-checkout set trossen_wxai robotiq_2f85 unitree_go1
150
+ git -C menagerie fetch -q --depth 1 --filter=blob:none origin feadf76d42f8a2162426f7d226a3b539556b3bf5
151
+ git -C menagerie checkout -q FETCH_HEAD
152
+
153
+ # Software OpenGL, so the texture check can compare against MuJoCo's renderer.
154
+ - name: Install OSMesa
155
+ run: sudo apt-get update -qq && sudo apt-get install -y -qq libosmesa6
156
+
157
+ - name: Clean-wheel end-to-end check
158
+ env:
159
+ MUJOCO_GL: osmesa
160
+ MJ_VISER_REQUIRE_RENDER: "1"
161
+ run: |
162
+ robots=menagerie/trossen_wxai/scene.xml:menagerie/robotiq_2f85/scene.xml:menagerie/unitree_go1/scene.xml
163
+ MJ_VISER_WHEEL="$(ls dist/ssmjviser-*.whl)" MJ_VISER_ROBOT_XML=$robots scripts/smoke_wheel.sh e2e ${{ matrix.env }}
164
+ cp dist/SHA256SUMS e2e/
165
+
166
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
167
+ with:
168
+ name: e2e-py${{ matrix.python }}-${{ matrix.env }}
169
+ path: e2e/
170
+ if-no-files-found: error
171
+
172
+ # Live ssrobot view (#28) on the reference robots: ssrobot and the Geodude and ADA packages,
173
+ # each pinned to a commit (the robots at the commits ssrobot itself pins in references/).
174
+ ssrobot-live:
175
+ name: ssrobot live view
176
+ needs: build
177
+ runs-on: ubuntu-latest
178
+ steps:
179
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
180
+
181
+ - name: Set up uv
182
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
183
+ with:
184
+ enable-cache: true
185
+ python-version: "3.12"
186
+
187
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
188
+ with:
189
+ name: dist
190
+ path: dist/
191
+
192
+ - name: Verify artifact hashes
193
+ run: (cd dist && sha256sum -c SHA256SUMS)
194
+
195
+ - name: Install the wheel, ssrobot, and the reference robots
196
+ run: |
197
+ uv venv --quiet .ssrobot
198
+ uv pip install --quiet --python .ssrobot/bin/python "$(ls dist/ssmjviser-*.whl)" \
199
+ "ssrobot[mujoco] @ git+https://github.com/personalrobotics/ssrobot.git@116f3c8214a6b3cc297a640a0ddf622c6fe497db" \
200
+ "geodude-assets @ git+https://github.com/personalrobotics/geodude_assets.git@4f57fc45508c5dcad0c2426f48bb046d499340d0" \
201
+ "ada-assets @ git+https://github.com/personalrobotics/ada_assets.git@b9880d45457dde90ae11f3704b6d8b1b6e99d00d"
202
+
203
+ # Software OpenGL: ADA's wrist camera is observed, and MuJoCo renders it.
204
+ - name: Install OSMesa
205
+ run: sudo apt-get update -qq && sudo apt-get install -y -qq libosmesa6
206
+
207
+ - name: Live view changes nothing
208
+ env:
209
+ MUJOCO_GL: osmesa
210
+ PYOPENGL_PLATFORM: osmesa
211
+ run: |
212
+ mkdir -p ssrobot-live && cd ssrobot-live
213
+ ../.ssrobot/bin/python -I ../scripts/e2e/ssrobot_live.py .
214
+ cat ssrobot_live.json
215
+
216
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
217
+ with:
218
+ name: ssrobot-live
219
+ path: ssrobot-live/
220
+ if-no-files-found: error
221
+
222
+ ssrobot-replay:
223
+ name: ssrobot replay
224
+ needs: build
225
+ runs-on: ubuntu-latest
226
+ steps:
227
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
228
+
229
+ # The reference scenes, from the same ssrobot commit as the package.
230
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
231
+ with:
232
+ repository: personalrobotics/ssrobot
233
+ ref: 116f3c8214a6b3cc297a640a0ddf622c6fe497db
234
+ path: .ssrobot-src
235
+ sparse-checkout: references
236
+ persist-credentials: false
237
+
238
+ - name: Set up uv
239
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
240
+ with:
241
+ enable-cache: true
242
+ python-version: "3.12"
243
+
244
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
245
+ with:
246
+ name: dist
247
+ path: dist/
248
+
249
+ - name: Verify artifact hashes
250
+ run: (cd dist && sha256sum -c SHA256SUMS)
251
+
252
+ - name: Install the wheel, ssrobot, and the reference robots
253
+ run: |
254
+ uv venv --quiet .ssrobot
255
+ uv pip install --quiet --python .ssrobot/bin/python "$(ls dist/ssmjviser-*.whl)" \
256
+ "ssrobot[mujoco] @ git+https://github.com/personalrobotics/ssrobot.git@116f3c8214a6b3cc297a640a0ddf622c6fe497db" \
257
+ "geodude-assets @ git+https://github.com/personalrobotics/geodude_assets.git@4f57fc45508c5dcad0c2426f48bb046d499340d0" \
258
+ "ada-assets @ git+https://github.com/personalrobotics/ada_assets.git@b9880d45457dde90ae11f3704b6d8b1b6e99d00d"
259
+
260
+ # Software OpenGL: ADA's wrist camera is observed, and MuJoCo renders it.
261
+ - name: Install OSMesa
262
+ run: sudo apt-get update -qq && sudo apt-get install -y -qq libosmesa6
263
+
264
+ - name: Replay Geodude and ADA from their run bundles
265
+ env:
266
+ MUJOCO_GL: osmesa
267
+ PYOPENGL_PLATFORM: osmesa
268
+ run: |
269
+ mkdir -p ssrobot-replay && cd ssrobot-replay
270
+ ../.ssrobot/bin/python -I ../scripts/e2e/ssrobot_adapters.py adapters
271
+ ../.ssrobot/bin/python -I ../scripts/e2e/ssrobot_replay.py ../.ssrobot-src/references/scenes .
272
+ cat ssrobot_replay.json
273
+ sha256sum */converted/* > SHA256SUMS
274
+
275
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
276
+ with:
277
+ name: ssrobot-replay
278
+ path: |
279
+ ssrobot-replay/ssrobot_replay.json
280
+ ssrobot-replay/SHA256SUMS
281
+ ssrobot-replay/adapters/
282
+ ssrobot-replay/*/bundle/
283
+ ssrobot-replay/*/converted/
284
+ if-no-files-found: error
285
+
286
+ ssrobot-preview:
287
+ name: ssrobot plan preview
288
+ needs: build
289
+ runs-on: ubuntu-latest
290
+ steps:
291
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
292
+
293
+ # The reference scenes, from the same ssrobot commit as the package.
294
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
295
+ with:
296
+ repository: personalrobotics/ssrobot
297
+ ref: 116f3c8214a6b3cc297a640a0ddf622c6fe497db
298
+ path: .ssrobot-src
299
+ sparse-checkout: references
300
+ persist-credentials: false
301
+
302
+ - name: Set up uv
303
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
304
+ with:
305
+ enable-cache: true
306
+ python-version: "3.12"
307
+
308
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
309
+ with:
310
+ name: dist
311
+ path: dist/
312
+
313
+ - name: Verify artifact hashes
314
+ run: (cd dist && sha256sum -c SHA256SUMS)
315
+
316
+ - name: Install the wheel, ssrobot, and the reference robots
317
+ run: |
318
+ uv venv --quiet .ssrobot
319
+ uv pip install --quiet --python .ssrobot/bin/python "$(ls dist/ssmjviser-*.whl)" \
320
+ "ssrobot[mujoco,planning] @ git+https://github.com/personalrobotics/ssrobot.git@116f3c8214a6b3cc297a640a0ddf622c6fe497db" \
321
+ "geodude-assets @ git+https://github.com/personalrobotics/geodude_assets.git@4f57fc45508c5dcad0c2426f48bb046d499340d0" \
322
+ "ada-assets @ git+https://github.com/personalrobotics/ada_assets.git@b9880d45457dde90ae11f3704b6d8b1b6e99d00d"
323
+
324
+ # Software OpenGL: ADA's wrist camera is observed, and MuJoCo renders it.
325
+ - name: Install OSMesa
326
+ run: sudo apt-get update -qq && sudo apt-get install -y -qq libosmesa6
327
+
328
+ - name: Preview Geodude and ADA plans
329
+ env:
330
+ MUJOCO_GL: osmesa
331
+ PYOPENGL_PLATFORM: osmesa
332
+ run: |
333
+ mkdir -p ssrobot-preview && cd ssrobot-preview
334
+ ../.ssrobot/bin/python -I ../scripts/e2e/ssrobot_preview.py ../.ssrobot-src/references/scenes .
335
+ ../.ssrobot/bin/python -I ../scripts/e2e/ssrobot_contacts.py ../.ssrobot-src/references contacts
336
+ cat ssrobot_preview.json
337
+ sha256sum */*.result.json */offset.preview.* > SHA256SUMS
338
+
339
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
340
+ with:
341
+ name: ssrobot-preview
342
+ path: |
343
+ ssrobot-preview/ssrobot_preview.json
344
+ ssrobot-preview/SHA256SUMS
345
+ ssrobot-preview/*/*.result.json
346
+ ssrobot-preview/*/offset.preview.*
347
+ ssrobot-preview/*/*.trace.jsonl
348
+ ssrobot-preview/contacts/
349
+ if-no-files-found: error
350
+
351
+ # Legacy integration hook. It needs a token that is not configured, so it is skipped
352
+ # rather than failing main until robot-code owns a replacement.
353
+ notify-robot-code:
354
+ needs: [test, typed-consumer, ssrobot-live, ssrobot-replay, ssrobot-preview]
355
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
356
+ runs-on: ubuntu-latest
357
+ env:
358
+ DISPATCH_TOKEN: ${{ secrets.ROBOT_CODE_DISPATCH_TOKEN }}
359
+ steps:
360
+ - name: Report missing token
361
+ if: env.DISPATCH_TOKEN == ''
362
+ run: echo "::notice::ROBOT_CODE_DISPATCH_TOKEN is not configured; skipping robot-code dispatch."
363
+
364
+ - name: Dispatch integration run
365
+ if: env.DISPATCH_TOKEN != ''
366
+ uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
367
+ with:
368
+ token: ${{ env.DISPATCH_TOKEN }}
369
+ repository: personalrobotics/robot-code
370
+ event-type: sibling-updated
371
+ client-payload: '{"repo":"${{ github.event.repository.name }}","sha":"${{ github.sha }}"}'