Grasping a full-3D linear feature
Use this skill when a segmented graspable part may be inclined in 3D. The
point cloud is reduced to a robust principal axis by
geometry.fit_linear_feature. The canonical script then builds a gripper
frame with its local Y axis along the feature and its local Z approach axis
perpendicular to it. The approach is chosen as close to world-down as the
perpendicular constraint permits.
Recommended flow:
textopen → fit_axis → compute_grasp → pregrasp → descend → observe → close → grasped
surface_inset moves the fingertip target from the feature center along the
approach direction; standoff places the pregrasp back along the same line.
Keep both configurable because gripper geometry and point-cloud completeness
vary across platforms.
Two strategies, and when each one is honest
axis_aware_grasp_pose.py uses the fitted axis in full 3D. That is right when
the cloud actually constrains the axis in 3D — a part seen from more than one
side, or one whose inclination the depth image resolves.
axis_grasp_top_down.py is for the case it does not: a single view from above
sees the upper surface and nothing else, so the axis's z component is fitted to
noise and an approach tilted by it tilts by noise. This script keeps only the
XY projection of the axis, approaches straight down, and takes the grasp
height from a bin_floor_z the caller passes plus a grasp_z_offset rather
than from the cloud — because the cloud's z is the top of the object, not where
the pads should meet it. Both scripts return the same three outputs and both
command a wrist roll, so both need a backend that solves the roll.
This skill generates and executes a grasp pose; it does not decide which semantic part to grasp or verify object identity. Upstream perception should provide a point cloud containing only the selected linear feature.


