Mokai Speed Adjustments
Maintained by: paulrobi@mit.edu Get PDF
1 Overview
2 Changing the Maximum Speed
1 Overview
The newer Mokai throttles use a Pololu Maestro servo controller. The controller takes in forward and lateral values from the joystick using an analog to digital converter and outputs commands to servos controlling the throttle and steering. The controller can be programmed using the Maestro Control Center program from Polulu (only works on Windows and Linux at this point) and the built-in scripting language. For more information, please review the user guide at https://www.pololu.com/docs/0J40.
2 Changing the Maximum Speed
The servo controller maps joystick inputs from the range of approximately 125-925, centered on 525, as they are interpreted by the analog to digital converter to values of approximately 4500 to 7500, centered on 6000, for the servos. These values were found empirically and may not be consistent on all boxes.
To achieve the full range of both servos, input x should be mapped to output y as y=15/4(x-525)+6000. Note that the scripting language only works with integers, so fractions should be used instead of floats when determining the equation. The steering servo should ALWAYS use this equation unless and individual servo responds differently.
The throttle maps from input 0 to servo 2. Steering maps from input 1 to servo 3.
An example script that takes advantage of the full range of servo outputs is:
0 get_position 525 minus 15 times 4 divide 6000 plus 2 servo 1 get_position 525 minus 15 times 4 divide 6000 plus 3 servo repeat
The easiest way to reduce the throttle output is to increase the divisor ("4 divide") in the equation.
General form of the input to output mapping: y=a/b(x-525)+6000. Values for a/b to make the vehicle speed approximately 2.2m/s are:
Vehicle | Value |
unmodified | 15/4 |
3868 | 15/14 |
Page built from LaTeX source using texwiki, developed at MIT. Errata to issues@moos-ivp.org. Get PDF