Quote:
Originally Posted by Bethie42
On another note, has anyone here worked on an autonomous mode that scores more than one tube?
|
I have.
The command functions are written in LabVIEW and perform specific tasks reliably and accurately. The primary drive functions are drive_straight and drive_gyro_turn, and both were calibrated fairly precisely (drive is accurate to about 1/2" and gyro is repeatable to about a degree, but is usually off by two degrees). There are also more command functions for elevator actions, but all of those set the getsets which are read by the elevator code elsewhere (do score, set state, etc.)
The beescript system runs on top of the command functions, and reads a text file on the cRio which it interprets and calls the command functions (by ref).
An example script would be:
Code:
#score a tube 150 inches away 3.4 ft/sec
ELEV_SET_STATE score_hi
DRIVE_STRAIGHT 150 3.4
#score
ELEV_SCORE
#backup
DRIVE_STRAIGHT -150 6
This would be read by the interpreter and it would call the command functions in sequence.