framing-a-target-by-mask-edge-steering
Moves the wrist camera until a named target lies wholly inside its image with a margin - segments the target in the wrist frame (sam3.segment_text), reads which image edges its mask comes within the margin of and by how much, and steps the camera away from those edges in its image plane (or backs it off along its optical axis when opposite edges are clipped or an edge persists, or approaches when the target is too small), re-segmenting after each step, until the mask is inside every edge. Use when a part, ring, fixture or cable end is only partly in the wrist camera's view (after a coarse approach, a grasp, or a refined close-up that left it at the image border) and the next step needs all of it in one wrist frame, with no world estimate required.
object_name strtarget_point Vec3, view_pose Se3Pose, area_frac float, depth float, moves int, travel floatrobot.get_ee_pose, robot.get_observation, robot.go_to_poseExits
What the skill reports when it ends; a policy branches on these.
framed A fresh wrist frame's mask of the target is inside every image edge by the margin (max(margin_px, 0.1 x its larger side)) and covers at least min_area_frac of the image - or covers less, but the camera is already min_range from it. The hand stays at that view; target_point is the per-axis median of the masked pixels back-projected with the wrist depth (a rough point on the visible surface).not_seen There is no wrist camera, the segmenter failed or found no mask scoring min_score in the first frame, or the target was lost after a step and not found again back at the last view that saw it (the hand is left there); `detail` says which.step_limit max_moves steps were taken and the mask still comes within the margin of an edge; `edges` names them. The hand stays at the last view.unreachable A step was refused (raised or routed) or ended more than reach_tolerance off at full and at half length, or the next step would bring the tool centre within 50 mm of the target or back the camera past max_range; `detail` says which.Scripts
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 "moves the wrist camera until a named target lies wholly…" --why
uv run --no-sync roboskillhub view --bundles framing-a-target-by-mask-edge-steering --out my_registrySee Get started for searching by task and robot, locking what a policy uses, and fetching it on the robot.