Skip to content

refactor(visualization): consume unisim.visualization for playback, geom meshes, and debug primitives - #2662

Merged
TATP-233 merged 2 commits into
mainfrom
feat/issue-2660-consume-unisim-visualization
Nov 27, 2026
Merged

TATP-233 merged 2 commits into
mainfrom
feat/issue-2660-consume-unisim-visualization

Conversation

@TATP-233

@TATP-233 TATP-233 commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • UniLab stops carrying its own copies of the Viser playback, geom-mesh, and debug-primitive helpers and consumes unisim.visualization instead. This is the UniLab half of Roadmap: move generic viser playback primitives from unilab.visualization to unisim as optional [viz] extra #2660; unisim-core has shipped those primitives since 2.8.6, which chore(deps): pin unisim-core 2.8.6 #2661 pinned in both dependency tracks.
  • unilab.visualization.playback_clock, viser_playback_controls, and viser_utils are removed together with their tests. They never shipped in a UniLab release. PlaybackClock, PlaybackTimelineGui, set_handle_property, nominal_fps, cylinder_transform, and scaled_vector_endpoint now live in unisim.visualization with unchanged names and semantics. No re-export, shim, or alias. UniLab keeps its own viser dependency for its existing viewers.
  • viser_scene draws batched meshes through unisim.visualization.mujoco_geom.geom_mesh instead of its private _geom_mesh/_extract_mesh. The batched-viewer output is unchanged. The single-scene viewer keeps its native Viser primitives and its two inline trimesh meshes on purpose: routing its capsule through add_mesh_simple could change the shading, and its ellipsoid uses a finer tessellation.
  • unilab.visualization.debug_primitives, the transitional interactive-viewer injector of ADR-0008, is removed. play_interactive.py builds DebugPrimitive lists and injects them with unisim.visualization.debug_primitives.append_debug_primitives(viewer.user_scn, [primitives]). The duck-typed line kind that task-owned ray overlays emit is drawn by the shared unisim conversion. ADR-0008 records the delegation in an amendment.
  • No user-facing behavior changes and no training impact.

Linked Work

Validation

  • make test-all passed on the final local head before this PR was created
  • Additional task-specific validation listed below

Commands actually run:

make sync && make test-all
uv run pytest -q -m slow tests/scripts/test_visualization_entrypoints.py
uv run pytest tests/scripts/test_check_docs.py -q
uv build
git diff --check
  • make test-all: Ruff, mypy (212 source files), and pyright (0 errors, 1 existing warning) passed; 2980 passed, 67 skipped, 380 deselected; benchmark smoke 35/35 module-mode and 36/36 script-mode.
  • Against chore(deps): pin unisim-core 2.8.6 #2661's 3000 passed: the 22 tests of the four removed modules are gone and two batched-scene tests were added. The third new test is slow-marked, hence 380 instead of 379 deselected.
  • Slow-marked visualization entrypoint tests, including the new binding test for the delegation: 16 passed.
  • Docs check: 20 passed.
  • The tree was validated against the published unisim-core 2.8.6 wheel from the registry, not an editable checkout. Earlier, the same change was also run against the unreleased unisim tree that became 2.8.6.
  • Sphinx: the docs build; the 9 diagnostics are the same as on main and none is in the changelog or ADR-0008.
  • uv build: built the unilab sdist and wheel.

Remote CI route:

Impact

  • Backend impact: none (visualization and the interactive player only)
  • Platform impact: both
  • Training effect expected: no

Artifacts

  • W&B: none
  • benchmark result: none
  • video / screenshot: none
  • ONNX / checkpoint: none

Checklist

  • Added or updated tests where needed: batched-scene coverage for every geom type geom_mesh supports, and a binding test that play_interactive.py uses unisim's conversion. The tests of the removed modules moved to unisim with the code.
  • Updated docs if behavior or workflow changed: changelog entries and the ADR-0008 amendment.
  • Linked the driving issue
  • Noted any follow-up work explicitly: the downstream leanretarget and h2r_bench switch to unisim.visualization after this ships.

unisim.visualization has owned PlaybackClock, PlaybackTimelineGui, and
the viser_utils helpers since unilabsim/unisim#561, released as
unisim-core 2.8.6. Remove the UniLab copies, which never shipped in a
UniLab release, together with their tests, with no re-export, shim, or
alias. Downstream viewers import the primitives from
unisim.visualization and install Viser through the optional
unisim-core[viz] extra when they host a real server; UniLab keeps its
own viser dependency for its existing viewers (#2660).
viser_scene draws batched meshes through
unisim.visualization.mujoco_geom.geom_mesh instead of its private
_geom_mesh/_extract_mesh helpers (unilabsim/unisim#565, released as
unisim-core 2.8.6); the batched-viewer output is unchanged.

unilab.visualization.debug_primitives, the transitional interactive-viewer
injector of ADR-0008, is removed with no re-export, shim, or alias.
play_interactive.py builds DebugPrimitive lists and injects them with
unisim.visualization.debug_primitives.append_debug_primitives
(unilabsim/unisim#566), which also draws the duck-typed "line" kind that
task-owned ray overlays emit. ADR-0008 records the delegation
(#2660).
@TATP-233
TATP-233 merged commit d11e8f0 into main Nov 27, 2026
12 checks passed
@TATP-233 TATP-233 mentioned this pull request Nov 27, 2026
@TATP-233
TATP-233 deleted the feat/issue-2660-consume-unisim-visualization branch November 27, 2026 10:55
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