![]() |
Camera stops working when we use camera_set_servos()...
Ok so we're trying to make our camera pan back and forth until it sees the vision tetra, then lock and track. However it appears that whenever we call camera_set_servos() it stops searching for a color, and when we tell it to look for a color ( camera_find_color() ) it then appears to recenter the servos; we're stuck. Is there any solution to our problem?
This code block is inside Camera_Processing(), before it's own tracking routine. Code:
if(!tracking) |
Re: Camera stops working when we use camera_set_servos()...
After you set the servos, you have to tell the camera to track again.
|
Re: Camera stops working when we use camera_set_servos()...
I have the same problem. Today I am going to try an idea proposed somewhere around here to use a left, right, and center position and spend a few seconds at each. I dont know if it will work, and assuming that the conclusion you came to (that resetting the camera centers the servos) it wont work, but its worth a try.
|
Re: Camera stops working when we use camera_set_servos()...
Quote:
|
Re: Camera stops working when we use camera_set_servos()...
Has anyone tried using camera_set_servos() without stopping the camera or auto servos or any of that? I know it says you can't do anything other than camera_track_update() after camera_find_color(), but has anyone tried it anyway?
|
Re: Camera stops working when we use camera_set_servos()...
It works, but it calls camera_stop() in camera_set_servos(), which interestingly enough makes it stop..everything, color tracking included. Without camera_stop() it jsut seizes up the camera.
|
Re: Camera stops working when we use camera_set_servos()...
Quote:
just an idea, but..... what if: 1)you took the pwm out on the camera, and connected that to the pwn in on the robot controller. 2)connected a pwm out from the robot controller to the servos on thecamera mount. now all you need to do is decide on the software level when you want to track and when you want to keep panning. Code:
if (!tracking) //if the caera isn't trying to track - panCode:
else if (tracking) //if the camera is trying to track, give the servos it's values.just my 0.02 NIS (New Israeli Shekel) :) -Leav |
Re: Camera stops working when we use camera_set_servos()...
Well as far as I am informed, the cameras servos must remain connected to the camera and the camera only, so that's out...Any other ideas?
|
Re: Camera stops working when we use camera_set_servos()...
says who? :)
is this in the rules or something? if it is, sounds like a rule meant to make it harder on us.... i'll go look this up now.... |
Re: Camera stops working when we use camera_set_servos()...
ID: 1183 Section: 5.3 Status: Answered Date Answered: 1/17/2005
Q: May we connect servos to the PWM outputs on the CMUcam to take advantage of the automatic pan and tilt control that it provides A: Yes. Servos connected to the camera module are considered part of the camera module and can only be connected to it. That "only," makes it sound like no. :( |
Re: Camera stops working when we use camera_set_servos()...
So... no one has figured out how to make the camera pan back and forth to look for a color? :(
I'm working on the problem myself, without much success. >.< If I figure anything out, I'll let ya know, but... right now it looks like we'll just be turning the whole robot back and forth if the tetra isn't in the camera's field of vision. : :o |
Re: Camera stops working when we use camera_set_servos()...
Quote:
NOPE! check out question 1480: Q: Is it illegal to use the RC to control servos that control the camera? A: No. |
Re: Camera stops working when we use camera_set_servos()...
What I have been trying to do just now is something that was proposed elsewhere... foget who suggested it, but the point is this is not my own idea. But basically you plug the camera servos into the RC then set auto servos on the camera, then on the RC you check the supposed servo postions and then set the servos to those positions using the pwm outputs. It should work, but there is something wrong with my compiler. Or maybe my program. Something is wrong.
|
Re: Camera stops working when we use camera_set_servos()...
We're having the same trouble. If we plugged the pan/tilt into the RC wouldn't that make the camera_auto_servo not work?
|
Re: Camera stops working when we use camera_set_servos()...
I dont think so. My guess is that the autoservo function just sets the servo ports to the values it wants the servos at, and doesnt actually check to see that the servos are functioning. Then when you retrieve data from the camera it will tell you the positions the servos should be in, then you use that info to put them into those positions. It seems workable to me.
|
| All times are GMT -5. The time now is 01:12. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi