Robot Localization -- Calibration
/In this world, nothing is perfect. However, we can get pretty close to perfection. Thus, another important part of building the dead reckoning system was calibration, getting as close to perfection as possible. During our testing of the dead reckoner and robot driver, we noticed that our linear drives were missing the target by 5-8%. We dug into the math and double checked all of our values for robot and wheel dimensions. Nevertheless, the issue still persisted. There are two likely sources for this error: slight imperfections in the drive train, or the effective diameter of the wheels is different since the robot drives on a foam tile floor. To fix these problems, we added a calibration value for linear distances in the form of a simple multiplier for the amount of encoder counts per inch.
driveWheelDistancePerCount = (driveWheelCircumfrence / driveWheelCountsPerRev) * driveWheelCalibration;
This multiplier was determined by driving a known distance and dividing that value by the distance that the robot thought that it traveled. To accomplish this, we mounted a downward facing color sensor to the bottom of the robot and applied two tape lines to the field. (40 5/16" [40.3125] from leading edge to leading edge; 40 1/2" [40.5000] from trailing edge to trailing edge.) We placed the robot outside of these lines then drove over both of them in a straight line.
We then collected the data, determined the calibration factor, and tested the results. After the calibration, the linear drives were within a 1-2% error of their target: an exceptional level of precision for our application.