|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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
|
|||||
|
|||||
|
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. |
|
#3
|
|||||
|
|||||
|
Re: Servos for the camera
How do we know the orientation of the camera then?
|
|
#4
|
|||||
|
|||||
|
Re: Servos for the camera
Quote:
|
|
#5
|
||||
|
||||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |