RoboSkillHub
Catalog / Skills
skill

correcting-insertion-offset-from-port-opening

Re-centres a held part over a port before or after a failed insertion using cameras only - finds the dark opening near its projected mouth in every available view (hand and part masked out by depth), meets each view's ray with the port plane, keeps the views that agree within 3 mm, and steps the hand toward that consensus in moves of at most 1 mm (6 mm total, 8 steps) until the part's descent line is centred on the opening in at least two views. Use when an insertion stopped short or a camera's port estimate is only good to a few millimetres, the hand holds the part over the mouth, and two cameras see the opening (the inserting arm's wrist camera plus the other arm's parked wrist camera or the overhead camera); no force sensor.

Kind
Skill · recover: gets back from a failure
Robots
any robot
Tasks
insertion
Takes
port_position Vec3, opening_size float
Gives
hole_position Vec3, hole_offset float, correction Vec3, steps int, views int
Calls
sam3
Robot tools
robot.get_ee_pose, robot.get_observation, robot.go_to_pose
License
Apache-2.0
Source
source on GitHub · SKILL.md · upstream code · v0.1.0

Exits

What the skill reports when it ends; a policy branches on these.

centered The held part's descent line meets the port plane within the pixel tolerance of the opening's centre in at least min_views (2) views; the hand stays there, ready for the push. hole_position is the cameras' consensus of the opening's centre on the port plane.
opening_not_found Fewer than min_views cameras are usable or find the opening near its projected mouth (contrast, area and centre gates); nothing moved on this pass.
views_disagree The views found the opening but no pair puts it within max_view_disagreement (3 mm) on the port plane; a camera's calibration or the detection is off. Nothing moved on this pass.
offset_too_large The consensus lies more than max_port_offset (8 mm) from the estimate, or the next step would take the commanded correction past max_total (6 mm); re-perceive the port rather than correct. An opening near the bound can be measured short until the hand has stepped toward it, so the hand may have moved before this exit.
no_convergence After max_steps (8) moves the part is still not centred in min_views views; the hand is where the last step left it.
unreachable The hand's pose could not be read, or a step was refused or reported out of reach.

Scripts

correct_offset

Use it

Take this bundle (and the tools it calls) into a registry for your task, then point your policy generator at it:

git clone https://github.com/runtime-si/RoboSkillHub
cd RoboSkillHub && uv sync
uv run --no-sync roboskillhub search "re-centres a held part over a port before or after a…" --why
uv run --no-sync roboskillhub view --bundles correcting-insertion-offset-from-port-opening --out my_registry

See Get started for searching by task and robot, locking what a policy uses, and fetching it on the robot.