2.0 KiB
2.0 KiB
Marker Parquet Format
This document describes the expected structure for marker configuration files (e.g., standard_box_markers_600mm.parquet). These files define both the physical geometry of markers and their logical grouping into faces.
Schema
The parquet file must contain the following columns:
| Column | Type | Description |
|---|---|---|
name |
string |
Name of the face (e.g., "bottom", "front"). Used for logical grouping. |
ids |
list<int64> |
List of ArUco marker IDs belonging to this face. |
corners |
list<list<list<float64>>> |
3D coordinates of marker corners. Shape must be (N, 4, 3) where N is the number of markers. |
Example Data
Based on standard_box_markers_600mm.parquet:
| name | ids | corners (approximate structure) |
|---|---|---|
| "bottom" | [21] |
[[[-0.225, -0.3, 0.226], [0.225, -0.3, 0.226], [0.225, -0.3, -0.224], [-0.225, -0.3, -0.224]]] |
Loader Behavior
The system uses two different loading strategies based on this file:
1. Geometry Loader (load_marker_geometry)
- Ignores:
namecolumn. - Uses:
idsandcorners. - Process:
- Flattens all
idsandcornersfrom all rows. - Reshapes
cornersto(-1, 4, 3). - Validates that each marker has exactly 4 corners with 3 coordinates (x, y, z).
- Validates coordinates are finite and within reasonable range (< 100m).
- Flattens all
- Output:
dict[int, np.ndarray]mapping Marker ID → (4, 3) corner array.
2. Face Mapping Loader (load_face_mapping)
- Uses:
nameandids. - Process:
- Reads face names and associated marker IDs.
- Normalizes names to lowercase.
- Output:
dict[str, list[int]]mapping Face Name → List of Marker IDs. - Usage: Used for ground plane alignment (e.g., identifying the "bottom" face).
Validation Rules
Runtime validation in marker_geometry.py ensures:
cornersshape is strictly(4, 3)per marker.- No
NaNorInfvalues. - Coordinates are absolute (meters) and must be < 100m.