feat: add atomic manipulation obstacle updates#3164
Open
TomCC7 wants to merge 49 commits into
Open
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
# Conflicts: # dimos/manipulation/planning/monitor/test_world_monitor.py # dimos/manipulation/planning/monitor/world_monitor.py # dimos/manipulation/planning/monitor/world_obstacle_monitor.py # dimos/manipulation/planning/spec/protocols.py # dimos/manipulation/planning/world/drake_world.py # dimos/manipulation/planning/world/roboplan_world.py # dimos/manipulation/planning/world/test_drake_world_planning_groups.py # dimos/manipulation/test_roboplan_world.py # dimos/manipulation/visualization/test_factory.py # dimos/manipulation/visualization/viser/scene.py # dimos/manipulation/visualization/viser/test_viser_visualization.py # dimos/manipulation/visualization/viser/visualizer.py
TomCC7
marked this pull request as ready for review
July 24, 2026 19:54
TomCC7
requested review from
leshy,
mustafab0,
paul-nechifor and
spomichter
as code owners
July 24, 2026 19:54
Contributor
Greptile SummaryAdds atomic obstacle replacement and pose updates throughout manipulation planning.
Confidence Score: 5/5The PR appears safe to merge. No blocking failures remain. Important Files Changed
Sequence DiagramsequenceDiagram
participant Client as Manipulation client / RPC
participant Module as ManipulationModule
participant Monitor as WorldMonitor
participant World as WorldSpec backend
participant Viz as VisualizationSpec
Client->>Module: update obstacle or pose
Module->>Monitor: authoritative mutation
Monitor->>World: mutate under shared lock
World-->>Monitor: accepted / rejected
alt accepted
Monitor->>Viz: best-effort visualization update
end
Monitor-->>Module: mutation result
Module-->>Client: result
Reviews (3): Last reviewed commit: "test: verify Drake collision state after..." | Re-trigger Greptile |
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.
Contribution path
Current Flow
Problem
Obstacle replacement and native planning-scene queries did not share one
synchronization boundary, so collision checking could overlap a remove/add
replacement. Drake's pose update also moved only the visualization while its
collision geometry remained at the old pose. Complete replacement was not
available through the world, visualization, module RPC, or manipulation client
APIs.
Solution
Obstacle.nameand retain afirst-class pose-only update that preserves non-pose properties.
scene-backed FK/Jacobian, and opaque RoboPlan-native planning operations.
obstacle snapshots, and fail closed after unexpected native update failures.
and a persistent frontend warning on renderer failure.
ManipulationModuleRPC and the interactivemanipulation client (
update_obstacle, shape-specific update helpers, andupdate_pose).Complete updates never merge the prior obstacle. Generic planners may observe
different complete scene revisions between collision checks; opaque
RoboPlan-native planning holds the scene lock for its full call. Stored-plan
invalidation and execution-time obstacle guarantees remain out of scope.
Perception paths and known limitations
WorldObstacleMonitorhas two distinct perception paths:Detection3Dadds a complete box for a new detection, but an existingdetection receives only a pose update. Bounding-box size changes are
currently ignored, and tracking timestamps advance even if the world rejects
the pose update.
refresh_obstacles()prepares complete obstacles, then atomically removes and re-adds the full
ObjectDB obstacle set under the shared world lock. This reflects geometry
changes, but churns unchanged obstacles and has no rollback if an add fails.
The shared lock prevents planning and collision queries from observing either
perception batch midway through its world mutations. This PR provides the
complete-update primitive but does not migrate these perception paths to it.
A follow-up should cache accepted
Detection3Dgeometry, use completereplacement when dimensions change, advance tracking only after accepted
updates, and diff stable ObjectDB IDs into add, update, and remove operations.
How to Test
Start a manipulation blueprint:
In another terminal:
Then exercise both update paths:
AI assistance
OpenAI Codex with GPT-5 was used extensively to explore the design, implement
the change, write tests and documentation, and draft the PR. The implementation
was validated with the manipulation test suite and Ruff; the remaining
environment-dependent checks are listed above.
Checklist