Go to Post Win, Lose or Tie, but do it in a way that FIRSTers will be talking about for years to come! - Bill Moore [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-03-2006, 21:01
Neo3One3 Neo3One3 is offline
Registered User
AKA: Nick
FRC #0175 (Buzz)
Team Role: Driver
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Enfield, CT
Posts: 21
Neo3One3 is a name known to allNeo3One3 is a name known to allNeo3One3 is a name known to allNeo3One3 is a name known to allNeo3One3 is a name known to allNeo3One3 is a name known to all
Changing the search pattern

Hey, I wanted to tell a problem that I've had with the CMU Cam, and hopefully want to hear a way to fix it, if anyone can help, thanks!

I'll try to explain it best as I can, bear with me...

When the search pattern for the camera starts, it is in the lower left position, and it goes across that level in a certain number of intervals, which can be set to whatever I'd like. However, when moving up to the next level, it goes from the bottom right position to the middle left, and the problem is, if the camera sees the light (red light turns on) in the process of moving from the bottom right to the middle left, it loses it by the time it actually sweeps all the way to the middle left position, so it then starts the search pattern from the bottom left position again.

As you can see, this is an endless loop, that can be a problem at times. Does anyone know how to change the search pattern so that instead of moving from the bottom right position to the middle left, it moves to the middle right? That would solve the problem. I've looked through the code a bit, mostly in tracking.c, but didn't really see much, though I'm still looking. Just wanted to know if anyone has already had this problem and solved it.
__________________

Go Buzz!
  #2   Spotlight this post!  
Unread 20-03-2006, 21:38
Denz's Avatar
Denz Denz is offline
Registered User
FRC #0772 (Sabre Bytes Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: LaSalle, Ont, Canada
Posts: 66
Denz is on a distinguished road
Send a message via MSN to Denz
Re: Changing the search pattern

I had a similar problem aswell. Go to tracking.h and put this code right under where it says

///////////////////
// //
// search code //
// //
///////////////////

The old values are commented out. What this does is it ensures that even if the camera sees a glimpse of the light, and loses it, it will stay at it's current value and keep searching if it loses it. But once it finds it, it functions normally and tracks the light. It's a nice quick fix . Enjoy!

new_search = 0;
//temp_pan_servo = 0;
temp_pan_servo = (int)PAN_SERVO;
//temp_tilt_servo = TILT_CENTER_PWM_DEFAULT;
temp_tilt_servo = (int)TILT_SERVO;
__________________
www.sabrerobotics.com
  #3   Spotlight this post!  
Unread 20-03-2006, 21:51
Neo3One3 Neo3One3 is offline
Registered User
AKA: Nick
FRC #0175 (Buzz)
Team Role: Driver
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Enfield, CT
Posts: 21
Neo3One3 is a name known to allNeo3One3 is a name known to allNeo3One3 is a name known to allNeo3One3 is a name known to allNeo3One3 is a name known to allNeo3One3 is a name known to all
Re: Changing the search pattern

Hmm, seems like that would work. I'll definately try that once I get to work on the thing again in Atlanta. Just let me make sure if I understand correctly, if the camera sweeps up and catches it, but then loses it, instead of restarting the loop, it'll just keep searching where it left off? If so, that's a great help. Thanks a lot.
__________________

Go Buzz!
  #4   Spotlight this post!  
Unread 21-03-2006, 14:56
Denz's Avatar
Denz Denz is offline
Registered User
FRC #0772 (Sabre Bytes Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: LaSalle, Ont, Canada
Posts: 66
Denz is on a distinguished road
Send a message via MSN to Denz
Re: Changing the search pattern

Yeah, basically, the camera wont ever go to the restart position when searching, even when it finds it for a second and loses it. It will go to the start position if it reaches the end of the search pattern. We used this in our code and it hasn't let us down, so I'm gunna go ahead and say it works perfectly.
__________________
www.sabrerobotics.com
  #5   Spotlight this post!  
Unread 23-03-2006, 09:45
DICKIE DICKIE is offline
Registered User
FRC #1355 (Stallions)
 
Join Date: Mar 2006
Location: Wingham, Ontario, Canada
Posts: 3
DICKIE is on a distinguished road
Re: Changing the search pattern

Don't u mean in tracking.c??? i dont beleive there is search code within tracking.h....am i right in saying this or am i a complete idiot??
  #6   Spotlight this post!  
Unread 23-03-2006, 11:21
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,287
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Changing the search pattern

Actually, it is in tracking.c There is no tracking code in tracking.h (though there are values used for the tracking code there).

This fix works extremely well for this tracking error, our team employed it as well for the camera searching.
  #7   Spotlight this post!  
Unread 25-03-2006, 15:49
Denz's Avatar
Denz Denz is offline
Registered User
FRC #0772 (Sabre Bytes Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: LaSalle, Ont, Canada
Posts: 66
Denz is on a distinguished road
Send a message via MSN to Denz
Re: Changing the search pattern

Yeah, that's what I meant sorry. lol but atleast u got the idea.

tracking.c
__________________
www.sabrerobotics.com
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Servo Initialization Caution Keith Watson Programming 3 09-02-2006 07:49
Mozilla / FireFox Search Plugins Brandon Martus Announcements 7 06-06-2005 10:41
search white papers? sirbleedsalot CD Forum Support 3 03-04-2005 17:09
teach rookies how to search Ken Leung CD Forum Support 2 17-01-2005 00:03
20 second search interval sanddrag CD Forum Support 4 14-02-2004 08:52


All times are GMT -5. The time now is 10:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi