What you will need

What you will get

  • A Duckiebot with the extrinsics camera calibration performed.

Intrinsic camera calibration#

The instrinsic camera calibration procedure identifies parameters that enable creating a relationship between the 2D image plane and the 3D world around the Duckiebot. These parameters account for various optical specifications such as the camera’s focal length, the pixel aspect ratio, and the distortion field applied by the fisheye lens.

Tip

For optimal performance, repeat this procedure if you change the focus of the camera by rotating the lens.

The Intrinsics Calibrator#

To perform the intrinsic camera calibration procedure for your Duckiebot, run:

dts duckiebot calibrate_intrinsics ROBOT_NAME

where ROBOT_NAME is the hostname of either a physical or virtual Duckiebot.

There are two ways to perform the intrinsic camera calibration procedure for your Duckiebot:

  1. If you have installed dts on the host machine: open a terminal on your host machine and run:

    dts duckiebot calibrate_intrinsics ROBOT_NAME

Note

The first time a robot app is ran, a popup window may appear asking for permissions. Insert your password and “(Always) Allow” to continue.

  1. Alternatively, inside the Workspace terminal run:

    dts duckiebot calibrate_intrinsics ROBOT_NAME –browser

where ROBOT_NAME is the hostname of either a physical or virtual Duckiebot.

Duckietown instrinsics camera calibration interface

Fig. 50 The Duckietown intrinsics camera calibration interface.#

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 Undistort switch

R

Refresh the window

T

Open the Debug Console

Intrinsic calibration procedure#

To perform the intrinsic calibration procedure:

  1. Move the calibration pattern 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.

  2. Rotate the mechanical focus ring on the lens until you can clearly read the x and y 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).

  3. 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 and Size bars is filled in.

  4. Slowly tilt and pan the calibration board, relative to your Duckiebot’s camera, until each region within the Skew bar is filled in.

  5. Click the Calibrate button.

  6. Wait for the spinner to disappear.

  7. (optional) Click the Undistort switch to see an undistorted view of what your Duckiebot sees.

Duckietown instrinsics camera calibration interface showing a successful procedure

Fig. 51 The Duckietown intrinsics camera calibration interface (Intrinsics Calibrator) with all of its bars filled in.#

Duckietown instrinsics camera calibration interface showing a successful procedure

Fig. 52 The Intrinsics Calibrator with the Undistort switch set to on.#

To confirm that a new intrinsic 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
Duckietown instrinsics camera calibration interface showing a successful procedure

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

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.