feat(manip): draw the ranked grasp proposals in viser - #3876
Conversation
A learned provider returns up to a hundred grasps in a scored order, and until now the only way to see them was get_grasp_candidates, an RPC that answers after the fact. That is no help while the arm is choosing between them, and no help at all when the question is whether the generator is pointing anywhere sane. PickAndPlaceModule publishes its proposals on a stream as it makes them. ManipulationModule subscribes and hands them to the viewer through the world monitor, the same path obstacles and previews already take -- the grasp pipeline is a sibling module here and owns no visualizer of its own. VisualizationSpec grows one hook for it; meshcat implements it as a no-op, because it draws the planning world and these are not planning geometry. The viser scene draws each proposal as a pose glyph -- approach axis, closing axis across it -- coloured best-green through worst-orange, with the top three thicker and labelled with their score, capped at twenty because a hundred glyphs bury the ranking they exist to show. Deliberately a glyph and not a gripper: a jaw-shaped drawing sized by anything other than the configured sweep volume would be a claim about the hardware that nothing checks. A panel checkbox toggles them beside the obstacle one.
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Greptile SummaryThis change forwards ranked grasp proposals into the manipulation visualizer and renders labeled pose overlays. One correctness issue remains: a proposal is broadcast before its coordinate frame is checked, so a rejected proposal from another frame can still be rendered at incorrect coordinates. Publish proposals only after validating that they use the planning frame. T-Rex validation blockedThe focused reproduction could not run because the required Python tool at Confidence Score: 4/5Not ready to merge until rejected grasp proposals can no longer reach the visualizer. The picker publishes proposals before frame validation, and the downstream forwarding and rendering paths do not transform or reject those coordinates. The focused runtime check could not execute because the available Python environments cannot run this repository. Files Needing Attention: dimos/manipulation/pick_and_place_module.py needs publication moved after frame validation; dimos/manipulation/manipulation_module.py and dimos/manipulation/visualization/viser/scene.py receive and render the invalid publication.
What T-Rex did
|
A learned provider returns up to a hundred grasps in a scored order, and until now the only way to see them was
get_grasp_candidates, an RPC that answers after the fact. That is no help while the arm is choosing between them, and no help at all when the question is whether the generator is pointing anywhere sane.PickAndPlaceModulepublishes its proposals on a stream as it makes them.ManipulationModulesubscribes and hands them to the viewer through the world monitor, the same path obstacles and previews already take — the grasp pipeline is a sibling module here and owns no visualizer of its own.VisualizationSpecgrows one hook for it; meshcat implements it as a no-op, because it draws the planning world and these are not planning geometry.The scene draws each proposal as a pose glyph — approach axis, closing axis across it — coloured best-green through worst-orange, with the top three thicker and labelled with their score, capped at twenty because a hundred glyphs bury the ranking they exist to show. It is deliberately a glyph and not a gripper: a jaw-shaped drawing sized by anything other than the configured sweep volume would be a claim about the hardware that nothing checks, and the branch this stack re-derives from had exactly that — a
to_rerunonGraspCandidateArraywith its own hardcoded_JAW_HALF_WIDTHand_FINGER_LENGTH, duplicating the real gripper config. That is not ported. Neither is the ~800-line backend-neutral layers framework the branch grew around it, whose single consumer was this overlay; this is ~250 lines in the package's existing idiom instead.One test binds the drawn arrays against the real
viser.SceneApisignature and asserts their shapes, because a mocked server accepts any array and the first version of this shipped colours as (N, 3) where viser wants (N, 2, 3) — which surfaced only as a swallowedGrasp proposal visualization failedin a live run.Verified in the grasp sim: proposals reach the scene and render with no errors in the log, and the panel checkbox toggles them.
Last of nine in the xArm grasping re-landing stack.