OBJECTSCANNER / SYSTEM ANATOMY

From captured views
to an object pose.

Two streams. One calibrated object frame.
Prepare the data once, then estimate pose from each new RGB-D observation.

01
OFFLINE · PREPARE

Dataset collection + training

Calibrated views become two models and one metric reference.

PROCESS IN MOTION01 / 06
CALIBRATED BOX · ILLUSTRATIVE GEOMETRY123456X / Y resolvedXYZ0123456714 mm setup tags28 mm table tagsbox_centerXYZ sign orderT_camera_object = T_camera_table × T_table_objectDetect tagsResolve rolesSet frame8 corners
00.0 / 12s

ILLUSTRATIVE SEQUENCE · NOT LIVE TELEMETRY

SELECTED STAGE01 / 06

Calibrate the object

Temporary AprilTags define the object box. Permanent table tags preserve its box_center frame across camera views.

IN
Object, setup tags and permanent table tags
OUT
Calibration, metric box dimensions and fixed object frame

Two outputs, in parallel. Reviewed captures feed paired training datasets and a calibrated TSDF reference. The reference is measured geometry.

02
RUNTIME · ESTIMATE

Pose estimation

Use learned initialization, measured depth and accepted pose history.

PROCESS IN MOTION01 / 06
RECTIFIED PIXELS · ONE PACKETRGBALIGNED DEPTHrectify color500 mm → 0.500 mmatch geometry + packet stampAlignment is geometric; a shared stamp does not prove simultaneous exposure.
00.0 / 12s

ILLUSTRATIVE SEQUENCE · NOT LIVE TELEMETRY

SELECTED STAGE01 / 06

Acquire aligned RGB-D

The Gemini 305 supplies color and aligned depth with current rectified camera intrinsics. Synchronized observations share the color optical frame.

IN
Live scene and camera calibration
OUT
Color, aligned depth and CameraInfo

A guarded tracking loop. Startup / lost → PnP seed. Tracking → last accepted raw pose. GICP rejection preserves the seed; repeated failure returns to recovery.

INSIDE EACH PROCESSING STEP

Follow the data. Inspect the decisions.

Explore the algorithms, coordinate math, configuration and checks behind all twelve stages.

IMPLEMENTATION DEEP DIVE
DATASET + TRAINING · 01 / 06
STEP 01 · PREPARE

Calibrate the object

Four temporary setup tags define a metric box. A fixed permanent-tag map recovers that box across camera views after setup-tag removal. Its center, axes and eight corner identities define the common frame for labels and measured points.

PROCESS IN MOTION01 / 06
CALIBRATED BOX · ILLUSTRATIVE GEOMETRY123456X / Y resolvedXYZ0123456714 mm setup tags28 mm table tagsbox_centerXYZ sign orderT_camera_object = T_camera_table × T_table_objectDetect tagsResolve rolesSet frame8 corners
00.0 / 12s

ILLUSTRATIVE SEQUENCE · NOT LIVE TELEMETRY

INPUT

Object, setup tags and permanent table tags

OUTPUT

Calibration, metric box dimensions and fixed object frame

How it works

  1. Detect two tag populations

    Estimate each tag pose from its known square size and image corners. The collection wrapper uses tagStandard41h12, setup IDs 1–4 at 14 mm and permanent IDs 5–10 at 28 mm. Wrong physical sizes directly corrupt metric scale.

  2. Resolve the setup roles

    Find the raised tag using height above the table. Of the remaining three, choose the origin whose two neighbor vectors are closest to perpendicular. Swap X and Y when needed so their cross product points toward the raised tag; numeric IDs do not prescribe placement roles.

  3. Construct a rigid box

    Normalize the first base edge, remove its component from the second edge, and form Z by their cross product. Edge lengths and top height define dimensions. Place the object origin half a width, length and height from the resolved base origin.

  4. Freeze the table relationship

    Use the first visible permanent tag as the table frame. Store all visible permanent-tag transforms and T_table_object. A later camera view solves the mapped board pose and composes it with this fixed object transform.

  5. Persist the contract

    Save calibration.json with dimensions, revision, tag sizes, resolved roles and box_center. Additional permanent tags can be mapped while two existing tags remain visible. Reconfiguring the box changes its revision and relabels existing captures through the preserved table frame.

WORKED EXAMPLE · ILLUSTRATIVE

Follow one observation

Start
Illustrative dimensions: 0.10 × 0.08 × 0.06 m.
Process
Halve each dimension and preserve the fixed XYZ sign order.
Result
Corner 0 is (−0.05, −0.04, −0.03) m; corner 7 is (+0.05, +0.04, +0.03) m in box_center.

Configuration in this project

Values below come from the checked-in implementation. Each note identifies its scope; launch arguments can override defaults.

SettingValueMeaning / scope
Tag pose error≤ 2.5 pxCalibration helper default for individual tag and combined board reprojection error; this is a pixel agreement gate, not a measured physical accuracy.
Permanent board supportAt least 2 visible tagsRequired to set the box and estimate the mapped board pose.
Box dimensions> 0.01 m and ≤ 2 m eachGeometry sanity limits in resolve_box_geometry.

When this step fails

The box is consistently the wrong metric size.

A tag size or physical placement disagrees with calibration assumptions.

Setup roles cannot be resolved.

Base tags are nearly collinear, too close, or do not form three rectangular corners; the top tag lacks clear elevation.

Trace it to the implementation

Back to step navigator ↑
THE HANDOFF BETWEEN STREAMS4 linked artifacts

A bundle that agrees on geometry.

01 /

Segmentation checkpoint

training/yolo/SESSION_onthefly_seg/weights/best.pt selects the foreground object.

02 /

Eight-corner pose checkpoint

training/yolo/SESSION_pose_refined_pose/weights/best.pt provides ordered image corners for startup and recovery.

03 /

Metric reference

datasets/SESSION/references/CATEGORY/reference.ply is fused in box_center. The launcher prefers reference_aligned.ply when present.

04 /

Frozen PnP geometry

datasets/SESSION/training_pnp/ stores calibration.json, object_keypoints.yaml and a hash manifest; the launcher verifies this snapshot and the reference frame.

Coordinate contract & implementation sources +
  • Reference geometry, canonical corners and output TF share the calibrated box_center frame.
  • P_camera = T_camera_object × P_object; translations and reference coordinates use metres.
  • The camera frame is camera_color_optical_frame; runtime uses the current rectified intrinsics and aligned depth.
  • Eight immutable corner IDs follow XYZ signs: 0 −−−, 1 +−−, 2 −+−, 3 ++−, 4 −−+, 5 +−+, 6 −++, 7 +++.
  • The TSDF reference is built alongside model training; it is a measured geometry artifact, not a trained model.
  • Only accepted raw GICP poses seed tracking; only accepted candidates enter smoothing.

Read the collection workflow, Phase 4 guide and runtime configuration.