View Single Post
  #2   Spotlight this post!  
Unread 28-02-2013, 15:32
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,721
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Stablized shooter & Claculating distance by vision

Quote:
Originally Posted by Doron_Sivan View Post
Hi everybody,
I'd be glad to know which algorithm / method did you use for:

1. Stablize the shooter (for speciefic rpm). Did you use encoder and a PID closed loop? If so, which specific argument/s in the PID did you use. Otherwise, what other mehod did you used to stablized the shooter???

2. Find your distance from the vision target. Did you use a table of measurments, or a formula?? If you used a formula I'll be glad if you would explain it and tell me if it worked with precision.

[We - 4590 - have written our code in C++, and used the RoboRealm for the vision processing.]
1. Used a Pololu wheel encoder with codewheels laser printed on cardstock. The black strip is about 0.5" wide to work at 11,000RPM on our 2-7/8" banebots wheels. We're using C++ and a slightly modified version of the WPILib PIDController. The modification changes how integral anti-windup works to speed up reducing the integral action in certain cases. I can post the modified class if you're interested. For tuning, we're using the P,I, and F terms. F was tuned by driving the motor open loop and measuring the RPM at a specific command value. P was tuned by increasing it until we saw some instability in the RPM, then reduced slightly. I was tuned to minimize time to settle in the error range, while keeping overshoot low.
2. No vision processing. We have a few parameter sets to let us shoot from various spots around the field, like behind and in front of the pyramid. Aiming and ranging is done by running into these physical locators. Co-pilot has a selector switch to pick which setup to use. Reduces our flexibility somewhat, but vastly simplifies programming and driving.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter