Viser Manipulation Module#2413
Conversation
Greptile SummaryThis PR introduces
Confidence Score: 4/5Safe to merge for initial use; one restart scenario leaves the preview worker permanently silent but normal single-lifecycle operation is unaffected. The new PreviewWorker has start() and stop() methods but stop() does not clear _thread or _stop_event, so a module stop-then-restart leaves the worker inert with no error. All interactive features (drag-IK, plan, execute) depend on the worker and would silently do nothing after a restart. Every other concern from prior reviews (action_status mutation race, thread accumulation, wrong path coordinates, dead callback registration) appears to have been addressed in this version. dimos/manipulation/viser_panel/state.py — PreviewWorker.stop() needs to reset _thread and _stop_event before the worker can be safely restarted. Important Files Changed
Sequence DiagramsequenceDiagram
participant User as Operator (Browser)
participant ViserPanel as ViserManipulationPanelModule
participant PreviewWorker as PreviewWorker thread
participant PollThread as Poll thread
participant Backend as PanelBackend
participant Manip as ManipulationModule (RPC)
User->>ViserPanel: drag EE control
ViserPanel->>PreviewWorker: submit(PreviewRequest, sequence_id)
PreviewWorker->>Backend: call_preview_with_timeout(evaluate_pose_target)
Backend->>Manip: evaluate_pose_target(pose, robot)
Manip-->>Backend: "{success, joint_state, collision_free}"
Backend-->>PreviewWorker: result dict
PreviewWorker->>ViserPanel: _apply_preview_result (acquires _lock)
ViserPanel->>ViserPanel: update ghost URDF joints + feasibility
User->>ViserPanel: click Plan
ViserPanel->>ViserPanel: _run_operation(Plan) new thread
ViserPanel->>Manip: plan_to_joints / plan_to_pose
Manip-->>ViserPanel: True/False
ViserPanel->>Manip: get_planned_path + get_planned_path_poses
Manip-->>ViserPanel: JointPath + [Pose]
ViserPanel->>ViserPanel: render_plan_path (line segments in scene)
User->>ViserPanel: click Execute
ViserPanel->>ViserPanel: _can_execute_for_operation() check
ViserPanel->>Manip: execute(robot)
Manip-->>ViserPanel: accepted
PollThread->>ViserPanel: _refresh_panel_state_impl (every 1/poll_hz s)
ViserPanel->>Manip: list_robots, get_current_joints, get_ee_pose, get_state
Manip-->>ViserPanel: current state
ViserPanel->>ViserPanel: update GUI labels + enable/disable buttons
Reviews (3): Last reviewed commit: "fix: avoid execute gate action status ra..." | Re-trigger Greptile |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Problem
Going to replace the drake meshcat and provide a moveit style console.
Closes #2412
Solution
How to Test
Contributor License Agreement