Robotics Fundamentals 1, Chapter 4: Challenge 2 solution (Ackermann and mecanum geometry) Ackermann formulas: R = W / tan(delta) R_f = W / sin(delta) omega = v tan(delta) / W R(min) = W / tan(delta max) inner = atan(W / (R - T/2)) outer = atan(W / (R + T/2)) cot(outer) - cot(inner) = T / W Given: W = 0.30 m, T = 0.18 m. (a) delta = 15 degrees (tan 15 = 0.26795, sin 15 = 0.25882): Rear axle centre: R = 0.30 / 0.26795 = 1.120 m. Front axle centre: R_f = 0.30 / 0.25882 = 1.159 m. Turning rate at 0.80 m/s: omega = 0.80 x 0.26795 / 0.30 = 0.7145 rad/s = 40.9 deg/s. (b) delta max = 28 degrees (tan 28 = 0.53171): R(min) = 0.30 / 0.53171 = 0.564 m (rear axle centre; the front axle centre circles at 0.30 / sin 28 = 0.639 m). (c) R = 1.00 m about the rear axle centre: Bicycle-model angle: atan(0.30 / 1.00) = 16.70 degrees. Inner wheel: atan(0.30 / (1.00 - 0.09)) = atan(0.32967) = 18.25 degrees. Outer wheel: atan(0.30 / (1.00 + 0.09)) = atan(0.27523) = 15.39 degrees. Check: cot(outer) = 1.09 / 0.30 = 3.633 and cot(inner) = 0.91 / 0.30 = 3.033, so the difference is 0.600 = T / W = 0.18 / 0.30. Correct. The inner wheel steers about 2.9 degrees more than the outer wheel; a servo with both wheels set equally cannot do this exactly. Mecanum formulas (vx forward, vy left, omega counter-clockwise, k = lx + ly): FL = (vx - vy - k omega) / r FR = (vx + vy + k omega) / r RL = (vx + vy - k omega) / r RR = (vx - vy + k omega) / r Given: r = 0.05 m, lx = 0.12 m, ly = 0.10 m, so k = 0.22 m. vx = 0.40, vy = -0.20 (to the right), omega = 0.80. (d) k omega = 0.22 x 0.80 = 0.176 m/s. FL = (0.40 + 0.20 - 0.176) / 0.05 = 0.424 / 0.05 = 8.48 rad/s (81.0 rpm) FR = (0.40 - 0.20 + 0.176) / 0.05 = 0.376 / 0.05 = 7.52 rad/s (71.8 rpm) RL = (0.40 - 0.20 - 0.176) / 0.05 = 0.024 / 0.05 = 0.48 rad/s (4.6 rpm) RR = (0.40 + 0.20 + 0.176) / 0.05 = 0.776 / 0.05 = 15.52 rad/s (148.2 rpm) (rpm = rad/s x 60 / (2 pi).) (e) Forward equations: Sum = 8.48 + 7.52 + 0.48 + 15.52 = 32.00, so vx = (0.05 / 4) x 32.00 = 0.40 m/s. -FL + FR + RL - RR = -8.48 + 7.52 + 0.48 - 15.52 = -16.00, so vy = 0.0125 x (-16.00) = -0.20 m/s. -FL + FR - RL + RR = -8.48 + 7.52 - 0.48 + 15.52 = 14.08, so omega = 0.05 x 14.08 / (4 x 0.22) = 0.704 / 0.88 = 0.80 rad/s. All three match the command. (f) The largest wheel speed is RR = 15.52 rad/s, so the scale factor is 12 / 15.52 = 0.7732. Scaled wheel speeds: FL = 6.56, FR = 5.81, RL = 0.37, RR = 12.00 rad/s. Resulting motion: vx = 0.4 x 0.7732 = 0.309 m/s, vy = -0.2 x 0.7732 = -0.155 m/s, omega = 0.8 x 0.7732 = 0.619 rad/s. The direction of travel and the turning-per-distance are kept; only the speed falls. Clipping RR alone to 12 would change the direction and the spin (the robot would curve off its path). Check on method: for pure forward motion all four wheel speeds are vx / r, and for pure sideways motion they are +-vy / r in the pattern (-, +, +, -) for a left slide; the numbers above are a sum of these three simple cases.