Thread: Auto Mode Help
View Single Post
  #4   Spotlight this post!  
Unread 05-02-2011, 22:58
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Auto Mode Help

Autonomous driving is all about sensors. First, you have to decide what sensors you want to use to guide your driving. For this year's game, I have heard the following strategies:
  • Line following using light sensors.
  • Distance and turn driving using encoders and gyros
  • Vision driving: using camera to recognize the pegs and driving towards it.
  • No sensors, use pure timing (e.g. drive motor x with power y for z seconds). If you are trying to play a recorded route, this is probably one way to do it.
There may be some other strategies, but these are the ones I am aware of. Once you decided which sensors to use, then you write the code to read the sensors, calculate the power to each driving motors accordingly and program the PWMs. If you decide on doing line following, FIRST has provided sample code on how to do that. If you decide to use encoders and gyros, you can use PID control algorithm which are also supported in WPI library and there are many sample programs you can look at. And so is vision driving. There are a lot of sample code from the last couple years (Lunacy and Breakaway).
__________________
Reply With Quote