Personal Rover Serial Interface

Enhanced Command-Set


RM [1|0]		Rover Mode
--------------------------
Options:
1: Enter RoverMode. Initializes the four daughterboards, activates velocity control, sets steering angle to 0 (straight ahead).
0: Exit RoverMode. Resets the four daughterboards, deactivates velocity control, disables steering servos.
RV and RT will return error if the Cerebellum is not yet in RoverMode. RoverMode will return error if it cannot initialize any of the four daughterboards.

RV [+|-]n		Rover Velocity
------------------------------
Sets rover speed to +/-n. Sign of n assumed to be positive (+) if unspecified. Positive velocity indicates forward movement, negative velocity indicates backward movement. n is limited to -128 < n < 127 in firmware. Kinematically, n is the speed of the fastest of the four wheels, which, during a turn, is always the front outer wheel.

RT [+|-]n		Rover Turn
--------------------------
Sets rover steering angle to +/-n. Sign of n assumed to be positive (+) if unspecified. Positive steering angle indicates steering towards the right. Negative steering angle indicates steering towards the left.

0: straight

+1: slightly to the right
+12: hard right, pivoting on right rear wheel
+13: internal turn centered close to rear right wheel, chassis turns clockwise with positive velocity
+18: center of turn close to center of rover, chassis turns clockwise with positive velocity

-1: slightly to the left
-12: hard left, pivoting on the left rear wheel
-13: internal turn centered close to left rear wheel, chassis turns counter-clockwise with positive velocity
-18: center of turn close to center of rover, chassis turns counter-clockwise with positive velocity

RB n			Rover Boom
--------------------------
Sets position of boom to n, limited to 90 < n < 190 in firmware because of wire length limitations. This function does not return until the boom is in the desired position. 90 is the most backward position, 190 is the most forward position. The boom is approximately perpendicular at 145.


CP [+|-]n		Camera Pan
--------------------------
Pans camera to position n. Position 0 disables panning servo. A + or - prefix will cause n to be interpreted as an increment or decrement from the current pan position.

CT [+|-]n		Camera Tilt
---------------------------
Tilts camera to position n. Position 0 disables tilting servo. A + or - prefix will cause n to be interpreted as an increment or decrement from the current tilt position.


Caveats:
Right now, entering RoverMode does not prevent the user from executing commands that will interfere with the state of the rover. Since the rover command set is not yet fully implemented, this is necessary so that state information can be read (and not just written) from the rover hardware. Since the rover command-set is currently "read-only", you can use existing commands to directly read the rover's status (eg. get current daughterboard velocity). Once the command-set is fully implemented, direct access commands will disable themselves once RoverMode is active.

Be careful of the lengths of the wires. At the extreme boom positions, there is very little slack on the wires. If you turn the steering servos while the boom is in the fully back position, the wires will be ripped out of their sockets.

Eventually, each rover command, when given without parameters, will return their current values. For example, giving "RT\r" will return the current steering angle, "RV\r" will return the actual velocities of the four wheels, etc.