Go to Post I do this stuff because...well first inspired me to become me. I now understand who i am better and what i want to do. - Marygrace [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-2005, 16:07
MV_Hirsch MV_Hirsch is offline
Registered User
#1458
 
Join Date: Jan 2004
Location: Danville, ca
Posts: 5
MV_Hirsch is an unknown quantity at this point
Servos for the camera

Is there anything that you can call to figure out what the position of the servo is? What method would I call?
---Thankx
  #2   Spotlight this post!  
Unread 24-01-2005, 16:13
MikeDubreuil's Avatar
MikeDubreuil MikeDubreuil is offline
Carpe diem
FRC #0125 (Nu-Trons)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Boston, MA
Posts: 967
MikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond repute
Send a message via AIM to MikeDubreuil
Re: Servos for the camera

There isn't a function or method to tell you the position of a servo.

This is an overview of how the servo works:
The software tells the robot controller to send the servo a position (0-254). Then the servo will try with all it's might to get to and stay at that position. There is never any feedback to the robot controller from the servo.
__________________
"FIRST is like bling bling for the brain." - Woodie Flowers
  #3   Spotlight this post!  
Unread 24-01-2005, 16:28
phrontist's Avatar
phrontist phrontist is offline
Proto-Engineer
AKA: Bjorn Westergard
FRC #1418 (Vae Victus)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Falls Church, VA
Posts: 828
phrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond repute
Send a message via AIM to phrontist
Re: Servos for the camera

How do we know the orientation of the camera then?
__________________

University of Kentucky - Radio Free Lexington

"I would rather have a really big success or a really spectacular crash and failure then live out the warm eventual death of mediocrity" - Dean Kamen
  #4   Spotlight this post!  
Unread 24-01-2005, 16:31
Unsung FIRST Hero
Greg Marra Greg Marra is offline
[automate(a) for a in tasks_to_do]
FRC #5507 (Robotic Eagles)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2005
Location: San Francisco, CA
Posts: 2,031
Greg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond repute
Re: Servos for the camera

Quote:
Originally Posted by phrontist
How do we know the orientation of the camera then?
The camera is what is driving your servos, and it tells the RC where it thinks the servo is at. The actual variable used to relay this is described in the documentation for the camera. You can also find it in the source code of the default camera tracking code, particularly where it echoes the information back through the serial port by a printf.
  #5   Spotlight this post!  
Unread 24-01-2005, 16:35
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
Re: Servos for the camera

I'm assuming you have the servos hooked up directly to the camera and are using the tracking feedback loop in the camera. In the default code in user_camera.c : camera_track_update() the RC gets some data back from the camera. Among this data is the pan & tilt positions (cam.pan_servo & cam.tilt_servo) of the servos. The pan position is used in user_routines.c : Camera_Processing() to make the robot turn left / right, and with a few more lines of code you can make the robot drive forward / backward based on the tilt.
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
Scripting Setup and the Camera + Serial Port Drivers CJO Programming 22 11-01-2006 17:42
Camera not found!!! Code\\Pilot Programming 11 02-02-2005 00:04
Kevin Watson's Kick-off Demo Code! Mr. Lim Programming 27 22-01-2005 03:38
Game Field Camera Calibration Matthew_H Regional Competitions 2 15-01-2005 23:09
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 03:07.

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