Skip to content

Fix Viser rendering for simulation axis markers - #511

Merged
yuecideng merged 2 commits into
mainfrom
codex/fix-viser-axis-markers
Aug 14, 2026
Merged

Fix Viser rendering for simulation axis markers#511
yuecideng merged 2 commits into
mainfrom
codex/fix-viser-axis-markers

Conversation

@yuecideng

Copy link
Copy Markdown
Contributor

Description

This PR exports coordinate-frame markers created through SimulationManager.draw_marker() as backend-neutral frame overlays so they render in Viser with the correct world pose, axis length, and radius.

In headless Viser runs, native DexSim axis handles report is_visible() == False even when the marker was requested for display. The exporter now treats registered marker groups as visible until remove_marker() removes them, preventing target frames from being hidden while preserving marker lifecycle behavior.

Dependencies: None.

Issue: None.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

  • Before: only the Viser /world coordinate frame was visible; simulation target markers were hidden.
  • After: coordinated_placement.py displays both support-pan and placing-bread target frames at their expected poses.

Validation

  • conda run -n open black --check --diff --color ./ — 904 files unchanged
  • conda run -n open pytest -q tests/visualization/test_scene_exporter.py tests/visualization/test_viser_backend.py tests/sim/test_sim_manager.py — 48 passed
  • conda run --no-capture-output -n open python scripts/tutorials/atomic_action/coordinated_placement.py --viser --viser-port 8769 --diagnose_plan — axis stage reached successfully
  • Live Viser check — both target axes appeared, disappeared with the Frames toggle, and reappeared when enabled

Checklist

  • I have run the black . command to format the code base.
  • I have made corresponding changes to the documentation (not required for this internal backend fix).
  • I have added tests that prove my fix is effective or that my feature works.
  • Dependencies have been updated (not applicable).

Export SimulationManager axis markers as frame overlays with their world poses and dimensions. Keep them visible in headless mode and cover the exporter/backend behavior with regression tests.
@yuecideng yuecideng added bug Something isn't working visualization Features or functions for visualization with the simulation rendering Things related to rendering (eg, performace, efficiency, bug) labels Aug 13, 2026
@greptile-apps

greptile-apps Bot commented Aug 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR exports active simulation axis markers as backend-neutral frame overlays so Viser can render their world pose and dimensions.

  • Stores marker handles and display dimensions in a dedicated marker-group record.
  • Generates collision-free frame-overlay IDs while preserving caller-provided overlays.
  • Adds exporter and Viser backend coverage for marker rendering and ID collisions.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
embodichain/lab/sim/sim_manager.py Records active axis marker handles, arena ownership, and display dimensions for backend-neutral export.
embodichain/lab/visualization/scene_exporter.py Converts registered axis markers into uniquely identified frame overlays and merges them with caller overlays.
tests/visualization/test_scene_exporter.py Verifies headless marker export, pose and dimensions, and collision handling with caller-owned frame IDs.
tests/visualization/test_viser_backend.py Verifies that marker frame overlays reach Viser with the expected path, pose, dimensions, and visibility.

Fix All in Greploop

Reviews (2): Last reviewed commit: "fix(visualization): avoid marker overlay..." | Re-trigger Greptile

Comment thread embodichain/lab/visualization/scene_exporter.py
@yuecideng
yuecideng merged commit b3ed4c5 into main Aug 14, 2026
7 of 9 checks passed
@yuecideng
yuecideng deleted the codex/fix-viser-axis-markers branch August 14, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working rendering Things related to rendering (eg, performace, efficiency, bug) visualization Features or functions for visualization with the simulation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant