View Single Post
  #28   Spotlight this post!  
Unread 19-02-2010, 17:56
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: Who Has Programmed From Scratch?

Quote:
Originally Posted by Dave Scheck View Post
...On the autonomous side, we simply make these same types of calls and reuse the entire drive base objects. In addition, all of our programs run in a common engine that takes simple commands like driveByTime or driveByEncoder. This makes writing programs as simple as defining the steps and calling an addCommand function. Our individual autonomous programs last year didn't have a single line of logic in them. They simply assigned values to the step parameters and called addStep. Since they all derive from the same base class, they all have a run in the base that handles stepping through the commands...
We did something fairly similar, except instead of adding commands to a list, we simply called the commands directly. We wrote our code in LabVIEW, and it runs in a virtual thread, so we can do things like this c++-equivalent code:
Code:
void auton_f1(void)
{
set_ball-o-fier(RUN);
drive_Straight(36,0.6); //Drive forward 36 inches max speed 0.6
drive_to_ball(0.3); //Creep to broken-beam sensor
kick(); //Kicker manipulates ball-o-fier as necessary, leaving it in its original state
drive_Straight(24,0.4); //Drive to almost next ball
drive_to_ball(0.3);
kick();
.....
We initially wanted to write the Auton code in Python, but decided that the Python-Labview interface would be too challenging to write compared to its advantages, so now we just put a bunch of VI's together and execute them sequentially.
__________________
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