View Full Version : CmuCam problem
Our cmucam does not track the target. We got the code from kevin's site. download it to the rc. did everything. I searched before posting but couldnt find any answers. cam just stays there. The lights are green. what could be the problem?
Mark McLeod
17-01-2006, 17:28
Our cmucam does not track the target. We got the code from kevin's site. download it to the rc. did everything. I searched before posting but couldnt find any answers. cam just stays there. The lights are green. what could be the problem?
Servos are hooked up to pwm01 & 02?
Camera power is connected by PWM cable to an empty RC PWM output?
PWM cable is attached to the camera serial port and the RC via TTL converter?
Backup battery is connected to the RC and fully charged?
12v battery is hooked up to the RC and fully charged?
OI is tethered or linked by radio to the RC and powered?
Green power LED on the camera power is on?
Can you call up Kevin's tracking and camera menus?
Did you test separately with Labview?
railerobotics
17-01-2006, 17:32
We are having the exact same problem and we can access the camera and tracking menus but the terminal window never display's searching. We have a red and green light lit up on our camera.
when you say pwm 1,2. do you mean the robot controller. if yes. then yes the pwm are in 1 and 2. the power is also good. we checked in labview. it works fine there. but when we use the robot. it does not work. After uploading the code to rc nothing happens in the terminal window.
Can you call up Kevin's tracking and camera menus? sorry, dont what you mean. maybe this is the part im lost at.
railerobotics
17-01-2006, 19:16
To get the tracking menu you type "t" at the bottom of the terminal window.
To get the camera menu you type "c" at the bottom of the terminal window.
You'll probably have to reset the robot after you download the code. If you get no response in the terminal window try resetting the robot.
mallot1243
17-01-2006, 19:18
I'm assuming that you chose the pwm01 and 02 on the rc and not the jumpers on the camera itself. Also, the default code from Kevin's files are too large to fit in the EduBot Controller, is there a special file for using on the Edu or do I have to commit a hack job on the code to lighten it?
And whoever came up with the idea of only writing the LabView program for Windows 2001 SP1 or higher?
Kevin Watson
17-01-2006, 19:36
Also, the default code from Kevin's files are too large to fit in the EduBot Controller, is there a special file for using on the Edu or do I have to commit a hack job on the code to lighten it?The code was developed on a EDU-RC. What makes you think it won't fit?
-Kevin
mallot1243
17-01-2006, 19:38
My compiled version with other small tidbits of code was nearly 500Kb, when I exported it I used 0x800, would I have to change this?
Kevin Watson
17-01-2006, 19:43
My compiled version with other small tidbits of code was nearly 500Kb, when I exported it I used 0x800, would I have to change this?It it doesn't fit, the linker will tell you so. Look at the .map file, which will tell you how much memory (flash & SRAM) you've used.
-Kevin
Joe Hershberger
17-01-2006, 22:01
And whoever came up with the idea of only writing the LabView program for Windows 2001 SP1 or higher?
Windows 2001 SP1?
What?
-Joe
or yaniv
18-01-2006, 05:55
I have the same problem
Servos are hooked up to pwm01 & 02? yes
Camera power is connected by PWM cable to an empty RC PWM output?yes
PWM cable is attached to the camera serial port and the RC via TTL converter?yes
Backup battery is connected to the RC and fully charged?yes
12v battery is hooked up to the RC and fully charged?yes
OI is tethered or linked by radio to the RC and powered?yes
Green power LED on the camera power is on?yes
Can you call up Kevin's tracking and camera menus?yes
Did you test separately with Labview?yes
Or
Kevin Watson
18-01-2006, 11:27
I have the same problem...Download the code mentioned here (http://www.chiefdelphi.com/forums/showthread.php?t=41895) and report back with the results. This thread (http://www.chiefdelphi.com/forums/showthread.php?t=41884) may also help. Someone pointed out that they had a defective PWM cable. You might replace the PWM cable you're using for serial communications and see if it starts working.
-Kevin
Uberbots
18-01-2006, 23:33
hmm...
ok you are having the smae problem we did.
you have to calibrate your camera, because there is too much noise in your background that is affecting your stats.
the calibration manual (Here (http://www.usfirst.org/robotics/2006/visiondocs.htm)) Contains the information you need to calibrate.
also, make sure that you dont have the wrong axes flipped :) (read the cam manual if you dont know what i maen)
Servos are hooked up to pwm01 & 02? YES
Camera power is connected by PWM cable to an empty RC PWM output? YES
PWM cable is attached to the camera serial port and the RC via TTL converter? YES
Backup battery is connected to the RC and fully charged? YES
12v battery is hooked up to the RC and fully charged? YES
OI is tethered or linked by radio to the RC and powered?YES
Green power LED on the camera power is on? YES
Can you call up Kevin's tracking and camera menus? YES
Did you test separately with Labview?YES
everything is fine. But the servos dont move. even if you try to move them through the menu.
billbo911
19-01-2006, 15:31
Servos are hooked up to pwm01 & 02? YES
Camera power is connected by PWM cable to an empty RC PWM output? YES
PWM cable is attached to the camera serial port and the RC via TTL converter? YES
Backup battery is connected to the RC and fully charged? YES
12v battery is hooked up to the RC and fully charged? YES
OI is tethered or linked by radio to the RC and powered?YES
Green power LED on the camera power is on? YES
Can you call up Kevin's tracking and camera menus? YES
Did you test separately with Labview?YES
everything is fine. But the servos dont move. even if you try to move them through the menu.
This is just a shot in the dark. By any wild chance, are the lines in user_routines.c/Default_Routine that assign the joystick inputs to the PWM outputs not commented out?
If they are uncommented, then they are being processed after the camera code, and therefore, are overwriting the values set by the camera code.
During testing they should look like this.
//pwm01=p1_y;
//pwm02=p2_y;
or this
/*pwm01=p1_y;
pwm02=p2_y;*/
Kevin's code, without any modifications, doesn't actually call the Default_Routine function. It is commented out in the Process_Data_From_Master_uP function. Therefore, the PWM mappings never get called. If your version of user_routines.c is not from his camera code build, that may be what is happening.
try drawing your power from the digital out instead of the PWM out that fixed the problem for us with the camera not tracking
Joe Hershberger
20-01-2006, 03:26
try drawing your power from the digital out instead of the PWM out that fixed the problem for us with the camera not tracking
That's odd. The PWM out should supply 7.2V needed from the backup battery (which must be hooked up), where as the digital port should be only 5V, and not sufficient to overcome the drop in the voltage regulator on the camera. Also, the servos, if plugged into the camera, should require the 7.2V to operate as well. If they are plugged into the RC, then it should still be needed.
But I guess if it works...
-Joe
mallot1243
20-01-2006, 11:17
My bad, Windows 2000 Service Pack 1, I had to go buy Win XP yesterday.
Thanks for the help. we got the cam working. there was a problem with the backup battery. it would power the camera but the servos wouldnt move. after changing the battery it started to look for the target. As in other post the camera moved away from the target. switching the jumper fixed that. it works perfect. if you are haveing any problems try to change the battery. also change the jumper. so it doesnt run away from the target.
Mark McLeod
22-01-2006, 11:14
That's good news.
I've been away from CD for a few days visiting rookie teams, so I'm sorry about not responding with more ideas Zoom.
Thanks for the help. we got the cam working. there was a problem with the backup battery. it would power the camera but the servos wouldnt move. after changing the battery it started to look for the target. As in other post the camera moved away from the target. switching the jumper fixed that. it works perfect. if you are haveing any problems try to change the battery. also change the jumper. so it doesnt run away from the target.
What if our problem consists of putting a (I think) transformer in incorrectly and blocking it off from the air, accidentally melting it?
This did actually happen, but the camera still works (not quite as well) and we're getting some new parts.
BrittanyV
22-01-2006, 12:49
Hey-
Out team is having a horrible time with the camera- much like what everyone else is having in this thread. The only difference is sometimes the camera will search and sometimes it won't. We had the camera working at one point, but now it doesn't. We started from square one, but it still won't work. We're using the camera_s code, and we have calibrated the camera just as the instructions say. We noticed that the red light goes on when the camera sees the target in LabVIEW, but when we try to search with Kevin's code, it seems to be seeing the target all over.
If anyone can offer any help at all it would be much appreciated!
The yellowdart
22-01-2006, 15:13
pwm 1 and 2 are right on the camera board...on the top or bottom.....depending on the mounting of your camera
Safarley2901
22-01-2006, 15:21
Did you try changing the focus of your camera, ours works fine. But If its focussed wrong it wont track it at all.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.