View Single Post
  #1   Spotlight this post!  
Unread 08-03-2012, 15:12
Teamcodeorange's Avatar
Teamcodeorange Teamcodeorange is offline
Registered User
FRC #3476
 
Join Date: Jan 2011
Location: US
Posts: 236
Teamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant future
Exclamation Vision Tracking, now what :)

Ok, so, Code Orange won the San Diego regional with the Super Nurds and team 4161. We did well but I want to optimize the robot as much as possible before championship. At San Diego I had to manually line up with the hoop using the camera feed. It took a while longer than I would have liked.

So... I would like to use some simple vision tracking turning the robot side to side (x axis of the joystick) to align with the hoop. Code Orange bought a second cRio this year so that isn't a problem. I have already calibrated the camera to be able to consistently find the x and y values from the vision tracking example. I need help telling the drivetrain to line up with the top vision target. I understand how I would need to sort through the 4 hoop's coordinates and choose the x value of the target with the highest y value. I made a proof of concept that tracks the target with a servo, but it always overshoots so I know I need a PID loop to make the drive train act how I want it to. The thing is I don't know how to do any of that.

tl;dr I need help figuring out how to make the -1 to 1 "x" values of the vision tracking .vi into something that tells the drivetrain to line up with the target. (preferably with a PID loop)

If you need my code please ask.

Thanks for your time

Last edited by Teamcodeorange : 08-03-2012 at 16:08.
Reply With Quote