View Single Post
  #48   Spotlight this post!  
Unread 27-01-2004, 16:23
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
Re: What to do with autonomous

Quote:
Originally Posted by IrisLab
Did you use a PID algorithm to get to a waypoint? It seesm like this would take care of overshoot.

Just curious.
When you boil our algorithm down to its lowest level, it was actually quite simple: point the wheels toward the target and drive. We had a bunch of other nice features like the ability to change the robot's orientation or keep a specific orientation as the robot moved, different speeds for each leg of the path, different waypoint sizes so we could drive by quickly & not worry about hitting the point exactly, and the ability to independently move our wings at each waypoint.

But the basis of the algorithm was knowing our current position (from our custom circuit) and the position of our next point, then using some trig to get the angle to the target. After we got the target angle we figured out what angle we needed to turn our wheels to by subtracting or adding the target angle and our robot's angle relative to the field (also from the CC). This calculation ws done each time we executed our main loop, which turned out to be 3-4x slower than the 26ms IFI loop.

The theory was simple, but getting it to work consistently with the tools IFI gave us was difficult. And keeping all the PBASIC code readable & understandable was a big challenge.