What you will need

What you will get

  • A Duckiebot with the extrinsics camera calibration performed.

Extrinsic camera calibration procedure#

This camera calibration procedure outputs the relative pose between the camera and Duckiebot frame.

For optimal performance, repeat this procedure if you ship the Duckiebot or otherwise touch the camera holder.

The Extrinsics Calibrator#

The easiest way to perform the extrinsic camera calibration procedure for your Duckiebot is by using the Extrinsics Calibrator.

Duckietown extrinsics camera calibration interface

Fig. 54 The Extrinsics Calibrator.#

To open the Extrinsics Calibrator, run:

dts duckiebot calibrate_extrinsics DUCKIEBOT_NAME

Note

If you are using a Duckietown Workspace, run this command from a local terminal outside the dev container. To open the browser-based Viewer instead, use dts duckiebot calibrate_extrinsics DUCKIEBOT_NAME --browser.

Note the keys in the table below.

Key

Function

X

Increase the Frame Rate

Z

Decrease the Frame Rate

Space

Calibrate the camera

F

Toggle the Project switch

E

Toggle the Check error switch

R

Refresh the window

T

Open the Debug Console

Extrinsic calibration procedure#

To perform the extrinsic calibration procedure:

  1. (optional) Click the Check error switch to enforce a pose error bound for your Duckiebot’s camera based on its known intrinsic parameters (a trapezoid in the image under Camera View should appear).

  2. 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 large x-axis of the calibration board (if the Check error switch is set to on, the trapezoid in the image under Camera View should turn from black to blue).

  3. Click the Calibrate button.

  4. Wait for the spinner to disappear.

  5. (optional) Click the Project switch to see a top-down view of what your Duckiebot sees under Projection.

Duckiebot extrinsics camera calibration setup

Fig. 55 Extrinsic calibration setup: align the Duckiebot with the marks on the calibration pattern, on a white backdrop.#

Duckietown extrinsics camera calibration check error function

Fig. 56 The Extrinsics Calibrator with the Check error switch set to on.#

Duckietown extrinsics camera calibration projection functionality

Fig. 57 The Extrinsics Calibrator with the Project switch set to on.#

To confirm that a new extrinsic 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
Duckietown extrinsics camera calibration extrinsics panel

Fig. 58 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

When I open a calibrator window, I do not see images at the center but a gray loading screen instead. I know the camera otherwise works on my Duckiebot.

RESOLUTION

Press the refresh icon on the top right of the calibrator window to restart the image stream.