Go to Post Many of us are engineers who value precision and accuracy in communication. Words mean things. - Alan Anderson [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 24-01-2006, 07:44
AL_E AL_E is offline
Registered User
AKA: Al Evangelista
None #0703 (Phoenix)
Team Role: Coach
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Saginaw, MI
Posts: 5
AL_E is an unknown quantity at this point
camera auto mode pwm contention?

Team, We are using Kevin's 'bells and whistles' code. It works great in RC mode, we are able to acquire and track the target at a distance using the default settings. We have defined the pan and tilt servos to be pwm08 and pwm09 respectively. When tracking in RC mode we display the pan servo value and it shows expected readings, changing as the camera pan angle changes.

When we try to use the camera in autonomous mode the pan servo seems to be getting conflicting commands. It shudders and does not move normally. When we display the pwm08 value it shows as zero. We are only using the following 3 functions within the autonomous mode loop, at the position indicated by the "add your autonomous code here" comment.

Tracking_Info_Terminal();
Camera_Handler();
Servo_Track();

When we display the pwm08 value via printf it shows as zero.

The pwm outputs for pan and tilt are commanded from the Servo_Track function, called from Camera_Handler and should remain set while in autonomous mode, correct? Am I missing something obvious? Naturally, we were able to command pwm outputs in autonomous mode in the past.

Thanks in advance for your help.

-Al
  #2   Spotlight this post!  
Unread 24-01-2006, 10:03
Duffield's Avatar
Duffield Duffield is offline
Programmer
AKA: A.J.
FLL #1254 (Entropy)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Van Burean Tech Center
Posts: 7
Duffield is an unknown quantity at this point
Send a message via AIM to Duffield Send a message via Yahoo to Duffield
Thumbs up Re: camera auto mode pwm contention?

Thank you for posting that message it will help our team out a great deal. We have been pondering over this subject for a long time.
Thank you again
  #3   Spotlight this post!  
Unread 24-01-2006, 15:52
viewtyjoe viewtyjoe is offline
Code Monkey
AKA: Nathaniel Davis
no team
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: West Chester
Posts: 14
viewtyjoe is an unknown quantity at this point
Send a message via AIM to viewtyjoe
Lightbulb Re: camera auto mode pwm contention?

I'm going to assume that you are using a dongle to attach to the competition port on the OI and that everything's connected right. The only other problem I can think of is that you might be sending too many requests to the RC's serial port and that's causing some issues for you. Other than that, I can't see any reason why your code wouldn't work. I haven't tried to get the camera to function in Autonomous Mode myself yet, so I'm not sure if that's the only possible problem.
  #4   Spotlight this post!  
Unread 24-01-2006, 17:59
AL_E AL_E is offline
Registered User
AKA: Al Evangelista
None #0703 (Phoenix)
Team Role: Coach
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Saginaw, MI
Posts: 5
AL_E is an unknown quantity at this point
Re: camera auto mode pwm contention?

Thanks for the replies -

Yes, we are using a dongle and momentary switch to activate autonomous mode. It has worked in other cases.

In essence all that we are trying to do is to capture the commanded PWM output of the pan servo to make some decisions on the relative position of the target - nothing fancy - but when we attempt to inquire the value of the pan PWM the value shows zero. Also when in auto mode the pan servo seems to be getting conflicting commands, the pan attempts to track but is rapidly reset. Based on my understanding of auto mode we are simply in the "while autonomous mode" loop with little outside interaction... will be at it again this evening - will post findings.

-Al
  #5   Spotlight this post!  
Unread 24-01-2006, 22:10
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 auto mode pwm contention?

It sounds very much like something else is setting that pwm output. I'd look closely at the code to make sure that's not happening. And if you're trying to print the pwm value on the terminal, remember to cast it as an (int) when you pass it to printf().
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
How To Use the Google Camera generalbrando Kit & Additional Hardware 2 07-02-2006 16:00
Using camera PWM out Cuog Programming 2 28-11-2005 14:17
Did you use Auto Servo Mode? Greg Marra Programming 8 27-04-2005 15:35
Trying to import Camera code into program without. Kingofl337 Programming 1 18-02-2005 00:43
Pins to insert into PWM Header on Camera Sscamatt Programming 1 29-01-2005 02:06


All times are GMT -5. The time now is 01:05.

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