Go to Post During the year I can't wait for the game hint to be released, but then as soon as it is released and I read it for the first time my head starts to hurt and I regret reading it at all... - Jon Jack [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 30-01-2016, 14:20
bobosalad's Avatar
bobosalad bobosalad is offline
Registered User
FRC #2518 (Spartans of St. Jude)
Team Role: Driver
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Inver Grove Heights
Posts: 76
bobosalad is an unknown quantity at this point
Auto Aim with Camera

We are trying to make an auto-aim system with our camera. We have looked through the 2016 vision control sample program and are not sure where to start, which parts of the example are required and which aren't, etc. Has anyone had success with this? If so, how should we go about doing this?
__________________
Spartans, Prepare for GLORY!
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2016, 23:00
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,752
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: Auto Aim with Camera

The vision example is a simplified robot framework with a more detailed Vision Processing VI that uses the LED light color and particle processing to describe any targets in the image. If you wish to integrate this, you use the Vision Processing VI from the example in place of the one from the robot.

Once a particle scores high enough on the various tests to be considered a target, there is a subVI that normalizes its position to use a -1 to 1 coordinate system that resembles what a joystick would return. It also uses the bounding box of the particle to estimate distance to the target. There are a number of different ways to estimate distance and position, but the example shows only the one based on bounding box width.

Driving the robot with input from the camera can be done using error term of the target distance from the goal position within the image (this is often the center point of the image). You can then turn the robot to decrease the distance from goal/center. Since camera feedback is often slow, it is advisable to close the loop using a sensor such as a gyro. This means the the target's position and distance are used to identify the amount to turn and either the gyro or camera are used to measure progress in execution the turn.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 14-03-2016, 01:01
FriendlyCoder FriendlyCoder is offline
Registered User
FRC #4107
 
Join Date: Jan 2016
Location: Gulfport, Mississippi
Posts: 2
FriendlyCoder is an unknown quantity at this point
Re: Auto Aim with Camera

Sorry for such a late comment on this, but is there somewhere that I can actually see an example of this being done? I understand the concept but I have been unable to do this in my own Labview code. Most of my attempts have not been successful. Thanks in advance!
Reply With Quote
  #4   Spotlight this post!  
Unread 14-03-2016, 01:50
hardcopi hardcopi is offline
Registered User
AKA: Rich Lester
FRC #2959 (The Robotarians)
Team Role: Mentor
 
Join Date: Apr 2013
Rookie Year: 2013
Location: Coloma, MI
Posts: 271
hardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud of
Re: Auto Aim with Camera

There is a great you tube video on labview vision processing. Just search for 2016 frc labview vision
Reply With Quote
  #5   Spotlight this post!  
Unread 16-03-2016, 05:01
BDRessler's Avatar
BDRessler BDRessler is offline
Programming Lead
FRC #1828 (BoxerBots)
Team Role: Programmer
 
Join Date: Nov 2014
Rookie Year: 2009
Location: Vail
Posts: 7
BDRessler has a spectacular aura aboutBDRessler has a spectacular aura about
Re: Auto Aim with Camera

When it comes to actually aiming, I used global variables coming out of the vision processing VI as the process variable going into a PID with the output going to the drive motors.

(This is my first post, I'm not sure if this helps)
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 20:26.

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