Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Controlling Servos for Vision Targeting (http://www.chiefdelphi.com/forums/showthread.php?t=142730)

Elius_Linkus 28-01-2016 18:59

Controlling Servos for Vision Targeting
 
So, I've been working with the code from the FRC Examples on vision processing, and am currently trying to set up a servo-mounted camera to track the vision targets on the high goal. The camera identifies targets just fine, but I'm having trouble getting the pan/tilt module we have to follow the target around as it moves. Most of the things I've tried so far haven't yielded any useful results, anybody out there that's done this before have advice on how I can get this to work?

sraque 29-01-2016 07:05

Re: Controlling Servos for Vision Targeting
 
The update rate and processing lag are too large to do feedback control on an image target. You will need to use the image to figure out where to go, and then use other sensors to track how well you are getting there.

Search CD for Vision and Gyro or Vision and IMU and you will find some very active threads that will give you a good start on this.

Greg McKaskle 29-01-2016 10:08

Re: Controlling Servos for Vision Targeting
 
The default code and example code from 2009 did a gimbal'd camera. They used a very low image resolution and you really have to be careful to keep the vision loop running fast, but you can make it work. The examples were shipped in 2012 and maybe 2013. I can post them if necessary.

Comparing this to a gyro for closing the loop, the gyro is still an order of magnitude faster than well written vision code. So be sure to keep that in mind.

Greg McKaskle

iSpotix 29-01-2016 12:27

Re: Controlling Servos for Vision Targeting
 
Using GRIP to detect the targets and publish the centerX, I created a simple test program to basically say, if the target is too far to the right, move the camera to the right, and if the camera is too far to the left, move the camera to the left.

You just need to create a threshold say like 140-160 pixels for a 320x240 image to call the center.

rbellini 29-01-2016 14:39

Re: Controlling Servos for Vision Targeting
 
Quote:

Originally Posted by Greg McKaskle (Post 1531936)
The default code and example code from 2009 did a gimbal'd camera. They used a very low image resolution and you really have to be careful to keep the vision loop running fast, but you can make it work. The examples were shipped in 2012 and maybe 2013. I can post them if necessary.

Greg McKaskle

Greg, I have been looking for our 2009 code for 2 weeks! Would you please post those examples! Thank you!

Greg McKaskle 29-01-2016 20:44

Re: Controlling Servos for Vision Targeting
 
It is called servo camera.zip and I uploaded it to ni.com/frc under the documents tab.

Greg McKaskle


All times are GMT -5. The time now is 03:53.

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