| CronosPrime1 |
22-01-2006 18:04 |
Re: Scoring Corner Goals During Autonomous
Quote:
Originally Posted by Cuog
our teams autonomous also involves just driving toward the center goal but we used a slightly more complex method of driving to it:
we align the robot straight at the goal then i tell the camera to track about where the green light should be once it locks on it drives forward until the light goes out of range, once the light is out of range i will test to see how far it still has to drive to get to the goal and tell it to do that using dead reckoning.
|
I honestly don't believe that will work. You got 10 seconds. Do you really think you can align the robot straight at the goal, drive away, and come back, and then shoot and score some points I assume, all within 10 seconds? Why not use the camera and some basic trigonometry or something to drive toward the light right away and stop at some distance X from the goal? I'm guessing the camera can tell you what angle it's looking at the light from (well, these would be derived from the servo values). Then, using math, you can find the distance. For example, if you know the vertical distance between where your camera is mounted and the light is Y and the angle you're observing it from (derive from servo values) is A, then:
tan A = Y/X (X is the distance you need). So, X = Y/tan A.
|