Skip to content

Add persistent collision objects for placed boxes in hangar_sim ML picking#727

Closed
davetcoleman wants to merge 1 commit into
mainfrom
claude/hangar-sim-attach-grasped-box
Closed

Add persistent collision objects for placed boxes in hangar_sim ML picking#727
davetcoleman wants to merge 1 commit into
mainfrom
claude/hangar-sim-attach-grasped-box

Conversation

@davetcoleman

@davetcoleman davetcoleman commented Jun 20, 2026

Copy link
Copy Markdown
Member

[written by AI]

Problem

In the ML Move Boxes to Loading Zone hangar_sim workflow, the mobile base drives over boxes it has already placed in the loading zone (#19973, "drive over other boxes"). The base transit (Move to Pose No Preview) plans on the whole-body manipulator group — which includes the planar base joints linear_x_joint / linear_y_joint / rotational_yaw_joint — so it does collision-check the MoveIt planning scene, but nothing in the scene represents the placed boxes: the SRDF disables base_link_inertia/chassiscollision_Cube_* pairs, and the only transit obstacle is the wrist-camera octomap captured at the pick station.

Approach

Make every placed box a persistent world collision object so the base plans around it on later picks.

Per box, in move_boxes_to_loading_zone_from_waypoint.xml:

  • On grasp — build a unique id placed_box_N, AddCollisionMesh it at the box's ICP-refined pose, and AttachObject to grasp_link (so the carried box is also avoided).
  • On release — DetachObject leaves it in the world at its placed pose, then a counter increments.

In the parent ml_move_boxes_to_loading_zone.xml:

  • ResetPlanningSceneObjects at objective start clears placed_box_* left by a previous run (they persist until removed, so stale boxes would otherwise block planning at old poses). This runs before perception and does not touch the octomap or static scene.
  • placed_count := 0 initializes the counter, which is ported into both perception passes (placed_count="{placed_count}") and declared as an inout_port on the subtree — the same cross-pass remap place_pose already uses.

Why unique ids: this supersedes the earlier revision on this branch, which used a single shared id (grasped_box) with overwrite=true. That only ever kept the most-recently-placed box in the scene — carry-time avoidance worked, but the base still drove over every previously-placed box. A monotonic per-box id is the minimal change that keeps them all.

Scope

Fixes the already-placed boxes symptom of #19973. It does not yet make not-yet-picked boxes (still at the pick station) obstacles — that would be the same pattern applied to all detected boxes after perception, and is a separate follow-up.

Also carries the earlier non-collision tuning from this branch: scene-camera reframe, suction-cup collision margin widen, and clearing stale grasp markers each pick.

Verification

Run live against the hangar backend: placed_box_0/1/2 accumulated and persisted across picks, whole-body planning kept succeeding around them, and the objective-server log showed zero errors from the new behaviors.

Release notes

None.

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ceb31f6-5131-4e25-b249-94b90fb84f53

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@davetcoleman davetcoleman force-pushed the claude/hangar-sim-attach-grasped-box branch from 8fc8a9a to 0bae7b7 Compare June 20, 2026 16:52
@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

@griswaldbrooks griswaldbrooks self-requested a review June 23, 2026 00:15
Picks add each box to the planning scene under a unique id (placed_box_N)
and detach it into the world on release, so the whole-body base+arm planner
avoids every already-placed box on later picks instead of driving over them
(#19973). ResetPlanningSceneObjects at objective start clears boxes left by a
previous run, and a placed_count counter ported across perception passes keeps
the ids unique. Also reframes the scene camera, widens the suction-cup
collision margin, and clears stale grasp markers each pick.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@griswaldbrooks griswaldbrooks force-pushed the claude/hangar-sim-attach-grasped-box branch from 0bae7b7 to 0484a62 Compare June 26, 2026 01:25
@griswaldbrooks griswaldbrooks changed the title Add attached collision object for picked boxes in hangar_sim ML objective Add persistent collision objects for placed boxes in hangar_sim ML picking Jun 26, 2026
@griswaldbrooks griswaldbrooks added this to the 10.0.0 milestone Jun 26, 2026
@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

@griswaldbrooks

Copy link
Copy Markdown

[written by AI]

Superseded by #746, which lands the same placed-box collision-object persistence (unique placed_box_N ids) combined with the SAM3 perception migration, reconciled on top of current main. Closing in favor of that combined PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants