Repository navigation
refactor(visualization): consume unisim.visualization for playback, geom meshes, and debug primitives - #2662
Merged
Conversation
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).
Merged
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
unisim.visualizationinstead. This is the UniLab half of Roadmap: move generic viser playback primitives from unilab.visualization to unisim as optional [viz] extra #2660;unisim-corehas 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, andviser_utilsare removed together with their tests. They never shipped in a UniLab release.PlaybackClock,PlaybackTimelineGui,set_handle_property,nominal_fps,cylinder_transform, andscaled_vector_endpointnow live inunisim.visualizationwith unchanged names and semantics. No re-export, shim, or alias. UniLab keeps its ownviserdependency for its existing viewers.viser_scenedraws batched meshes throughunisim.visualization.mujoco_geom.geom_meshinstead 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 throughadd_mesh_simplecould 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.pybuildsDebugPrimitivelists and injects them withunisim.visualization.debug_primitives.append_debug_primitives(viewer.user_scn, [primitives]). The duck-typedlinekind that task-owned ray overlays emit is drawn by the shared unisim conversion. ADR-0008 records the delegation in an amendment.Linked Work
mainValidation
make test-allpassed on the final local head before this PR was createdCommands 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 --checkmake 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.unisim-core 2.8.6wheel from the registry, not an editable checkout. Earlier, the same change was also run against the unreleased unisim tree that became 2.8.6.mainand none is in the changelog or ADR-0008.uv build: built the unilab sdist and wheel.Remote CI route:
main: current-head CI on5c17139passed, all jobs green — https://github.com/Motphys/UniLab/actions/runs/45983977335Impact
Artifacts
Checklist
geom_meshsupports, and a binding test thatplay_interactive.pyuses unisim's conversion. The tests of the removed modules moved to unisim with the code.unisim.visualizationafter this ships.