Calibration - Camera
Contents
Calibration - Camera#
This section describes how to perform the camera calibration procedure for your Duckiebot.
Every camera is unique. Therefore, a camera calibration procedure needs to be performed to account for small manufacturing discrepancies. This procedure involves displaying a predetermined pattern in front of the camera and using it to solve for the camera’s parameters. For more information, review these slides.
What you will need
You can see what your Duckiebot sees.
What you will get
Your Duckiebot’s camera will be calibrated.
Attention
Complete both the camera and kinematics calibration procedures before running any Duckietown demos.
Calibration board#

Fig. 53 Duckietown calibration pattern.#
If you do not already have a Duckietown calibration board:
Download the Duckietown calibration pattern
Print it in A3 format
Fix it to a rigid planar surface that you can move around
Note
The squares must have side lengths equal to 0.031 m (3.1 cm). Measure this, as having the wrong size may lead to your Duckiebot crashing.
In case your squares are not the correct size, make sure that your printer settings are set to A3 format, with no automatic scaling and size set to 100%.
If you do not already have a Duckietown calibration board:
Download the Duckietown calibration pattern
Print it in A4 format
Fix it to a rigid planar surface that you can move around
Note
The squares must have side lengths equal to 0.0175 m (1.75 cm). Measure this, as having the wrong size may lead to your Duckiedrone crashing.
In case your squares are not the correct size, make sure that your printer settings are set to A4 format, with no automatic scaling and size set to 100%.
Warning
If the pattern is not rigid, the calibrations should not be used. You can print on thick paper or adhere to something rigid to achieve this.
Intrinsics calibration#
The Intrinsics Calibrator#
The easiest way to perform the intrinsics camera calibration prodecure for your Duckiebot is by using the Intrinsics Calibrator
.

Fig. 54 The Intrinsics Calibrator
.#
To activate the Intrinsics Calibrator
, run:
dts duckiebot calibrate_intrinsics ![DUCKIEBOT_NAME]
Note the keys in the table below.
Key |
Function |
---|---|
X |
Increase the |
Z |
Decrease the |
Space |
Calibrate the camera |
F |
Toggle the |
R |
Refresh the window |
T |
Open the |
Procedure#
To perform the intrinsics calibration procedure:
Move the calibration board in front of your Duckiebot’s camera such that the entire checkerboard pattern is within its field of view and colored lines begin to overlay the checkerboard pattern
Rotate the mechanical focus ring on the lens until you can clearly read the
x
andy
labels on the checkerboard pattern (do not adjust the focus again or place the lens cover back onto the lens unless you plan on repeating this procedure)Slowly move the calibration board left, right, up, down, forwards and backwards, relative to your Duckiebot’s camera, until each region within the
x
,y
andSize
bars is filled inSlowly tilt and pan the calibration board, relative to your Duckiebot’s camera, until each region within the
Skew
bar is filled inClick the
Calibrate
buttonWait for the spinner to disappear
(optional) Click the
Undistort
switch to see an undistorted view of what your Duckiebot sees

Fig. 55 The Intrinsics Calibrator
with all of its bars filled in.#

Fig. 56 The Intrinsics Calibrator
with the Undistort
switch set to on
.#
To confirm that a new intrinsics calibration file has been created on your Duckiebot, run the following command and inspect the contents of the Camera Intrinsic
panel:
dts duckiebot dashboard ![DUCKIEBOT_NAME] --page robot/calibrations

Fig. 57 The Camera Intrinsic
panel on the Robot
page of the Dashboard
.#
Note
Within the Camera Intrinsic
panel, under Local
, you should see a tick next to Completed
, the calibration date next to Calibration date
and /data/config/calibrations/camera_intrinsic/![DUCKIEBOT_NAME].yaml
next to Files
.
Extrinsics calibration#
The Extrinsics Calibrator#
The easiest way to perform the extrinsics camera calibration procedure for your Duckiebot is by using the Extrinsics Calibrator
.

Fig. 58 The Extrinsics Calibrator
.#
To activate the Extrinsics Calibrator
, run:
dts duckiebot calibrate_extrinsics ![DUCKIEBOT_NAME]
Note the keys in the table below.
Key |
Function |
---|---|
X |
Increase the |
Z |
Decrease the |
Space |
Calibrate the camera |
F |
Toggle the |
R |
Refresh the window |
T |
Open the |
Procedure#
To perform the extrinsics calibration procedure:
Position your Duckiebot on the calibration board such that it faces the checkerboard pattern, your Duckiebot’s axle is parallel to and directly above the large
y
-axis of the calibration board, and the axis that is perpendicular to and midway between your Duckiebot’s axle is directly above the largex
-axis of the calibration board (the trapezoid in the image underCamera View
should turn from black to green)Click the
Calibrate
buttonWait for the spinner to disappear
(optional) Click the
Project
switch to see a top-down view of what your Duckiebot sees underProjection

Fig. 59 Extrinsics calibration setup.#

Fig. 60 The Extrinsics Calibrator
with the Project
switch set to on
.#
To confirm that a new extrinsics calibration file has been created on your Duckiebot, run the following command and inspect the contents of the Camera Extrinsic
panel:
dts duckiebot dashboard ![DUCKIEBOT_NAME] --page robot/calibrations

Fig. 61 The Camera Extrinsic
panel on the Robot
page of the Dashboard
.#
Note
Within the Camera Extrinsic
panel, under Local
, you should see a tick next to Completed
, the calibration date next to Calibration date
and /data/config/calibrations/camera_extrinsic/![DUCKIEBOT_NAME].yaml
next to Files
.
Troubleshooting#
Troubleshooting
SYMPTOM
I do not see what my Duckiebot sees after refreshing the window and going through Operation - Make it See - Troubleshooting.
RESOLUTION
Contact support.