View Single Post
  #4   Spotlight this post!  
Unread 02-03-2013, 14:36
Doron_Sivan Doron_Sivan is offline
Registered User
FRC #4590 (GreenBlitz)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2013
Location: Israel
Posts: 11
Doron_Sivan is an unknown quantity at this point
Re: Stablized shooter & Claculating distance by vision

Quote:
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.
Thanks first for your comments.
Kevin, I would really like if you'd post the code. I've never used F and I'm not familiar with it. It would be nice if you'll explain more how it affects the stablizing.

Quote:
We have a camera with RR code that detects the target and finds the distance with the angle the target occupies in our FOV and the ratio of the width and height of the target. That being said, we like to position ourselves on field objects. We don't use the camera during practice.
xmaams - even that you don't use it in the matches - did your formula for finding distance worked? And can you post an explanation / the roborealm code for that (if you want to..)
Also, because we used also RR - have you experienced laggs on the robot when running code + RR at the same time?