View Single Post
  #4   Spotlight this post!  
Unread 17-01-2016, 20:13
dubiousSwain's Avatar
dubiousSwain dubiousSwain is offline
The ride never ends
AKA: Christian Steward
FRC #5420 (Velocity)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2011
Location: USA
Posts: 304
dubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond repute
Re: Aiming with Vision

Quote:
Originally Posted by Greg McKaskle View Post
Your input value ranges from -160 to 160, which means that your other tuning parameters will need to be pretty small to output a number between .5 and -.5.
...
Finally, after doing this, I think you'll find that you cannot really close the loop using a camera. I'd suggest that you use the offset from the camera to compute an amount to turn the robot. Then use a gyro to close the loop. The measure with the camera and repeat if necessary.

Greg McKaskle
Thank you, this is great advice. I hadn't thought of graphing the output. We were discussing closing the loop with a gyro, now I think we will definitely do that. I'm not sure if it was included in the snippets, but I was trying to set the offset to zero when we lost the target but the robot kept spinning, must have been a bug.

Also when I set the I to 0, the loop doesn't output anything. Why is that?
__________________
2015 MAR District Champions




Reply With Quote