RoboSkillHub
Catalog / Skills
skill

calibrating-baseplate-stud-grid

Estimates a LEGO or DUPLO baseplate's pose (the plate frame computing-brick-pose-from-stud-grid takes, and APEX-MR's x, y, z, roll, pitch, yaw, width, height) in two steps - a coarse pose from ArUco / AprilTag markers at known places on or beside the plate (OpenCV aruco + solvePnP), a given pose, or a plate mask and its depth plane; then a sub-millimetre refinement from a wrist RGB-D close-up, where the stud tops are found in depth and as circles in the plate-rectified image and an 8 mm (16 mm DUPLO) lattice is fitted by RANSAC (yaw + offset, the coarse pose picking the period) - with the residual and the number of studs used. A second script reads a brick's own studs - footprint (A x B), top pose and stud pixels from a close-up and a mask. Use when bricks will be placed or picked by grid cell and the plate's pose must be known to well under a pitch, or a brick's size and pose must be read from its studs.

Kind
Skill · perceive: finds and measures things in the scene
Robots
any robot
Tasks
assembly lego
Takes
nothing
Gives
plate_pose Se3Pose, coarse_plate_pose Se3Pose, coarse_source string, lattice_status string, residual_mm float, max_residual_mm float, studs_used int, studs_detected int, snap_margin float, marker_reprojection_px float, yaw_ambiguity_deg float, system string, stud_pitch float, camera_name string
Calls
sam3
Robot tools
robot.get_ee_pose, robot.get_observation, robot.go_to_pose, robot.grasp_frame, robot.solve_ik
License
Apache-2.0
Source
source on GitHub · SKILL.md · upstream code · v0.1.1

Exits

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

calibrated A coarse pose was found, a wrist close-up was taken, at least min_studs (12) stud tops lie on the lattice with an RMS residual under max_residual (1/8 pitch - 1.0 mm LEGO, 2.0 mm DUPLO), the yaw correction is under 10 deg and the coarse pose is within snap_tolerance (0.35 pitch) of the nearest stud row along both axes; plate_pose is the refined pose.
coarse_only A coarse pose was found but no close-up was used - refine off, no wrist camera with a pose (and depth), or no view pose reached (IK preview, refused or short moves); plate_pose is the coarse pose and lattice_status says which.
no_lattice A close-up was taken but the lattice is not trusted - no plate plane near the coarse one (no_plane), too few studs (too_few_studs), residual over max_residual (high_residual), yaw correction over 10 deg (yaw_off) or the coarse pose about half a pitch off (ambiguous); plate_pose stays the coarse pose, the fit's numbers are filled in.
no_markers No coarse pose - none of the listed markers seen, no coarse_plate_pose, no usable plate mask; plate_pose is empty.

Scripts

calibrate_plate, read_studs

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 "estimates a lego or duplo baseplate's pose (the plate…" --why
uv run --no-sync roboskillhub view --bundles calibrating-baseplate-stud-grid --out my_registry

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