View Single Post
  #11   Spotlight this post!  
Unread 15-03-2005, 17:11
Tom Saxton's Avatar
Tom Saxton Tom Saxton is offline
Registered User
no team (Issaquah Robotics Society)
Team Role: Mentor
 
Join Date: Dec 2003
Rookie Year: 2003
Location: Sammamish, WA
Posts: 98
Tom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud of
Re: Setting Autonomous Settings from OI

Quote:
Originally Posted by The Lucas
WOW This is the most complex auto selecting routine I have ever seen.
Well, it's doing a lot more than setting the autonomous modes, but we did build the OI controls to handle a bunch of autonomous modes. We can go for the knocking the hanging tetra, drive to a loading zone on the left or right, we can be carrying the starting tetra and position to cap, we can run interference on the other side of the field. g_stratAutonomous determines which of these strategies to run. For the loading zones, we can go for the near or far instance (g_fFarLoading). And we can start from one of three starting postions (g_tposStartingPos). Once you've got dead reckoning working, it's easy to compute a path that will take you from your starting position to your destination, so the code to run all of these different modes is actually not that complex.

Like most teams, we didn't get the vision stuff working, but we still wanted to be as flexible as possible so we could mesh well with alliance partners' autonomous modes. A lot of robots could only use the auto or human loaders, etc. We have enough flexibility that we can let our partners pick what they want to do and we can still do something useful.

We didn't get everything reliably working, but we did have three functional modes available by Saturday at the PNW regional. One thing that slowed us down getting the third mode working was the problem with the wrong mode value coming through, hence this thread.

Quote:
Originally Posted by The Lucas
Code:
extern char g_tposStartingPos;
extern uchar g_stratAutonomous;
extern uchar g_fFarLoading;
Where do you actually declare these varibles? extern just makes them global across all files that include userroutines.h, it doesn't actually create the varibles.
As noted in the code, this is just an excerpt from user_routines.c and user_routines.h. Trust me, I know what extern does, the code compiles, links and works, except for the issue of sometimes getting bad values from the OI. To answer your question, the variables you asked about are declared in user_routines.c.
__________________
Tom Saxton
http://www.idleloop.com/