View Single Post
  #31   Spotlight this post!  
Unread 14-03-2011, 13:53
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Autonomy: How Did You Guys Do It?

Quote:
Originally Posted by Bethie42 View Post
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.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack