Enable viser rendering for the motrix backend - #1639
Merged
Merged
Conversation
unisim-core 1.7.6 (unilabsim/unisim#302) implements the physics-state playback contract on the Motrix adapter for both portable entity scenes and audited whole-MJCF scenes, so the viser viewer no longer fail-closes on --sim motrix: eval routes to play_viser.py and train forwards training.play_render_mode=viser, and the browser-based viewer no longer requires mxpython on macOS. genesis/isaacgym/isaacsim keep their fail-closed rejection, now covered by dedicated tests.
The whole-MJCF joint-order validation added in unilabsim/unisim#302 runs at MotrixBackend construction: fake-model tests stub it out (its own coverage lives upstream), the pre-step-control fake gains the new _time_view/_sim_dt playback-clock fields, and the stewart scene names its twelve passive leg hinges (physics unchanged) because the validation requires named MJCF joints.
Collaborator
Author
|
CI 暴露了两类问题,均已定位:
本地用修复版 unisim 全量复验:1544 passed,唯一失败是 main 上既有的 docs 检查项。 |
unisim-core 1.7.8 merges every <worldbody> section (including the ones inlined by <include>) in extract_mjcf_joint_layout, matching MuJoCo. Without it, scenes composed from includes that each carry a worldbody (for example the Allegro in-hand scene) fail motrix playback validation at construction with a generalized-state dimension mismatch.
The test job restores a long-lived actions/cache snapshot of src/unilab/assets/robots to reuse HF-downloaded meshes, but the snapshot also contains git-tracked scene XMLs and silently rolls them back to the cached revision. The stewart scene rename in this branch (named passive hinges, required by the unisim-core 1.7.6+ motrix joint-order validation) never reached the parser: CI kept reading the cached old XML and failed with 'a hinge joint on body leg00 is unnamed' while the checked-out commit carried the fix. Restore tracked files from the index after the cache extraction; untracked mesh downloads are unaffected.
Collaborator
Author
|
更新:unisim-core 1.7.8 已发布(含 unilabsim/unisim#306 的多 worldbody 合并修复),本 PR 三处 pin 已升到 >=1.7.8 并复锁 uv.lock,CI 全绿。 排查记录:升 pin 后 CI 曾持续报 stewart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1638: unisim-core 1.7.6 (unilabsim/unisim#302) implements the physics-state playback contract on the Motrix adapter — for both portable entity scenes and whole-MJCF scenes guarded by a construction-time MJCF joint-order validation — so the browser-based viser viewer no longer fail-closes on
--sim motrix.src/unilab/cli.py: motrix leavesVISER_UNSUPPORTED_SIMS(genesis/isaacgym/isaacsim keep their fail-closed rejection); viser is browser-based, so macOS motrix playback no longer requiresmxpythonfor this mode.unisim-core>=1.7.6(pyproject.toml,pyproject.rocm.toml,uv.lock): the motrix playback contract only exists since 1.7.6.play_viser.py, train →training.play_render_mode=viserforwarded to the train script); new genesis eval/train rejection cases keep the fail-closed branch covered.Validation
uv run pytest tests/test_cli.py tests/visualization -q— 119 passedmake check— green (ruff, mypy, pyright)tests/scripts/test_check_docs.py— only the 3 pre-existingscripts/benchmark/outputsfailures already present on clean mainlogs/rsl_rl_ppo/Go2JoystickFlat/2026-09-22_13-24-20_motrix):uv run eval --algo ppo --task go2_joystick_flat --sim motrix --render-mode viser viser.max_envs=2 viser.port=18099 training.play_steps=100— viser server comes up, 2 env slots render from motrix physics-state snapshots, ran 150s clean (server loop stopped by timeout).
Known scope boundary (upstream): kinematic mocap mirroring in playback is phase 2, so tasks whose playback MJCF carries mocap bodies (e.g. g1_motion_tracking) still fail closed at the PhysicsStateApplier with an actionable error.