-
Notifications
You must be signed in to change notification settings - Fork 0
Calibration implementation and procedure
Important
Prerequisites:
- Read Profiles and arenas.
- Read Calibration algorithm.
- Compile the C++ programs following Compiling CPP code (
sudo apt install libdmtx-devrequired forrun-arena-registration-scan). - Upload the Arduino program following Uploading Arduino code.
- Install the Python tools following Installing Python code.
The arena directory (e.g. ~/Spotlight/arenas/arena146/) must contain metadata.yaml, mapping_board.pdf, and active_area.png. For arena146 these are pre-generated. Copy them from the package assets:
cp -r <spotlight-tools>/src/spotlight_tools/assets/arena_configs/arena146/* \
~/Spotlight/arenas/arena146/If the arena spec PDF changes, regenerate them:
cd spotlight-tools/
python scripts/arena/make_arena146_config.pySee Profiles and arenas for details.
Print ~/Spotlight/arenas/arena146/mapping_board.pdf at 100% scale. Cut along the outer border and place the board in the arena with the printed side facing the camera.
./run-arena-registration-scan \
-p ~/Spotlight/profiles/sibo_260514 \
-a ~/Spotlight/arenas/arena146- A live camera preview opens. Move the stages so the DataMatrix barcode (printed at the center of the board) is centred under the red crosshairs, then press ENTER.
- The program decodes the DataMatrix and verifies the checksum. If it fails, check that the correct board is in the arena.
- The stage automatically visits each AprilTag, acquires 10 frames per tag, and saves everything to
~/Spotlight/arenas/arena146/mapping_scan/. - The scan takes a few minutes to complete. Status is shown in the preview window.
See Running the calibration scan for full details.
fit-arena-registration -a ~/Spotlight/arenas/arena146This writes model/calibration_result.yaml, model/calibration_points.csv, and model/diagnostics.png to the arena directory.
Check diagnostics.png to verify the fit quality (RMSE should be ≲ 0.1 mm; see Calibration algorithm for targets).
See Fitting the calibration model for full details.
./run-spotlight \
-p ~/Spotlight/profiles/sibo_260514 \
-a ~/Spotlight/arenas/arena146The application reads model/calibration_result.yaml and metadata.yaml from the arena directory automatically. If either file is missing or malformed, it exits with an error message.