![]() |
Florescent lights green on both sides?!?
While mentally trying to figure out how I'll be programming the CMUcam2 in the next couple of days... I thought "Camera scans, finds the lights, turns the shooter towards the target and I click the "fire" button"
But than it hit me, how is the robot suppose to know which target it's pointing at? Are the targets different colors? :ahh: |
Re: Florescent lights green on both sides?!?
The targets are not different colors. But you will know which direction yours will be in from the beginning of the match (right side if facing center of field). Using this you can tell the robot to scan a smaller area until it finds the light, and not your opponent’s.
|
Re: Florescent lights green on both sides?!?
There are no distinguishing differences between the 2 goals, and I'm guessing GDC did this on purpose to force you into doing a little bit more for autonomous. You can simply limit your camera pan so you only point at one side of the field, or if you want to be extra careful in case an opposing (or alliance) robot turns you around, use a gyro and don't shoot unless you're within a certain range representing the side of the field you want to point towards.
|
Re: Florescent lights green on both sides?!?
Quote:
A solution to your problem might to write a short dead reckoning algorithm, lets say (in pseudocode): Code:
forward(1 sec) Next, you can have a switch on your control board (or a joystick button), such that: Code:
if(p1_sw_trig (hypothetical)==1){ disable_cam=1;} Hope this helps, |
| All times are GMT -5. The time now is 13:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi