Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   What information can we access from the camera? (http://www.chiefdelphi.com/forums/showthread.php?t=41240)

viewtyjoe 24-01-2006 15:41

Re: What information can we access from the camera?
 
We've calibrated our camera tilt angle based on where it is parallel to the frame, and we've been seeing fairly accurate results (less than 5 inches error) with the target at heights a little less than 20 inches short of where it will be. The problem was that the servo's neutral position was slightly below the horizontal.
So just make sure that the values you use in calculating tilt angle are valid.

Graham Donaldson 31-01-2006 20:14

Re: What information can we access from the camera?
 
Does anyone know the degree of error the camera's program/servo will accept? We were testing pan today, and we determined that (from 14 feet) it had a margin of error of approximately 2.5 degrees. Can anyone confirm this or contradict it, and, do you know of the degree of error is the same for tilt? Thanks.

Kevin Watson 31-01-2006 22:58

Re: What information can we access from the camera?
 
Quote:

Originally Posted by robotcanuck1676
Does anyone know the degree of error the camera's program/servo will accept? We were testing pan today, and we determined that (from 14 feet) it had a margin of error of approximately 2.5 degrees. Can anyone confirm this or contradict it, and, do you know of the degree of error is the same for tilt? Thanks.

Is this a fixed error, meaning it is always off by 2.5 degrees across the pan range? Or do you mean you took a bunch of samples and found the error to be +/- 2.5 degrees? In general, your maximum error should be around one half of a PWM step, and given that one PWM step swings the camera ~1/2 of a degree, I'd expect that you'd be able to do better than one degree. This was also discussed in this thread.

-Kevin

Steve Orr 31-01-2006 23:06

Re: What information can we access from the camera?
 
Quote:

Originally Posted by Kevin Watson
Is this a fixed error, meaning it is always off by 2.5 degrees across the pan range? Or do you mean you took a bunch of samples and found the error to be +/- 2.5 degrees? In general, your maximum error should be around one half of a PWM step, and given that one PWM step swings the camera ~1/2 of a degree, I'd expect that you'd be able to do better than one degree. This was also discussed in this thread.

-Kevin


If you are using the common six wheel drive then the robot will tilt differently depending whether it is on the back four wheels or the front four wheels (given that the center wheels are slightly lowered). Could this be providing extra error on the tilt?

something to think about, but it shouldn't effect the pan angle...

Alan Anderson 01-02-2006 07:27

Re: What information can we access from the camera?
 
Quote:

Originally Posted by robotcanuck1676
Does anyone know the degree of error the camera's program/servo will accept? We were testing pan today, and we determined that (from 14 feet) it had a margin of error of approximately 2.5 degrees. Can anyone confirm this or contradict it, and, do you know of the degree of error is the same for tilt? Thanks.

Once the camera has centered itself on the target, it won't move until the target gets sufficiently far from the center of its view. I think the default number of pixels in the "deadband" ends up equivalent to a little more than one degree either side of center. I don't have a copy of the camera code handy, so I can't quote the actual #define for you.

You might try reducing the size of the "deadband", or you could read the mx and my values from the camera to tell you how far off-center the target actually is.

kevinw 01-02-2006 10:00

Re: What information can we access from the camera?
 
Quote:

Originally Posted by Alan Anderson
Once the camera has centered itself on the target, it won't move until the target gets sufficiently far from the center of its view. I think the default number of pixels in the "deadband" ends up equivalent to a little more than one degree either side of center. I don't have a copy of the camera code handy, so I can't quote the actual #define for you.

You might try reducing the size of the "deadband", or you could read the mx and my values from the camera to tell you how far off-center the target actually is.

Does anyone know how many pixels the camera code uses when calculating the pixel error? I believe the image is down sampled - but I can't find how much.

Thanks.

Kevin Watson 01-02-2006 10:46

Re: What information can we access from the camera?
 
Quote:

Originally Posted by Alan Anderson
Once the camera has centered itself on the target, it won't move until the target gets sufficiently far from the center of its view. I think the default number of pixels in the "deadband" ends up equivalent to a little more than one degree either side of center. I don't have a copy of the camera code handy, so I can't quote the actual #define for you.

Here's the relevant code from tracking.h:
Code:

// These values define how much error, in pixels, is
// allowable when trying to keep the center of the tracked
// object on the center pixel of the camera's imager. Too
// high a value and your pointing accuracy will suffer, too
// low and your camera may oscillate because the servos
// don't have enough pointing resolution to get the center
// of the tracked object into the square/rectangle defined
// by these values
#define PAN_ALLOWABLE_ERROR_DEFAULT 6
#define TILT_ALLOWABLE_ERROR_DEFAULT 6
 
 

If you're using the bells and whistles version, the values can also be changed via the tracking menu.

Quote:

Originally Posted by Alan Anderson
You might try reducing the size of the "deadband", or you could read the mx and my values from the camera to tell you how far off-center the target actually is.

There is example code in terminal.c that shows how to calculate the pointing error. If you're using the bells and whistles code, use this instead:
Code:

int Pan_Error;
int Tilt_Error;
 
Pan_Error=(int)T_Packet_Data.mx-(int)Tracking_Config_Data.Pan_Target_Pixel);
Tilt_Error=(int)T_Packet_Data.my-(int)Tracking_Config_Data.Tilt_Target_Pixel);

-Kevin

Graham Donaldson 01-02-2006 11:24

Re: What information can we access from the camera?
 
Quote:

Originally Posted by Alan Anderson
Once the camera has centered itself on the target, it won't move until the target gets sufficiently far from the center of its view. I think the default number of pixels in the "deadband" ends up equivalent to a little more than one degree either side of center. I don't have a copy of the camera code handy, so I can't quote the actual #define for you.

You might try reducing the size of the "deadband", or you could read the mx and my values from the camera to tell you how far off-center the target actually is.

What we were doing is we had the camera set up on a protractor. Whenever we turned it, the camera would adjust, but you had to adjust it more than 2.5 degrees. We found that to be the minimum it could turn w/o adjusting. I think what you said, Alan, is true. I'm not on programming (I&T), but I'll talk to our programmers to see if they can reduce the size of the "deadband".

Also, if you (theoretically, as I'm not on programming and not sure how it works) make the size of the space that the program looks to fill bigger, then would it be more accurate? So it has to fill more and therefore moves more often to keep it full? I don't know if this will work; again, I have no idea how the program operates. That's why I'm on IT: I tell them what to do, and they do it. WAY too confusing for me.

Anyways,thanks for your help with this.


All times are GMT -5. The time now is 00:11.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi