Thread: Peg targeting
View Single Post
  #11   Spotlight this post!  
Unread 09-02-2017, 14:45
bacarpenter bacarpenter is offline
Lead programmer (2 years)
AKA: Baylee Carpenter
FRC #2197 (Las Pumas)
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2014
Location: Indiana
Posts: 24
bacarpenter is an unknown quantity at this point
Re: Peg targeting

Quote:
Originally Posted by flemdogmillion View Post
Get a cheap gyro, perhaps the ADXRS450, and set it up so that the angle resets every time the vision info changes (in Periodic Tasks.vi in a 10ms loop). That way, you have an angle that, when subtracted from the angle you calculate from your vision data, gives you how far off you are, even when vision doesn't update. At least that's how I did it.
Okay thank you for all your help. I have a gyro currently working on the robot, but the problem I see with using the gyro angle to line it up is distance. Right now my vision code won't figure the distance from the target it just says infinite. If I'm closer or further away that'd change the angle calculations, but right now I don't know how to get that distance.
Reply With Quote