Wiki

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Create Odometry and Gyro Calibration

Description: /!\ This is only necessary if you have a Create base. The Kobuki comes with a factory calibrated gyro. This will show you how to calibrate or test the calibration of a TurtleBot which is highly recommended when running any navigation based application.

Tutorial Level: BEGINNER

Setup

Note: Determine which gyro your TurtleBot is using, TurtleBots made by different manufacturers have gyros with different measurement rates. You will need to look at the small chip on the right side of the turtlebot power/sensor board and find its part number (example). Some common ones are:

Chip

Setting

ADXRS613

150

ADXRS652

250

This link may help: http://www.alldatasheet.com/view.jsp?Searchword=ADXRS6

Set the gyro_measurement_range value before you run calibration by using rqt_reconfigure or editing the configuration file as explained in the results section below.

First position TurtleBot at the center of a long straight wall (at least 2 meters long), facing towards the wall, at about 30 cm away from the wall.

Execution

This assumes you have already started the robot

Now ssh (ssh help) into the TurtleBot and run the calibration routine:

roslaunch turtlebot_calibration calibrate.launch

Turtlebot will perform a number of calibration spins. According to this note from Tully Foote, the calibration routine should turn 720° the first time then 360° the following times. Each "time" referred to here is one execution of the calibration routine, where each routine begins with "Aligning base with wall" and ends with IMU and odom error output. The full calibrate.launch task contains 4 such routines (to gain a better understanding of what exactly is supposed to happen during calibration, you can read the source code at <ROS_ROOT>/lib/turtlebot_calibration/calibrate.py).

When it finishes, you'll see a print on the screen like this (and I'm not yet sure if you should expect similar numbers or not):

Results

The calibration routine will output 2 numbers. The correction for the gyro and the correction for the odometry. The values are factors to multiply with the current parameters to get the best results (see also this QA and this QA).

After running the calibration set the parameters to the old value multiplied by the correction.

The two parameters are:

For a single run you can set the parameters using dynamic_reconfigure:

rosrun rqt_reconfigure rqt_reconfigure

Then select the turtlebot_node and set the parameters. You must use Dynamic Reconfigure or else turtlebot_node will not pick up the changes. Using rosparam set is not enough. (You could also restart turtlebot_node after each calibration, but this requires changing the parameters in the bringup launch file.)

Return to the calibration step and repeat the process until both multipliers are close to 1. If calibration is not working correctly, then the numbers may never converge. It is hard to say whether the process is diverging or not, because I've not seen anyone give any guidelines as to what are reasonable values to expect for these parameters. If the process starts driving your gyro correction to 0 you should probably suspect that something is wrong.

Once both correction parameters have converged to stable values, add the following with the values you received to the turtlebot_bringup/minimal.launch file to use these parameters in the future(See http://answers.ros.org/question/217629/calibrating-turtlebotcreate-can-not-find-turtlebotlaunch/):

<param name="turtlebot_node/odom_angular_scale_correction"> value="some numerical value that you got"/>
<param name="turtlebot_node/gyro_scale_correction"> value="some numerical value that you got"/>

What Next?

Visualisation or return to the TurtleBot main page.

Wiki: turtlebot_calibration/Tutorials/Calibrate Odometry and Gyro (last edited 2017-03-25 17:58:57 by LukasSeveringhaus)