|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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? ![]() |
|
#2
|
|||||
|
|||||
|
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.
|
|
#3
|
||||
|
||||
|
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.
|
|
#4
|
|||||
|
|||||
|
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) turn left(2 sec) /*or right, depending on which side of the field you are starting at*/ forward(2 sec) hand control over to the camera 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;}
if(p1_sw_top==1){ disable_cam=0;}
Hope this helps, |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Green target has to "warm up"? | Eldarion | Programming | 14 | 27-01-2006 12:52 |
| Christmas Tree Lights On The Controller | Astronouth7303 | Programming | 1 | 05-02-2005 21:52 |
| Reputation points | SilverStar | CD Forum Support | 73 | 26-05-2004 02:14 |
| is anyone wanting a lot of lights (decorative) on the robot? | archiver | 2001 | 5 | 24-06-2002 00:09 |