Thread: No angle?
View Single Post
  #2   Spotlight this post!  
Unread 19-02-2010, 08:05
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: No angle?

The sample code is always turning according to the gyro angle. If it identifies a target, that defines the angle to target, and the gyro setpoint is that angle. If it does not have a target identified, it assumes zero is your end of the field, and that is a reasonable guess as to where the target is.

If you manually place the target in front of the robot and look at the dashboard, is there a green mark around the target? The green box nearby is also giving the score of the target. Using this, you can test out where the camera code works and where it doesn't. You can decide if you want to tune it to accept smaller targets or ignore them because it is too far to kick anyway, etc.

Greg McKaskle
Reply With Quote