Robotics Fundamentals 1, Chapter 4: Challenge 3 solution (odometry drift, calibration, and tracks) Formulas: dtheta = (dR - dL) / L(true) R = ds / dtheta x = R sin(dtheta) y = R (1 - cos(dtheta)) (for a robot starting at the origin facing along x) L(eff) = L(assumed) x (odometry angle) / (true angle) skid-steer: L(eff) = alpha L(geometric) M(turn) = mu m g Lc / 4 F = M(turn) / L(eff) Given: assumed wheel diameter 0.070 m and track width 0.180 m; true right-wheel diameter 0.0707 m (left 0.0700 m); true effective track width 0.186 m. (a) Odometry thinks each wheel rolled 4.00 m, from the number of ticks counted. The right wheel is 0.0707 / 0.0700 = 1.01 times the size, so it rolls right = 4.00 x 1.01 = 4.040 m, left = 4.000 m. Centre travel: ds = (4.040 + 4.000) / 2 = 4.020 m. Real heading change: dtheta = (4.040 - 4.000) / 0.186 = 0.2151 rad = 12.32 degrees. (The TRUE track width is used here, because it is the real robot that turns.) Circle radius: R = 4.020 / 0.2151 = 18.69 m. Real position (odometry says (4.00, 0)): x = 18.69 x sin(0.2151) = 18.69 x 0.21343 = 3.989 m y = 18.69 x (1 - cos(0.2151)) = 18.69 x 0.023041 = 0.431 m So the robot is about 0.43 m to the side of where odometry says, and pointing 12.3 degrees away from the way odometry says, after 4 m of "straight" driving. (b) By odometry a 360 degree spin needs each wheel to roll once round a circle of radius 0.180 / 2 = 0.090 m: 2 pi x 0.090 = 0.5655 m (in opposite directions). Real rotation = (0.5655 + 0.5655) / 0.186 = 6.0805 rad = 348.4 degrees. It is 360 - 348.4 = 11.6 degrees short. (The ratio is 0.180 / 0.186 = 0.968.) (c) Calibration factors: Right wheel diameter: scale by 1.01, i.e. use 0.0707 m (the straight-line test shows the robot curving until the two wheels agree). Track width: L(eff) = 0.180 x 360 / 348.4 = 0.186 m (the factor is 1.033, i.e. the track is 3.3 % wider than assumed). With both corrected, odometry agrees with the real motion for these systematic errors. Slip and bumps are random and cannot be calibrated away. (d) Tracks, geometric track width 0.16 m, alpha = 1.7: L(eff) = 1.7 x 0.16 = 0.272 m. If the software uses 0.16 m, it believes a turn of dtheta = (dR - dL) / 0.16, but the robot actually turns (dR - dL) / 0.272. When odometry says 90 degrees, the real turn is 90 x 0.16 / 0.272 = 90 x 0.588 = 52.9 degrees. The robot has turned only 53 degrees of the 90 it thinks it turned, a 37 degree error from every quarter-turn, unless the model uses L(eff). (e) m = 3 kg, mu = 0.9, Lc = 0.22 m, L(eff) = 0.272 m. Turning moment: M = 0.9 x 3 x 9.81 x 0.22 / 4 = 1.457 N m. Force on each side (opposite directions): F = M / L(eff) = 1.457 / 0.272 = 5.36 N. Rolling resistance in a straight line (Crr = 0.03): 0.03 x 3 x 9.81 = 0.883 N for the whole robot. So each side must push about 5.4 N to turn on the spot, about six times the 0.88 N needed to roll the whole robot straight, which is why skid-steer robots need strong motors, wear their tyres and sometimes stall while turning on grippy floors. Check on method: in (a) the circle radius also follows from (L/2)(vR + vL)/(vR - vL) = 0.093 x (8.040 / 0.040) = 0.093 x 201 = 18.69 m. Same answer.