Go to Post Waiting for the kick off is like studing the molecular structure of grass while being hit on the head by a frying pan - infinitydex [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2016, 18:59
Elius_Linkus Elius_Linkus is offline
Registered User
FRC #1723 (The FBI - FIRST Bots of Indpendence)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Independence, MO
Posts: 6
Elius_Linkus is an unknown quantity at this point
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?
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2016, 07:05
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 79
sraque is on a distinguished road
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2016, 10:08
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2016, 12:27
iSpotix iSpotix is offline
Registered User
FRC #4049
 
Join Date: Jan 2016
Location: Pittsburgh
Posts: 27
iSpotix is an unknown quantity at this point
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.

Last edited by iSpotix : 29-01-2016 at 12:30.
Reply With Quote
  #5   Spotlight this post!  
Unread 29-01-2016, 14:39
rbellini rbellini is offline
Bob B
AKA: Bob Bellini
FRC #1712 (Dawgma)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Phoenixville PA
Posts: 3
rbellini is an unknown quantity at this point
Re: Controlling Servos for Vision Targeting

Quote:
Originally Posted by Greg McKaskle View Post
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!
Reply With Quote
  #6   Spotlight this post!  
Unread 29-01-2016, 20:44
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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