7 Robot calibration

Note: The parameters have been calibrated before the product leaves the factory, and generally do not need to be calibrated. If you feel that the control robot has a large deviation, you need to calibrate [imu], [linear velocity], and [angular velocity]; when calibrating, place the robot in advance and do not move the robot.

It should be noted that this lesson is applicable to the ROSMASTER X3 and X3Plus for the Mecanum wheel models. X1 is an ordinary four-wheel drive model, and R2 is an Ackerman model. Due to the difference in the principle of motion direction control, this lesson is not applicable.

7.1 imu school associate

ROSMASTER has already calibrated the imu before leaving the factory, and the user does not need to calibrate. The following tutorial refers to the procedure that should be started if the imu needs to be calibrated.

7.1.1 Calibration steps

Note: When calibrating, make sure the robot is still.

  1. start

As shown in the figure below, press Enter to calibrate the data in the X+, X-, Y+, Y-, Z+, Z- directions in turn. After the calibration, it will be automatically saved to the specified folder.

image-20220513164431987

When shipped from the factory, the calibration data is stored in,

7.1.2 Use the calibrated imu data

The above command is to use the self-calibrated imu data when starting the chassis drive.

7.2 Linear speed calibration

7.2.1 Preparation

  1. Measure the distance of 1 meter with a meter ruler and make a mark.
  2. put the trolley at the starting point.
  3. Modify the parameters linear_scale_x and linear_scale_y to 1.0.

7.2.2 Start

  1. terminal input
  1. Click the square on the right of [start_test] to start moving the distance of [test_distance]. At this time, observe whether the car really moves [test_distance]. If not adjust the parameter [odom_linear_scale_correction], put the car back to the starting point to continue the test.

image-20220303170156344

Note: The car defaults to calibrate the linear speed of the X-axis direction at the beginning. If you want to calibrate the Y-axis, click [direction] to switch the direction and then click [start_test] to start calibrating the linear speed of the Y-axis.

After the test, remember the value of [odom_linear_scale_correction] and modify it to the values of the parameters linear_scale_x and linear_scale_y in bringup.launch.

  1. calibrate_linear.py program flow chart

image-20220303191939643

7.3. Angular velocity calibration

7.3.1. Preparation

  1. Put the trolley in a position where it is easy to rotate the angle.
  2. Modify the parameter angular_scale to 1.0.

7.3.2 Start

  1. terminal input

image-20220303170948674

  1. Click the square on the right side of [start_test] to start moving the distance of [test_angle]. At this time, observe whether the car really turns [test_angle]. If not adjust the parameter [odom_angule_scale_correction], put the car back to the starting point to continue the test.

image-20220303171120976

After the test, remember the value of [odom_angule_scale_correction] and modify it to the value of the parameter [angular_scale] in bringup.launch.

  1. calibrate_angular.py program flow chart

image-20220303192636410