Skip to content

feat: make viser a required dependency and support viser playback on all playback-capable backends - #1638

Merged
TATP-233 merged 1 commit into
mainfrom
feat/viser-required-all-backends
Sep 24, 2026
Merged

TATP-233 merged 1 commit into
mainfrom
feat/viser-required-all-backends

Conversation

@TATP-233

@TATP-233 TATP-233 commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • viser 从可选 extra 变为必选依赖(viser>=1.0.26、trimesh>=3.21.7 进入核心 dependencies,viser extra 移除),删除所有 VISER_AVAILABLE 守卫与安装提示预检。
  • 抽出可复用的 viser 回放循环 src/unilab/visualization/viser_playback.py,eval(play_viser.py)与 train(三个训练脚本支持 training.play_render_mode=viser)共用。
  • CLI:eval --render-mode viser 不再限定 mujoco/mjwarp,凡声明 physics-state playback 的后端(mujoco/mjwarp/newton/drake/superdex)都路由到 viser viewer;motrix/genesis/isaacgym/isaacsim 因上游 unisim 未实现该契约而 fail-closed 并给出指向原生渲染的提示。
  • viser 场景的 geom 可见性对齐 MuJoCo 默认(group 0–2 可见,3–5 隐藏),修复 g1_motion_tracking 的 group-3 绿色碰撞体被渲染的问题;visible_geom_groups 参数可覆盖。
  • 同步更新 en/zh_CN 文档与测试;两份 pyproject 注释精简。

Linked Work

Validation

  • make test-all passed on the final local head before this PR was created or updated(见下方说明)
  • Additional task-specific validation listed below

Commands actually run:

make check                 # ruff / mypy / pyright / tests lint 全过
make test-all              # check + test-cov + benchmark smoke
make test-benchmark-smoke  # module-mode 35/35, script-mode 36/36
uv run pytest tests/test_cli.py tests/utils/test_viser_scene.py tests/visualization/test_playback_state.py -q  # 73 passed
timeout 90 uv run scripts/play_viser.py task=go2_joystick_flat/mujoco interactive.action_mode=zero viser.max_envs=2  # server 正常起服并渲染 2 env
uv run eval --algo ppo --task go2_joystick_flat --sim motrix --render-mode viser  # 按预期 fail-closed

说明:make test-all 中唯一失败项 tests/scripts/test_check_docs.py::test_documentation_files_match_current_repo_contracts 在干净 main(bec5495c)上同样失败,3 条错误均位于 scripts/benchmark/outputs/,与本 PR 无关;本 PR 改动的文档未引入新的契约违规。

Remote CI route:

Impact

  • Backend impact: both(mujoco 系渲染行为修正 geom group;motrix/genesis/isaacgym/isaacsim 显式 fail-closed)
  • Platform impact: both
  • Training effect expected: no(仅训练后回放渲染路径;viser 模式不录制视频)

Artifacts

  • W&B: N/A
  • benchmark result: N/A
  • video / screenshot: N/A(本地冒烟日志见验证命令)
  • ONNX / checkpoint: N/A

Checklist

…all playback-capable backends

- move viser/trimesh into core dependencies (drop the viser extra)
- extract the viser viewer loop into visualization/viser_playback.py so
  train post-playback (training.play_render_mode=viser) and eval share it
- cli: route eval --render-mode viser to play_viser.py for any backend with
  physics-state playback (mujoco/mjwarp/newton/drake/superdex); fail closed
  with a targeted message for motrix/genesis/isaacgym/isaacsim, which need
  upstream unisim capability work (unilabsim/unisim#302)
- viser scene: filter geom groups to MuJoCo's default visible set (0-2) so
  group-3 collision markers stay hidden; visible_geom_groups overrides it
- update docs (en/zh_CN) and tests
@TATP-233
TATP-233 requested a review from caozx1110 as a code owner September 23, 2026 14:30
@TATP-233
TATP-233 merged commit 3f1c415 into main Sep 24, 2026
8 checks passed
@TATP-233
TATP-233 deleted the feat/viser-required-all-backends branch September 24, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant