feat: visualize manipulation obstacles#3108
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #3108 +/- ##
==========================================
+ Coverage 73.37% 73.59% +0.22%
==========================================
Files 1071 1068 -3
Lines 100406 99680 -726
Branches 9136 9863 +727
==========================================
- Hits 73672 73363 -309
+ Misses 24279 23712 -567
- Partials 2455 2605 +150
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 28 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Co-authored-by: cc <55869557+TomCC7@users.noreply.github.com>
Greptile SummaryThis PR adds planner obstacle rendering to the external Viser visualization. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "[autofix.ci] apply automated fixes" | Re-trigger Greptile |
| from viser import ( | ||
| GridHandle, | ||
| MeshHandle, | ||
| SceneNodeHandle, |
There was a problem hiding this comment.
Optional Backend Import Can Fail
When an installed viser version does not export SceneNodeHandle at its package root, this import raises ImportError. The nearby handler only catches ModuleNotFoundError, so selecting the Viser backend can fail while loading the module instead of reporting an unavailable or incompatible optional backend.
Contribution path
visualize-manipulation-obstacles)Problem
Planner-world obstacles were not visible in the external Viser visualization. Existing obstacle identity also leaked from
Obstacle.nameinstead of being owned by the planning world.Solution
VisualizationSpec; Viser renders it and native Meshcat implements no-ops because it already synchronizes internally.WorldMonitor, including initialization during world finalization before startup obstacles are added.WorldSpec.add_obstacle()return the native world-owned obstacle ID orNonewhen insertion is not accepted.How to Test
Automated:
uv run pytest dimos/manipulation/planning/monitor/test_world_monitor.py dimos/manipulation/visualization/viser/test_viser_visualization.py dimos/manipulation/test_roboplan_world.py dimos/manipulation/visualization/test_factory.pyManual Viser check:
ViserVisualizationConfigin the foreground, then openhttp://127.0.0.1:8095.uv run python -i -m dimos.manipulation.planning.examples.manipulation_client.obstacle_id = add_box("manual-box", 0.5, 0, 0.2); verify it appears in Viser, then runremove(obstacle_id)and verify it disappears. ToggleScene → manipulation.obstaclesto verify layer visibility.AI assistance
OpenAI Codex with gpt-5.6-terra; used extensively for implementation, testing, and review coordination.
Checklist