Go to Post Swerve Drive (n.) - a set of mechanisms to ensure the robot will sit dead on the field for half of that robot's first event - Kevin Leonard [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 02-02-2006, 15:24
Gili Gili is offline
Registered User
FRC #1577
 
Join Date: Feb 2006
Location: Israel
Posts: 6
Gili is an unknown quantity at this point
our own allternative code for the cmu camera

We had a lot of problems working with Kevin's tracking code for the CMUcam, so we decided to develop our own. we worked all night (literally) and came up with a program that works with our camera. the program itself tracks the green target and if it doesn't find it, it searches for it. if you also have any problems with Kevin's tracking code (sorry Kevin but we tried ), take a look at what we did, its worth a try.

click here to go to our forum and download the code

BTW, if you see any bugs or have any suggestions, we will be happy to hear what you have to say
__________________
#1577 SteamPunk Aviv HighSchool Raanana Israel

Last edited by Gili : 02-02-2006 at 15:37.
  #2   Spotlight this post!  
Unread 02-02-2006, 16:14
nheft nheft is offline
Registered User
FTC #0533 (Psichotics)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 1999
Location: Lindenhurst HS
Posts: 35
nheft is a jewel in the roughnheft is a jewel in the roughnheft is a jewel in the roughnheft is a jewel in the rough
Re: our own allternative code for the cmu camera

I tried the link you posted and got a 3 K file called 1577camera.rar. Where do I go from here?

Quote:
Originally Posted by Gili
We had a lot of problems working with Kevin's tracking code for the CMUcam, so we decided to develop our own. we worked all night (literally) and came up with a program that works with our camera. the program itself tracks the green target and if it doesn't find it, it searches for it. if you also have any problems with Kevin's tracking code (sorry Kevin but we tried ), take a look at what we did, its worth a try.

click here to go to our forum and download the code

BTW, if you see any bugs or have any suggestions, we will be happy to hear what you have to say
  #3   Spotlight this post!  
Unread 02-02-2006, 16:19
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,082
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: our own allternative code for the cmu camera

I would STRONGLY suggest putting only function forward declarations in the .h file and putting the rest in a .c file...
  #4   Spotlight this post!  
Unread 02-02-2006, 16:20
Gili Gili is offline
Registered User
FRC #1577
 
Join Date: Feb 2006
Location: Israel
Posts: 6
Gili is an unknown quantity at this point
Re: our own allternative code for the cmu camera

Quote:
Originally Posted by nheft
I tried the link you posted and got a 3 K file called 1577camera.rar. Where do I go from here?


hi nheft!
the file you downloaded is a rar file. open it with WinRaR (if you don't have it download from here ).
after downloading, extract the files with winrar and follow the instructions in readme.txt. it should be pretty easy from there. if you still have any problems, feel free to ask any question and we will be happy to help .
__________________
#1577 SteamPunk Aviv HighSchool Raanana Israel
  #5   Spotlight this post!  
Unread 02-02-2006, 16:21
Gili Gili is offline
Registered User
FRC #1577
 
Join Date: Feb 2006
Location: Israel
Posts: 6
Gili is an unknown quantity at this point
Re: our own allternative code for the cmu camera

Quote:
Originally Posted by Abwehr
I would STRONGLY suggest putting only function forward declarations in the .h file and putting the rest in a .c file...

ok, we added a .c and changed the .h as you recommended. thanks again!

ps. we will be happy to hear more comments.. we are kind of C noobs so tell us what you think
__________________
#1577 SteamPunk Aviv HighSchool Raanana Israel

Last edited by Gili : 02-02-2006 at 16:52. Reason: fixed.
  #6   Spotlight this post!  
Unread 02-02-2006, 17:34
nheft nheft is offline
Registered User
FTC #0533 (Psichotics)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 1999
Location: Lindenhurst HS
Posts: 35
nheft is a jewel in the roughnheft is a jewel in the roughnheft is a jewel in the roughnheft is a jewel in the rough
Re: our own allternative code for the cmu camera

Thank you

Quote:
Originally Posted by Gili
hi nheft!
the file you downloaded is a rar file. open it with WinRaR (if you don't have it download from here ).
after downloading, extract the files with winrar and follow the instructions in readme.txt. it should be pretty easy from there. if you still have any problems, feel free to ask any question and we will be happy to help .
  #7   Spotlight this post!  
Unread 03-02-2006, 08:32
Jon236's Avatar
Jon236 Jon236 is offline
Registered User
AKA: Jon Mittelman
FRC #2648 (Infinite Loop)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Windsor, Maine
Posts: 741
Jon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond repute
Re: our own allternative code for the cmu camera

Quote:
Originally Posted by Gili
ok, we added a .c and changed the .h as you recommended. thanks again!

ps. we will be happy to hear more comments.. we are kind of C noobs so tell us what you think
Thanks for the code...will try it out in a bit...

When is your regional?.....I hope to come, but there are no dates!!!!!!

Jon Mittelman
Team236 Mentor
  #8   Spotlight this post!  
Unread 03-02-2006, 08:58
Gili Gili is offline
Registered User
FRC #1577
 
Join Date: Feb 2006
Location: Israel
Posts: 6
Gili is an unknown quantity at this point
Re: our own allternative code for the cmu camera

sorry...i don't know the dates yet...
when i will i'll post them
we'll be glad to see you in Israel
__________________
#1577 SteamPunk Aviv HighSchool Raanana Israel
  #9   Spotlight this post!  
Unread 06-02-2006, 21:36
Jon236's Avatar
Jon236 Jon236 is offline
Registered User
AKA: Jon Mittelman
FRC #2648 (Infinite Loop)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Windsor, Maine
Posts: 741
Jon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond repute
Re: our own allternative code for the cmu camera

Quote:
Originally Posted by Gili
sorry...i don't know the dates yet...
when i will i'll post them
we'll be glad to see you in Israel
I wanted to share our base driver code with you. It allows simultaneous operation of the camera, gyro, sonar, quadrature encoders and yaw sensor.

You can find at at the end of this thread:

http://www.chiefdelphi.com/forums/sh...0&page=2&pp=15


Good luck and here's hoping to see you guys in Tel Aviv!

Jon Mittelman
Team236
  #10   Spotlight this post!  
Unread 08-02-2006, 20:07
Calvin Calvin is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Portland OR
Posts: 105
Calvin has a spectacular aura aboutCalvin has a spectacular aura about
Re: our own allternative code for the cmu camera

Ok I have been testing your code... but I have run into a problem!

At the beginning the camera goes wild and finds the light object...
- as either the camera mount moves or the light moves, the camera follows it.

If you cover up the camera, the xerror and yerror values turn 0... Camera stands still and nothing happens... as you uncover the camera it detects the light and does a little adjusting...

BUT now here is where the problem comes in:
- Cover up the camera. (xerror = 0, yerror = 0)
- Now move the camera away from the light.
- Uncover the camera.
- The camera stands still!

What if during the competion a robot blocks your camera, and your robot moves away (hence your camera moves away from light)... The camera won't respond until it is shown a glimps of the light.

Maybe you should add a piece of code that after a certian amount of time (while xerror = 0 and yerror = 0) to restart the camera and do that wild scan again.

Last edited by Calvin : 08-02-2006 at 21:43.
  #11   Spotlight this post!  
Unread 09-02-2006, 07:56
Gal Gal is offline
Registered User
FRC #1577
 
Join Date: Feb 2006
Location: Israel
Posts: 2
Gal is an unknown quantity at this point
Re: our own allternative code for the cmu camera

Quote:
Originally Posted by Calvin
If you cover up the camera, the xerror and yerror values turn 0... Camera stands still and nothing happens... as you uncover the camera it detects the light and does a little adjusting...
If you cover up the camera, it should start searching for the light. If you look in the 1577camera.c we supplied, in the search() function it says:

Code:
if (xerror != 0 && yerror != 0)
     track();
That means that if the xerror and yerror are NOT 0, the camera should track the light. If the xerror and yerror ARE 0, the camera should perform a search as written in the code.
I don't know why your camera doesn't perform that search but i know it should...
This code works for us very well, but maybe we should add an 'else' after that 'if'.
Anyway, are you sure you followed all of the instructions in the readme we made?
__________________
A proud member of #1577 SteamPunk from Raanana, Israel!

Last edited by Gal : 09-02-2006 at 08:14.
  #12   Spotlight this post!  
Unread 09-02-2006, 11:24
Calvin Calvin is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Portland OR
Posts: 105
Calvin has a spectacular aura aboutCalvin has a spectacular aura about
Re: our own allternative code for the cmu camera

Alrighty I will play around somemore today...
  #13   Spotlight this post!  
Unread 09-02-2006, 19:33
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
Re: our own allternative code for the cmu camera

Would you mind sticking one in a zip file online. On Mac OS X there is no standard unrar utility, and I can't find one that does not cost money.
__________________
My Blog!
  #14   Spotlight this post!  
Unread 09-02-2006, 20:15
Gal Gal is offline
Registered User
FRC #1577
 
Join Date: Feb 2006
Location: Israel
Posts: 2
Gal is an unknown quantity at this point
Re: our own allternative code for the cmu camera

Quote:
Originally Posted by X-Istence
Would you mind sticking one in a zip file online. On Mac OS X there is no standard unrar utility, and I can't find one that does not cost money.

I uploaded the zipped file to our forum: http://www.avivrobotics.net/forum/viewtopic.php?p=27
__________________
A proud member of #1577 SteamPunk from Raanana, Israel!
  #15   Spotlight this post!  
Unread 12-02-2006, 04:58
Calvin Calvin is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Portland OR
Posts: 105
Calvin has a spectacular aura aboutCalvin has a spectacular aura about
Re: our own allternative code for the cmu camera

I would suggest you try putting the camera into a place with no lights at all,
Does it restart search if no target is found?

Anyways, with a bit modification I was able to have the code restart search (after 5 seconds ) if no target was found... for once we don't want it to restart just because something quickly got in it's way.
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
Out of the Box Camera Code russell Programming 9 21-10-2009 05:28
Problems Combining Camera Code and Driving Code cmurdoch Programming 20 10-02-2007 16:34
CMU Camera kills robot controller if not found. Chris_Elston Programming 21 27-03-2006 14:30
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
CMUCam2 Camera Code - Are important parts commented out? Mr. Lim Programming 4 14-01-2005 12:11


All times are GMT -5. The time now is 15:33.

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