Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Camera Help (New to Camera Programming) (http://www.chiefdelphi.com/forums/showthread.php?t=41749)

Idaman323 13-01-2006 02:22

Camera Help (New to Camera Programming)
 
Im kinda new to the Camera programming aspect (last year, our rookie year, we had only 2 weeks to build and ship our robot due to delays. So I could not messa round with it last year)

Okay.. So I have the "bells and whistles" code that I got from Kevin, (Thanks Kevin :) ) and I have the camera mounted on the front of the robot. We have a side to side movement and up and down movement to our gun. But how do you get these two things to work together. Once the camera finds the green light. How would you get the gun to point in that area also. Where would the code for this go?

I have kind of searched around with no luck.. Does the code from Kevin already have that in the code. Or is it just the code to find the light with the camera.

Hmm.. I just need a few things straightend out :)

Thanks
Idaman323

Goldeye 13-01-2006 02:55

Re: Camera Help (New to Camera Programming)
 
Break it into two tasks.
1. Use the camera to figure out where to point your gun by doing calculations on the data it gives you.
2. Point the gun to a given location.
That is, worry about how to move the gun seperate from how to read from the camera, and then get the two understanding each other after the fact.

VideoMan053 13-01-2006 07:16

Re: Camera Help (New to Camera Programming)
 
Also, if there is space/time...why don't you try mounting the camera to the actual gun itself and then change the pan and tilt motors of the camera to coorespond to the side to side movement of the robot and the up and down movement of the gun?


That shouldn't be too hard to fix...however, i haven't actually looked at the code myself yet, but it should be a matter of switching two variable names around...when i find them, i'll let you know.

Idaman323 13-01-2006 12:37

Re: Camera Help (New to Camera Programming)
 
WE have also thought about doing that. Youll have to first find the target with the gun, then change the angle of the gun.

I think it might be a little quicker to use the camera mount they gave us.

And where would you put this equation that the camera gives you?

VideoMan053 13-01-2006 16:37

Re: Camera Help (New to Camera Programming)
 
Like I said, I haven't actually looked at our camera code yet...I've been trying to get our website online, but I'll def look at it tonight and see what I can do for you.

Idaman323 14-01-2006 02:22

Re: Camera Help (New to Camera Programming)
 
Any Updates?

Joe Hershberger 14-01-2006 03:56

Re: Camera Help (New to Camera Programming)
 
Quote:

Originally Posted by Idaman323
WE have also thought about doing that. Youll have to first find the target with the gun, then change the angle of the gun.

I think it might be a little quicker to use the camera mount they gave us.

And where would you put this equation that the camera gives you?

If you look at the streamlined camera code that Kevin wrote, you should find the constants you need to modify in tracking.h. You can change how the tracking actually does work by editing tracking.c, but the configuration options for it as it is are all in the header file.

Good luck!
-Joe


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

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