Skip to content

Claude/port detection alignment q n5 sz#495

Closed
kuldeepkdv wants to merge 2 commits intointrinsic-dev:mainfrom
kuldeepkdv:claude/port-detection-alignment-qN5Sz
Closed

Claude/port detection alignment q n5 sz#495
kuldeepkdv wants to merge 2 commits intointrinsic-dev:mainfrom
kuldeepkdv:claude/port-detection-alignment-qN5Sz

Conversation

@kuldeepkdv
Copy link
Copy Markdown

No description provided.

claude added 2 commits April 17, 2026 02:39
Adds a classical perception + motion-planning baseline that operates
without ground truth, organised into reusable modules:

- aic_example_policies/perception/port_detector.py
    Single-image OpenCV port detector (dark rect in lighter surround).
- aic_example_policies/perception/triangulator.py
    Linear-DLT triangulation from N camera views using CameraInfo K and
    base_link <- optical-frame extrinsics from TF; reports reprojection
    error so callers can gate on quality.
- aic_example_policies/planning/motion_planner.py
    Pure-Python three-phase state machine: APPROACH (stand-off above
    port), ALIGN (rotate TCP to port axis and servo lateral error),
    INSERT (linear descent along port axis, stopping on depth or on a
    force threshold). Compensates for the TCP-to-plug-tip offset so the
    plug, not the TCP, lands on the commanded target.
- aic_example_policies/ros/VisionGuidedInsert.py
    Policy class wiring the above to get_observation / move_robot.

Covers the requested pipeline: detect the port on 3 wrist cameras,
estimate distance, plan approach over the port, align, and execute a
linear insertion.
- Use img.header.frame_id as the authoritative camera frame; fall back
  to the hardcoded optical/body names only if it is empty.
- Look up TF at the image stamp (50 ms tolerance), then fall back to
  latest, to reduce error when the wrist moves during a detection tick.
- Warn once per camera when we have to compose the REP-103 body->optical
  rotation instead of using a published optical frame.
- Guard against uncalibrated CameraInfo (fx must be > 0).
- Carry a per-camera pixel prior reprojected from the latest 3D
  estimate so the detector stays locked on the port when other dark
  apertures are visible.
- Fix degenerate case in MotionPlanner._gripper_quat_for_port when
  the current tool-x is parallel to the port axis.
- Drop unused stamp argument on _plug_tip_in_base.
Copy link
Copy Markdown
Author

@kuldeepkdv kuldeepkdv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Copy link
Copy Markdown
Author

@kuldeepkdv kuldeepkdv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

@Yadunund
Copy link
Copy Markdown
Collaborator

This looks like an accidental PR.

@Yadunund Yadunund closed this Apr 22, 2026
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.

3 participants