Wheel Calibration#

This chapter describes how to perform the kinematics calibration procedure for your Duckiebot.

What you will need

Completed .

What you will get

A Duckiebot with calibrated kinematics.

This wheel calibration is required to make a Duckiebot go straight when commanded to do so.

Introduction to wheel calibration#

To perform the kinematics calibration procedure for your Duckiebot is by using the Keyboard Controller.

Duckietown keyboard controller for Duckiebots

Fig. 41 The Duckiebot keyboard controller is useful to easily open loop control a connected Duckiebot, as well as for adjusting the wheel calibration parameters.#

To open the Keyboard Controller, run:

dts duckiebot keyboard_control DUCKIEBOT_NAME

Note the keys in the table below.

Key

Function

W

Drive forwards

S

Drive backwards

A

Turn left

D

Turn right

E

Toggle the Emergency Stop switch

F

Toggle the Autopilot switch

X

Increase the Gain

Z

Decrease the Gain

V

Increase the Trim

C

Decrease the Trim

Space

Save the Gain and Trim

R

Refresh the window

T

Open the Debug Console

Procedure#

To perform the kinematics calibration procedure:

  1. Create a slightly greater than 2 m long straight line on your floor using tape (or 4 straight tiles, each one is 60 cm long)

  2. Place your Duckiebot at one end of the line

  3. Note your Duckiebot’s position

  4. Face your Duckiebot towards the other end of the line

  5. Drive your Duckiebot forward for about 2 m

  6. Note your Duckiebot’s position

  7. Measure the distance between the center of the tape and the center of your Duckiebot’s axle using a ruler, making sure that the ruler is perpendicular to the tape

  8. Decrease (increase) the Trim and repeat steps 2-8 if your Duckiebot drifted to the left (right) side of the tape by more than 10 cm.

  9. Set the Gain.

  10. Click the Save button.

Straight line for Duckiebot wheel/odometry/kinematics calibration procedure

Fig. 42 Mark a straight line on the floor to set a baseline for the Duckiebot kinematics/wheel/odometry calibration procedure.#

Straight line for Duckiebot wheel/odometry/kinematics calibration procedure

Fig. 43 Left/right drift is caused by uncalibrated wheels. Modifying the trim parameter will help correct imperfections.#

Measuring the drift of a Duckiebot from a straight line as part of the wheel calibration procedure

Fig. 44 Measure the amount of drift, or deviation from the line, after driving forward for about 2 m, to determine when the calibration is “good enough”.#

To confirm that a new kinematics calibration file has been created on your Duckiebot, run the following command and inspect the contents of the Kinematics panel:

dts duckiebot dashboard DUCKIEBOT_NAME --page robot/calibrations
The kinematics calibration panel on the Duckiebot Dashboard

Fig. 45 The Kinematics panel on the Robot page of the Dashboard.#

Note

Within the Kinematics panel, under Local, you should see a tick next to Completed, the calibration date next to Calibration date and /data/config/calibrations/kinematics/DUCKIEBOT_NAME.yaml next to Files.