Welcome to MicroROS V2 Robot Car repository
6. Angular Velocity Calibration
Angular Velocity Calibration
Angular Velocity Calibration1. Course Content2. Preparation3. Calibration Demonstration4. Write the Calibration Coefficient to the MicroRos Control Board5. Verification Test
1. Course Content
- Verify the rotation accuracy of the chassis wheel odometry (calculated from motor encoder data) and calibrate the angular velocity
[!IMPORTANT]
The car is calibrated at the factory, so no re-calibration is needed on first use. If you find that the odometry rotation error is large during subsequent use, refer to this tutorial for calibration.
2. Preparation
ros2 launch microros_v2_bringup car_base.launch.py use_camera:=false

3. Calibration Demonstration
Note: If the odometry data is wrong, you can press the reset button to restart the car.
- Run the command in the terminal
xxxxxxxxxxros2 run common_demo calibrate_angular_z --ros-args -p test_angle_deg:=360.0
- The tested angle test_angle_deg here is 360 degrees. After the car stops moving, measure the actual rotation angle and enter the measured actual rotation angle into the terminal; the terminal will automatically calculate the calibration coefficient.

[!TIP]
test_angle_deg:=360° is a demonstration example; you can adjust the tested angle as needed.
4. Write the Calibration Coefficient to the MicroRos Control Board
- Close the microros_v2_bringup and calibrate_linear terminals started earlier, and double-click the RobotManager application icon on the virtual machine desktop

- On the control board page, enter the calibration coefficient calculated in the previous step into the angular velocity coefficient, and click Apply Configuration.

5. Verification Test
- Repeat the test again
ros2 run common_demo calibrate_angular_z --ros-args -p test_angle_deg:=360.0; the rotation error will now be smaller than before calibration.