UAT 322 Artificial Intelligence and Autonomous Unmanned Aircraft Systems Integration Laboratory
Worksheet 2 Reading the EKF from logs and calibrating a camera
Objective
Understand filter parameters, read EKF2 status from logs including GNSS loss, and calibrate the onboard camera verifiably
Equipment and materials
- Computer with Python, PX4 SITL and a log viewer
- The training drone's onboard camera
- Calibration target (checkerboard or AprilGrid)
- OpenCV or Kalibr
- Lab notebook
Safety
- Simulation and bench work; no real flights
- Remove the training drone's battery or propellers while capturing calibration images
Steps
- Vary R and gate in Example 1 one at a time; record RMSE and rejections
- Hover in SITL, open the log and plot GNSS, baro and mag test ratios
- Mark periods where the ratios approach 1
- Simulate GNSS loss; observe EKF2 status and mode changes
- Photograph the target with the onboard camera, calibrate and report reprojection RMSE with its definition
- Check on a new image set; record versions and all settings
Record of results
| GNSS std used in R (m) | Gate (standard deviations) | Fused RMSE (m) | GNSS fixes rejected | Was the +25 m fix at 6 s rejected? |
|---|---|---|---|---|
| Time span (s) | Source (GNSS, baro, mag) | Highest test ratio | EKF2 status or warning | Flight mode |
|---|---|---|---|---|
| Image set | Images | Reprojection RMSE (px) | Definition used (per point or per component) | Resolution, lens and distortion model |
|---|---|---|---|---|
Questions
From Table 1, when R is set smaller than reality (trusting GNSS too much), how do the number of rejected fixes and the RMSE change? Explain why.
When the gate is widened until nothing is rejected, how does the RMSE change, and what does this say about setting EKF2_GPS_P_GATE on a real drone?
In Table 2, what does a test ratio approaching 1 mean, and how did EKF2 and the drone respond when GNSS was lost?
In Table 3, how different is the RMSE on the new image set from the calibration set? If another team reports 2.21 px from the same residuals where we got 3.12 px, who is right?
Check before you hand in
What to hand in
- R and gate sweep table
- Annotated test-ratio plots
- GNSS-loss event notes
- Calibration file with reprojection RMSE on both image sets