Tuning encoders tutorial



This document walks you through the initial setup and tuning of the wheel odometry of a Rover. The 2wd, 4wd, and flippers configurations all require some minor changes in the launch file depending on which drive type you are using. The speed of operation, driving surface, and payload weight all factor in to the traction_factor so it is advised to do a box test to verify the traction_factor ROS param of the rr_openrover_driver is set well in the launch file.

This walkthrough assumes you are using the Starter kit and are able to drive the robot around with the controller.

Step 1 - Ensuring rr_openrover_basic ROS params are set properly for your robot

Verify the launch file you are using defines the params drive_type appropriately for your robot and the traction_factor to the value associated with the drive type as found on the rr_openrover_driver ROS wiki. The values listed on the wiki are for the robots operating at low speed on flat carpet with the start kit payload. To test that the traction_factor is adequate, continue on to Step 2 - The Box Test.

Step 2 - The Box Test

The box test is a good rule of thumb for checking odometry and verifying it’s ‘good enough’. This box test will only consist of the wheel odometry however it’s suggested to do the same test with the IMU and the fused IMU + Wheel to confirm everything is working as expected.

1) Make sure you are receiving the odom topic /rr_openrover_driver/odom_encoder in rviz.

2) Verify the frames of the Camera and grid are set to Odom.

3) Drive slowly in a square making 90 degree turns and driving as straight as possible. Turning closed_loop_control on will help keep the robot driving straight, but isn’t necessary for these tests.

4) Launch teleop.launch and drive the box! If the traction_factor is too high the square’s corners will be acute and conversely, if the corners are obtuse then the traction_factor is set too low. The traction factor should be between 0-1. Below is are some example box tests. 

5) Stop the launch file and tweak the traction_factor based on the box test results and then re-launch teleop.launch.  Repeat until satisfied with result.

Sources and Documents

rr_openrover_driver ROS Wiki