Go to Post Sadly this bot uses better punctuation and capitalization than many on this site. - Andrew Schreiber [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 01-02-2007, 21:40
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
AAH I'm spazzing out because I can't get our camera to do anything!!!

Sorry about the general thread title; it's meant as a joke--that's one of the questions in Kevin's FAQ.

But this one's different. I've got a bit of a puzzle here.

I use Kevin Watson's default camera code, and it works like a charm. I use my modified code, and it...doesn't. It "error 131"s over and over again.

I spliced an RS232 connector onto a PWM cable to test my TTL converter, camera, and cables in between. All of my hardware works great. I receive "CR>" and some odd character in my terminal window when connected from the TTL converter out to my com port. I get the same thing on the very end of the PWM cable I had plugged into the camera. I can talk to the camera through this port too, but only if I switch TX and RX. I'm too brain-fried to think that through; don't read too much into it because I could be wrong. The camera responds like I think it should.

My code is receiving the bytes I send it. I put a simple printf of the byte count every loop and saw it change when I sent it bytes.

Kevin's serial port diagnostics indicate that communication from and to the computer and from and to the camera are all good.

I am not getting any bytes back from the camera itself, however. My byte counter never lifts off 0.

I would post my code, but I have some confidential stuff in there--I'd have to strip it to make it neutral before I post it.

So, any ideas? Do you really need to see my code (I think you probably will ask for this, I'll post it tomorrow if you do)?

Thank you so much.

JBot
__________________
Aren't signatures a bit outdated?
  #2   Spotlight this post!  
Unread 02-02-2007, 16:21
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Figured this out myself today. The serial_ports.h by default has the TTL port set at 9600 baud; the camera expects 115200. I haven't tested with the robot yet, but I'm sure this is my problem.

Thanks, Kevin Watson's FAQ!

JBot
__________________
Aren't signatures a bit outdated?

Last edited by JBotAlan : 02-02-2007 at 16:25. Reason: wrong baud rate
  #3   Spotlight this post!  
Unread 06-02-2007, 22:29
1594code 1594code is offline
Registered User
FRC #1594
 
Join Date: Feb 2006
Location: New York
Posts: 16
1594code is an unknown quantity at this point
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Your quote from Kevin's website hit close to home! Our team really can't get the camera to do anything! It doesn't lock onto the target...

We've been using Kevin Watson's Bells and Whistles code (though I also tested the Streamlined code). We have the pan/tilt servos connected to PWM01 and PWM02. We have the power connected to another PWM output, and we have the TTL cable connected between CMUCam and RC. We see the output "searching... searching... searching..." We've read Kevin's FAQ (#3) on this symptom, but we didn't modify his camera settings or calibrate; we don't think that's the problem. We tried increasing the search delay by one, as Kevin suggests (FAQ #14). We have our camera mounted such that the lens is in the bottom half of the camera.

Does anyone have any ideas? Did you do any configuration to the camera or the code to get things working? We've learned a lot in the process of all our debugging, but we haven't gotten beyond "searching... searching... searching..."

Thanks for any suggestions you may have to offer!
  #4   Spotlight this post!  
Unread 06-02-2007, 23:43
gnirts gnirts is offline
Suspicious pointer conversion
AKA: Robinson Levin
FRC #1648 (The Gearbox Gangstaz)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: ATL
Posts: 116
gnirts will become famous soon enough
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Quote:
Originally Posted by 1594code View Post
We've learned a lot in the process of all our debugging, but we haven't gotten beyond "searching... searching... searching..."
Does the camera actually search for the light, i.e. do the servos move? Or does it just print "Searching..."?

Also, does the red LED on the camera light up when you put the green target light in front of it?

Good luck,
Robinson
  #5   Spotlight this post!  
Unread 08-02-2007, 19:30
1594code 1594code is offline
Registered User
FRC #1594
 
Join Date: Feb 2006
Location: New York
Posts: 16
1594code is an unknown quantity at this point
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Yes, the pan and tilt servoes have worked all along-- I forgot to mention that in my earlier post.

The camera's red light blinks constantly as the camera searches... but it does seem to be on when the green lightbox is in the camera's field of view.

New development today: the camera reported pan angle, tilt angle, blob size, confidence for the instant that the light box is in the camera's field of view. Then, it changes direction and keeps searching. This sounds like Kevin's FAQ #9, but our camera power switch is on the bottom. I tried switching the signs on the PAN_ROTATION_SIGN_DEFAULT and the TILT_ROTATION_SIGN_DEFAULT. I also slowed increased SEARCH_DELAY_DEFAULT by one.

If anyone has any other suggestions, I'd be grateful to have them!
  #6   Spotlight this post!  
Unread 08-02-2007, 20:12
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Quote:
Originally Posted by 1594code View Post
Yes, the pan and tilt servoes have worked all along-- I forgot to mention that in my earlier post.

The camera's red light blinks constantly as the camera searches... but it does seem to be on when the green lightbox is in the camera's field of view.

New development today: the camera reported pan angle, tilt angle, blob size, confidence for the instant that the light box is in the camera's field of view. Then, it changes direction and keeps searching. This sounds like Kevin's FAQ #9, but our camera power switch is on the bottom. I tried switching the signs on the PAN_ROTATION_SIGN_DEFAULT and the TILT_ROTATION_SIGN_DEFAULT. I also slowed increased SEARCH_DELAY_DEFAULT by one.

If anyone has any other suggestions, I'd be grateful to have them!
I've seen this wacky behavior when the light isn't getting enough power; the camera will find the light and start to track, but after a second or so, the camera will start a new search. Use a freshly charged robot battery to power the light (not some ~12 volt wall-wart left over from a toy your little brother destroyed long ago). Also consider modifying the search algorithm to better meet your needs.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #7   Spotlight this post!  
Unread 09-02-2007, 22:58
1594code 1594code is offline
Registered User
FRC #1594
 
Join Date: Feb 2006
Location: New York
Posts: 16
1594code is an unknown quantity at this point
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Hey! We're tracking now! Thanks, gnirts and Kevin!

Wiring the green light box to a freshly charged 12 Volt battery definitely helped!

In the end, I kept TILT_ROTATION_SIGN_DEFAULT and PAN_ROTATION_SIGN_DEFAULT the same, and I kept the SEARCH_DELAY_DEFAULT.

It looks like the red LED blinks even when the green target is not in view, but tracking works...
  #8   Spotlight this post!  
Unread 10-02-2007, 16:22
Ianuser Ianuser is offline
Registered User
FRC #0570
 
Join Date: Feb 2007
Location: new york
Posts: 64
Ianuser is an unknown quantity at this point
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Hi, I'm having a problem that would occur earlier than the problem you just had. I can't get the servos on my camera to function at all. They moved for a second the first time I plugged it into the RC and a green light (i think it was green) came on. Then I downloaded the most recent version of my code and forever more the camera would not turn on. My servos are mapped to PAN_SERVO pwm06 and TILT_SERVO pwm07, and in the default routine() I commented out the joystick mappings for those servos. I also commented those servos out in the User_Initialization() when the pwm's are all set to 127. So, Why is my camera not working? (I read somwhere that it has to be mounted upside down? With the camera and the power button on the bottom of the tilt? That shouldn't affect this though.)
  #9   Spotlight this post!  
Unread 10-02-2007, 19:14
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Quote:
Originally Posted by Kevin Watson View Post
I've seen this wacky behavior when the light isn't getting enough power; the camera will find the light and start to track, but after a second or so, the camera will start a new search. Use a freshly charged robot battery to power the light (not some ~12 volt wall-wart left over from a toy your little brother destroyed long ago). Also consider modifying the search algorithm to better meet your needs.

-Kevin
Not to threadjack, but just out of curiosity, will the power supplied from a digital/analog input (supposed to be 5 volts) be sufficient to reliably power the camera? I have been using it, and maybe 1 out of 20 power-ups the initialization fails and I have to power-cycle, but you say 12 volts; I can have our electrical team wire another circuit breaker and run 12v out to the camera if you think it would be better.

Just wanted someone else's opinion...

JBot
__________________
Aren't signatures a bit outdated?
  #10   Spotlight this post!  
Unread 10-02-2007, 19:27
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Quote:
Originally Posted by JBotAlan View Post
Not to threadjack, but just out of curiosity, will the power supplied from a digital/analog input (supposed to be 5 volts) be sufficient to reliably power the camera? I have been using it, and maybe 1 out of 20 power-ups the initialization fails and I have to power-cycle, but you say 12 volts; I can have our electrical team wire another circuit breaker and run 12v out to the camera if you think it would be better.

Just wanted someone else's opinion...

JBot
He is talking about using 12V to power the target light, not the camera. You should use 7.2V to power the camera, which you can pull from a PWM port. I wrote about this issue at length here.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #11   Spotlight this post!  
Unread 10-02-2007, 22:01
nzj1's Avatar
nzj1 nzj1 is offline
Registered User
#0547 (F.E.A.R.)
 
Join Date: Jan 2003
Location: fayetteville, tennessee
Posts: 20
nzj1 is an unknown quantity at this point
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

We're having problems with our camera also. The story is that the camera worked, then it didn't. While the robot was being driven for practice it started working again and worked well. To our dismay, it stoped working again. We (not me, I'm not our tech person) have done all the troubleshooting that we can think of. I'm thinking it might be some kind of firmware issue although I'm told that it probably isn't. Oh... By the way... this is our third camera for the third year running that has, to the best of our knowledge, been hosed. Luckly We've not needed it untill this year, depending on how you judge luck. We're in desperate need of help and would be eternally grateful.
__________________
2001 VCU Rookie All Star
2001 National Rookie All Star
2002 KSC Delphi Driving Tomorrows Technolgy
2002 Newton Quarter Finalist
2003 St. Louis GM Industrial Design
2003 Archimedes Finalist (47, 201, 547)
2004 St. Louis Chairman's Award
2005 Gret Lakes Judges Award
2006 St. Louis Winner (547, 71, 537)
  #12   Spotlight this post!  
Unread 10-02-2007, 22:21
1594code 1594code is offline
Registered User
FRC #1594
 
Join Date: Feb 2006
Location: New York
Posts: 16
1594code is an unknown quantity at this point
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Quote:
Originally Posted by Ianuser View Post
Hi, I'm having a problem that would occur earlier than the problem you just had. I can't get the servos on my camera to function at all. They moved for a second the first time I plugged it into the RC and a green light (i think it was green) came on. Then I downloaded the most recent version of my code and forever more the camera would not turn on. My servos are mapped to PAN_SERVO pwm06 and TILT_SERVO pwm07, and in the default routine() I commented out the joystick mappings for those servos. I also commented those servos out in the User_Initialization() when the pwm's are all set to 127. So, Why is my camera not working? (I read somwhere that it has to be mounted upside down? With the camera and the power button on the bottom of the tilt? That shouldn't affect this though.)
The servos should drive the camera frame to scan its field of view even when the green light is not on. Hm... Does your Process_Data_from_Master() function still call Camera_Handler() and Servo_Track()?

Also, do you have your joysticks plugged in as you test the camera? The default routine makes calls to the joysticks, even if you're not planning to drive while testing the camera.

I don't think you need to comment out any pwm initialization code in User_Initialization(), as the Main() function only calls User_Initialization() once.
  #13   Spotlight this post!  
Unread 11-02-2007, 00:29
Guru's Avatar
Guru Guru is offline
Executive Programmer
FRC #0912 (Iron Lyons)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Etobicoke (North York)
Posts: 12
Guru is an unknown quantity at this point
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Hey, I prefer banging my head on the wall to spazzing out, and I've been doing it all today... and yesterday... and the day before...
I'm not sure why, but the Kevin's camera project wont compile, error in streamlined version: plcxxx.h not found even though it should be auto included, and in bells version: stdio.h not found even though it should be auto included). The pre-compiled hex file works perfectly enough, so this might be a problem with our compiler... With only one week left it gets kind of frustrating, but the answer is here somewhere... somewhere...
__________________
\/\__Under Construction__/\/
  #14   Spotlight this post!  
Unread 11-02-2007, 13:26
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Quote:
Originally Posted by Guru View Post
Hey, I prefer banging my head on the wall to spazzing out, and I've been doing it all today... and yesterday... and the day before...
I'm not sure why, but the Kevin's camera project wont compile, error in streamlined version: plcxxx.h not found even though it should be auto included, and in bells version: stdio.h not found even though it should be auto included). The pre-compiled hex file works perfectly enough, so this might be a problem with our compiler... With only one week left it gets kind of frustrating, but the answer is here somewhere... somewhere...
Go to Projects -> Build Options... -> Project -> General tab. Make sure the last three paths are correct. Your paths may be different, but on my laptop, the include path is c:\mcc18\h, library is c:\mcc18\lib, and linker scripts is c:\mcc18\lkr.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #15   Spotlight this post!  
Unread 12-02-2007, 11:17
jdejoannis jdejoannis is offline
Registered User
FRC #1845
 
Join Date: Feb 2006
Location: Atlanta,GA
Posts: 48
jdejoannis will become famous soon enoughjdejoannis will become famous soon enough
Re: AAH I'm spazzing out because I can't get our camera to do anything!!!

Quote:
Originally Posted by nzj1 View Post
We're having problems with our camera also. The story is that the camera worked, then it didn't. While the robot was being driven for practice it started working again and worked well. To our dismay, it stoped working again. We (not me, I'm not our tech person) have done all the troubleshooting that we can think of. I'm thinking it might be some kind of firmware issue although I'm told that it probably isn't. Oh... By the way... this is our third camera for the third year running that has, to the best of our knowledge, been hosed. Luckly We've not needed it untill this year, depending on how you judge luck. We're in desperate need of help and would be eternally grateful.
We were perplexed a couple of times when our camera stopped, even though its lights were still on. Replacing the backup battery with a fresh one did the trick for us.

Jason
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
Camera Is Spazzing Out! BrittanyV Programming 15 04-02-2006 13:39
Camera fails to output anything on serial lines steven114 Electrical 10 18-01-2005 16:12
Why can't we get along? Sean_330 General Forum 23 19-03-2003 21:38
i'm in the charleston area, and i'm looking to help out a team near here... dickymon General Forum 2 05-08-2002 16:40
Can't WE all just get along? archiver 2000 0 23-06-2002 22:29


All times are GMT -5. The time now is 13:51.

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