|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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? ![]() |
|
#2
|
||||
|
||||
|
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) |
|
#3
|
||||
|
||||
|
Re: Camera problems(c++)
Yes I did all them.
All i changed is the pwm servos in the program |
|
#4
|
||||
|
||||
|
Re: Camera problems(c++)
is this the 2 color tracking program or the vision demo?
|
|
#5
|
||||
|
||||
|
Re: Camera problems(c++)
I used the example project provided in the windriver.
is call the twocolordemo |
|
#6
|
||||
|
||||
|
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. |
|
#7
|
||||
|
||||
|
Re: Camera problems(c++)
hmm ok
I'll see what i can do to deal with the problem. Thanks for helping |
|
#8
|
||||
|
||||
|
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.
|
|
#9
|
||||
|
||||
|
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; Code:
// you may need to reverse this based on your vertical servo installation incrementV = verticalPosition - verticalDestination; //incrementV = verticalDestination - verticalPosition; |
|
#10
|
||||
|
||||
|
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? |
|
#11
|
||||
|
||||
|
Re: Camera problems(c++)
Try changing the resolution from 320x240 to 160x120, that seemed to speed things up for us.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Camera Problems!!! | spsteam1512 | Programming | 0 | 12-02-2007 13:45 |
| Camera Problems | CMB | Programming | 2 | 02-02-2007 18:24 |
| Camera Problems | 804_twidget1 | Electrical | 4 | 27-01-2007 11:28 |
| camera scope problems | xrabohrok | Programming | 4 | 15-01-2007 20:48 |
| Camera Problems | pickle | Programming | 21 | 20-01-2005 20:43 |