View Single Post
  #6   Spotlight this post!  
Unread 23-02-2007, 15:27
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: How do YOU find the distance from the light?

We have a short lookup table that turns camera tilt into desired travel distance. If the tilt is too close to horizontal for the range of the table input, we know we're "very far" and pretend the destination is six feet in front of the robot. If the tilt is too close to vertical, we know we're "too near" and pretend the destination is six inches *behind* the robot.

The table was filled in empirically, by placing the robot exactly where we wanted and putting zero in the table for that tilt angle. Then we moved it back until the tilt angle changed and put the measured distance in the table. Repeat as desired, with some interpolation and lazy entries at the extremes. There's actually a range of about five tilt angles that we call "close enough" to score; they all have zeros in their associated table entries.