Go to Post Not sure if its fair to call this or not yet. Back a group of dedicated teenagers far enough into a corner, and they're gonna find a way out. - Racer26 [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-02-2006, 15:58
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
CMUCam2 not tracking

We finally got the camera hooked up, and from before, I came up with the code to have the camera track without using pots. We have our camera directly attached to a turntable and the turntable is pwm01. The code we are using is:

Code:
	if (PAN_SERVO > 210)
	{
		pwm01 = 254;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO > 170)
	{	
		pwm01 = 180;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO > 150)
	{
		pwm01 = 150;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO > 133)
	{
		pwm01 = 140;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO < 120)
	{
		pwm01 = 110;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO < 100)
	{
		pwm01 = 100;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO < 60)
	{
		pwm01 = 60;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO < 40)
	{
		pwm01 = 30;
		Switch3_LED = 0;
	}

	else 
	{
		pwm01 = 127;
		Switch3_LED = 1;
	}
Am I suppose to put this in Process_Data_from_Master_uP() or Default_Routine()? Also, does anyone see any problems in this, or am I suppose to call any functions before this or what. Because the camera just goes to the default position and doesn't move when we turn it on. It doesn't say "searching..." or anything in the Terminal Window. The camera doesn't even tilt, so i know something is wrong. It is getting power, it is plugged into the TTL port and all of that. So any help would be appreciated since it is one of the last days

Thanks,
Idaman323
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis
  #2   Spotlight this post!  
Unread 20-02-2006, 20:08
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Re: CMUCam2 not tracking

The default pan servo is:
Code:
#define PAN_SERVO pwm01
Did you change this? Otherwise you are just changing PAN_SERVO.

Also, if your camera is not searching comment out the code you posted and get the camera working first. Search through the .c files for whatever pwm is your pan servo. Then note that it is assigned to at the top of Default_Routine() which needs to be commented out. Actually you would need to do this for both the pan and tilt servos.

We put our camera tracking to turret tracking code in a function called Turret_Tracking(). Then that function is called inside of Default_Routine(). We also call it in our autonomous code.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #3   Spotlight this post!  
Unread 20-02-2006, 20:16
Smithvillefirst Smithvillefirst is offline
Anthony Peck
FRC #1806 (Smithville First)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Smithville
Posts: 9
Smithvillefirst is an unknown quantity at this point
Talking Re: CMUCam2 not tracking

GOOD LUCK!
__________________
Anthony Peck
Integration Manager
Team 1806
  #4   Spotlight this post!  
Unread 20-02-2006, 20:29
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
Re: CMUCam2 not tracking

We are also having the problem where the camera locks onto nothing before it even starts searching. The red light on the camera lights up right as you power the robot.

So the camera wont even track until we get this situated
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis

Last edited by Idaman323 : 20-02-2006 at 20:39.
  #5   Spotlight this post!  
Unread 21-02-2006, 12:28
Ryan O's Avatar
Ryan O Ryan O is offline
FRC Eclipse Plug-in Developer
no team (FRC Eclipse)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Plaistow
Posts: 111
Ryan O is an unknown quantity at this point
Send a message via AIM to Ryan O
Re: CMUCam2 not tracking

I am ahving the same problem. THe camera was tracking w/ the new board and such, but once we wired it and the gear tooth sensor w/ interrupt for th ggear sensor it did what you just said- gives a red light of lock when the robot turns on- all hat it does before this is center. Any help would be greatly apreciated, since alot depends on this camera.
  #6   Spotlight this post!  
Unread 23-02-2006, 12:03
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: CMUCam2 not tracking

i had this problem at a pratice compition i tried everything and couldn't make it work. I pluged the camera into my computer and when i used labviewall the camera returned was a purple screen with three small blobs. I contacted IFI and they said they would repair or repalce it because it was defetive. You shoud try connecting it to labview just to check.
  #7   Spotlight this post!  
Unread 23-02-2006, 12:41
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: CMUCam2 not tracking

If you load the proper camera configuration file, a purple screen with bluish blobs is exactly what you should see in LabView. It's trying to present the YCrCb data as if it were RGB, so the colors come out completely wonky. Purple represents pretty much everything below a certain brightness, and blue represents light sources. The green vision target light is one particular shade of blue, apparently indistinguishable from the others on the LabView display but easily detected by the camera itself.
  #8   Spotlight this post!  
Unread 25-02-2006, 00:31
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: CMUCam2 not tracking

when it show the screen i described i had not loaded any config. i was using the grab frame not tracking data view. every other time i hav edone this the camera would show a picture of the room.
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
CMUcam2 Serial Port Diagnostics Kevin Watson Programming 13 18-02-2006 15:05
Moving robot while tracking with camera questions... Steve Orr Programming 6 02-02-2006 22:24
Problems tracking with CMUCam2 in LabVIEW PhilBot LabView and Data Acquisition 5 17-01-2006 20:42
CMUcam2 disclaimer Cody Carey General Forum 4 12-01-2006 01:19
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 20:57.

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