UAT 322 Artificial Intelligence and Autonomous Unmanned Aircraft Systems Integration Laboratory

Worksheet 2 Reading the EKF from logs and calibrating a camera

Lab 12 hAssesses CLO1

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

  1. Vary R and gate in Example 1 one at a time; record RMSE and rejections
  2. Hover in SITL, open the log and plot GNSS, baro and mag test ratios
  3. Mark periods where the ratios approach 1
  4. Simulate GNSS loss; observe EKF2 status and mode changes
  5. Photograph the target with the onboard camera, calibrate and report reprojection RMSE with its definition
  6. Check on a new image set; record versions and all settings

Record of results

Table 1 Sweeping R and gate in Example 1 (one at a time)
GNSS std used in R (m)Gate (standard deviations)Fused RMSE (m)GNSS fixes rejectedWas the +25 m fix at 6 s rejected?
Table 2 Events from the EKF2 log in SITL (normal hover and GNSS loss)
Time span (s)Source (GNSS, baro, mag)Highest test ratioEKF2 status or warningFlight mode
Table 3 Camera calibration results
Image setImagesReprojection RMSE (px)Definition used (per point or per component)Resolution, lens and distortion model

Questions

  1. 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.

  2. 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?

  3. In Table 2, what does a test ratio approaching 1 mean, and how did EKF2 and the drone respond when GNSS was lost?

  4. 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

CLO1 Integrate control, navigation and sensors. (CLOs are a web-team draft; the course owner sets the final ones.)

Instructors: answers and teaching notes for this worksheet are in the teaching pack