Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Camera problems(c++) (http://www.chiefdelphi.com/forums/showthread.php?t=73406)

Yuan Xue Lim 01-02-2009 15:33

Camera problems(c++)
 
Hi I'm a programmer from team#3017
We had recently set up the camera for autonomous period.
The servos are working fine(although the horizontal servo is sorta lagging)
When it saw the target, it moved vertically up instead of following it and lost the target.
Can I please get a help ASAP because i got a deadline by tomorrow? :ahh:

Maxpower57 01-02-2009 15:37

Re: Camera problems(c++)
 
few questions:
Are you running one of the demo programs?
Have you updated WPILib to version 3? (released on the 27th)
Have You updated the cRIO to version 11? (also on the 27th)

Yuan Xue Lim 01-02-2009 15:46

Re: Camera problems(c++)
 
Yes I did all them.
All i changed is the pwm servos in the program

Maxpower57 01-02-2009 15:49

Re: Camera problems(c++)
 
is this the 2 color tracking program or the vision demo?

Yuan Xue Lim 01-02-2009 15:52

Re: Camera problems(c++)
 
Quote:

Originally Posted by Maxpower57 (Post 812311)
is this the 2 color tracking program or the vision demo?

I used the example project provided in the windriver.
is call the twocolordemo

Maxpower57 01-02-2009 16:03

Re: Camera problems(c++)
 
Im not familiar with that code, sorry.
I'd add some printf's and see if you can find why the servos are moving when they do.
did you transplant this code from the demo into your code? cause if you did, i'd make sure to destroy the environment and make sure nothing else is affecting the servos.

Yuan Xue Lim 01-02-2009 16:06

Re: Camera problems(c++)
 
hmm ok
I'll see what i can do to deal with the problem.
Thanks for helping

Eric24 01-02-2009 17:41

Re: Camera problems(c++)
 
I had a similar issue with the code myself and I just found a way around it today. The problem lies within the value of verticalPosition. I discovered that it never gets assigned a value so I made my own variable to use in place of it and that seemed to solve my problem. Good luck, and just let me know if you have any other questions.

wt200999 01-02-2009 18:40

Re: Camera problems(c++)
 
try this:

change
Code:

// you may need to reverse this based on your vertical servo installation
                                //incrementV = verticalPosition - verticalDestination;
                                incrementV = verticalDestination - verticalPosition;

to

Code:

// you may need to reverse this based on your vertical servo installation
                                incrementV = verticalPosition - verticalDestination;
                                //incrementV = verticalDestination - verticalPosition;


Yuan Xue Lim 01-02-2009 19:47

Re: Camera problems(c++)
 
I will add those into my checklist
Also how can i decrease the lagging of horizontal servo during the searching period?
by lowering the framrate or the pixel?

Eric24 01-02-2009 20:12

Re: Camera problems(c++)
 
Try changing the resolution from 320x240 to 160x120, that seemed to speed things up for us.

Yuan Xue Lim 01-02-2009 21:38

Re: Camera problems(c++)
 
ic
i'll giv the result by tmr
thx for the help

Yuan Xue Lim 04-02-2009 16:56

Re: Camera problems(c++)
 
we didnt really get it working
wat v do is disable the vertical position


All times are GMT -5. The time now is 02:22.

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