Go to Post A well learned individual knows themselves and how to collect and use the tool of knowledge. - techhelpbb [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 28-02-2006, 22:40
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 688
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Camera not working in autonomous

Why oh why does my camera not work in autonomous mode? It tracks fine in manual mode, but when we switch over it drops dead in its tracks. We just uploaded Kevin's frc_camera_2.zip and shifted everything over, and added Kevin's changes (which wasn't that much) in our user_routines.c and user_routines_fast.c (the only two files we played with.) Any places we should be looking?

Thanks!

Roger.
  #2   Spotlight this post!  
Unread 28-02-2006, 23:09
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: Camera not working in autonomous

Make sure you're calling Camera_Handler() and Servo_Track() from within the autonomous loop. Put the function calls after the GetData() call.

Disclaimer: I don't have the code handy to check spelling. If you know what you're doing, you know what I mean.
  #3   Spotlight this post!  
Unread 28-02-2006, 23:10
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: Camera not working in autonomous

Try calling
Camera_Handler();
Servo_Track();
in your autonomous mode where u want it to track. I think that's all you need.

EDIT: Ah, looks like Alan beat me to it. Oh well .
__________________
www.sabrerobotics.com

Last edited by Denz : 28-02-2006 at 23:12.
  #4   Spotlight this post!  
Unread 01-03-2006, 07:43
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 688
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Re: Camera not working in autonomous

Ah! Could it be that simple? I guess I trusted Kevin's code too much; after all, the zip package was written with the camera in mind. I did see this answer in another post for a different problem after I posted the question, but it didn't work (for that post) and it was too late to test it here (insert sleepyhead smilie here).

Oh, and Denz, the early bird gets the worm, but the second mouse gets the cheese!

Thanks guys!

Roger.
  #5   Spotlight this post!  
Unread 06-03-2006, 17:05
lkdjm's Avatar
lkdjm lkdjm is offline
Registered User
AKA: David Mazza
FRC #0564 (Digital Impact)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Middle Island, NY
Posts: 31
lkdjm will become famous soon enough
Send a message via AIM to lkdjm Send a message via Yahoo to lkdjm
Re: Camera not working in autonomous

If this solved your problem, then great. The way Mark McLeod showed me how to do it was by copying everything that had to do with the camera initialization into a new file, make it its own function like camera_init(), and then calling it as the first thing in autonomous.
__________________
Longwood's Digital Impact

  #6   Spotlight this post!  
Unread 08-03-2006, 08:53
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 688
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Re: Camera not working in autonomous

It did work, at least when we tested it on our old robot from last year. We had little chance to really test it until we got to Manchester. It's neat watching that little camera track the light and the "turret" following the camera. It even caught one across the room in the pits and another that was halfway up in the seats. Now _that's_ tracking!

The issue now is the two of them don't agree which way "forward" is supposed to be. The camera is facing the light and the turret is about 30~40 degrees clockwise from that. (The camera mounting is squared off with the turret.) I'm wondering if it's a software calibration or (easier for me!) hardware adjustment. Any suggestions?

lkdjm (aka David Mazza), I notice you're from the same island I'm originally from; long ago I graduated from Herricks HS in New Hyde Park, a school that surprisingly doesn't have robotics. Small world. Good luck at Hofstra!

Roger.
  #7   Spotlight this post!  
Unread 08-03-2006, 10:22
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Camera not working in autonomous

Quote:
Originally Posted by Roger
The issue now is the two of them don't agree which way "forward" is supposed to be. The camera is facing the light and the turret is about 30~40 degrees clockwise from that. (The camera mounting is squared off with the turret.) I'm wondering if it's a software calibration or (easier for me!) hardware adjustment. Any suggestions?
It could be your servos are not be centered (127) in the camera gimbal. Did you center them before attaching the gimbal arms?
e.g., detach the servo horn, plug the servo into an unused PWM - normally kept at 127, then reattach the horn.

(I went to High School in Virginia myself, but my kids are all Yankees.)
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #8   Spotlight this post!  
Unread 08-03-2006, 11:42
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: Camera not working in autonomous

Mark's suggestion is a good one. There is an extra step for fine tuning. Use LabView to manually drive the servo positions until the camera is centered. Save those values in the camera EEPROM and in tracking.h as PAN_CENTER_PWM_DEFAULT and TILT_CENTER_PWM_DEFAULT. Then use the offset between PAN_CENTER_PWM_DEFAULT and 127 for the turret pan motor.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #9   Spotlight this post!  
Unread 08-03-2006, 19:21
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: Camera not working in autonomous

Quote:
Originally Posted by Keith Watson
Mark's suggestion is a good one. There is an extra step for fine tuning. Use LabView to manually drive the servo positions until the camera is centered. Save those values in the camera EEPROM and in tracking.h as PAN_CENTER_PWM_DEFAULT and TILT_CENTER_PWM_DEFAULT.
Though LabVIEW is a very cool tool, if you're using the "Bells and Whistles" camera code, you don't actually need to use it for this as this functionality is already built into the interactive PWM sub-menu that can be found within the main tracking menu.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #10   Spotlight this post!  
Unread 09-03-2006, 07:38
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 688
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Re: Camera not working in autonomous

I'm going to pass these suggestions on to the electronics and sensors division of our group, as these are more their line than programming. It felt like a calibration type solution. And we are using "Bells and Whistles", so it should be easy. (Even if I still can't find that command to ring the bell....) Thanks again!

Roger.

(Mark, My father worked at SMC in Hauppauge until he retired a while ago. Nice name, but I still can't spell it.)
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
our own allternative code for the cmu camera Gili Programming 16 17-02-2006 00:16
Camera in Autonomous tamirms Programming 2 19-02-2005 23:47
Autonomous With Camera schenkin Programming 20 16-02-2005 23:52
Autonomous Camera Integration GregC Programming 2 06-02-2005 14:34


All times are GMT -5. The time now is 21:09.

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