Go to Post I thanked the tradesmen on our team the same way i do ever year with a handshake and a "thanks for helping us guys", - Mike Schroeder [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 26-02-2012, 15:54
Robobuff1.0's Avatar
Robobuff1.0 Robobuff1.0 is offline
Registered User
FRC #1633
 
Join Date: Jan 2011
Location: Arizona
Posts: 46
Robobuff1.0 is an unknown quantity at this point
Controlling motors using vision processing help

okay this is my first year programming in Labview. I have read everything I can find about vision processing but I cant find anything about using it to control motors. Can someone help us with this. Our team is trying to follow the rectangular targets using the camera and turret so our shooting mechanism is always aimed at the basket even when we are moving. It will be real helpful if you give me a sample code in labview or direct me to a website. And thank you in advance .
__________________
FRC: 1633
FTC: 2873
Reply With Quote
  #2   Spotlight this post!  
Unread 26-02-2012, 21:31
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: Controlling motors using vision processing help

The output of the rectangular target processing is between -1 and 1. You should be able to scale this a bit and build a proportional controller pretty easy. If you do nothing else, you can send the value to the motor, or perhaps the negative of the value.

Another important element is to select which target you are aiming at and keep it consistent.

Finally, you may find that the camera is not a very quick sensor. It is great for deciding how much to rotate, not so great to close a control loop with. You may find that using a pot or encoder may be even better way to go once you know how much to rotate.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 27-02-2012, 12:52
Wendy Holladay's Avatar
Wendy Holladay Wendy Holladay is offline
Registered User
FRC #1912 (Team Combustion)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Slidell, la
Posts: 183
Wendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond repute
Re: Controlling motors using vision processing help

here is my post to the NI site

early in the season we were able to get the rectangular target processing example to see the target and give a distance from it, when we installed the leds.
We are now are wanting the camera to track the target using the servos to move the camera.
i can't see anywhere in this example where that is implemented. is this another example or it there a way to get track distance and camera tracking from this example??

but i'm now glad i checked CD. so is it true there is no target tracking built into the example? we were considering giving the driver's pots to track the target.

but i do not see where the +-1 output is? can you direct me into the block diagram more closely?
__________________
http://www.team1912.com

2013, 2012, 2011, 2010 Regional Chairman's Award, Bayou Regional
2013 Woodie Flower's Award, Bayou Regional
2012 Dean's List Winner (Rachel Holladay)
2015, 2014, 2013, 2012, 2011, 2010 Beta Test Labview/Hardware
2012, 2011 Best Website, Bayou Regional
2011, 2009, 2006 Gracious Professionalism
2007 Bayou Regional Winner
Reply With Quote
  #4   Spotlight this post!  
Unread 27-02-2012, 12:59
Wendy Holladay's Avatar
Wendy Holladay Wendy Holladay is offline
Registered User
FRC #1912 (Team Combustion)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Slidell, la
Posts: 183
Wendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond repute
Re: Controlling motors using vision processing help

i think i found the +-1. is it in computer distance.vi

target center (-1 to 1) gives an x and y?
__________________
http://www.team1912.com

2013, 2012, 2011, 2010 Regional Chairman's Award, Bayou Regional
2013 Woodie Flower's Award, Bayou Regional
2012 Dean's List Winner (Rachel Holladay)
2015, 2014, 2013, 2012, 2011, 2010 Beta Test Labview/Hardware
2012, 2011 Best Website, Bayou Regional
2011, 2009, 2006 Gracious Professionalism
2007 Bayou Regional Winner
Reply With Quote
  #5   Spotlight this post!  
Unread 27-02-2012, 14:53
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Controlling motors using vision processing help

The rectangular target processing produces a Target info array. Each element of that array is a bundle containing X,Y coordinates and computed distance of each recognized rectangle.
Reply With Quote
  #6   Spotlight this post!  
Unread 27-02-2012, 15:56
Wendy Holladay's Avatar
Wendy Holladay Wendy Holladay is offline
Registered User
FRC #1912 (Team Combustion)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Slidell, la
Posts: 183
Wendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond repute
Re: Controlling motors using vision processing help

got it, we have been using the distance, but not the x, y coordinates,

thank u
__________________
http://www.team1912.com

2013, 2012, 2011, 2010 Regional Chairman's Award, Bayou Regional
2013 Woodie Flower's Award, Bayou Regional
2012 Dean's List Winner (Rachel Holladay)
2015, 2014, 2013, 2012, 2011, 2010 Beta Test Labview/Hardware
2012, 2011 Best Website, Bayou Regional
2011, 2009, 2006 Gracious Professionalism
2007 Bayou Regional Winner
Reply With Quote
  #7   Spotlight this post!  
Unread 28-02-2012, 08:31
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: Controlling motors using vision processing help

There is a camera servo example that does a search pattern, moves the camera to point at a colored object, and has a small state machine for overshoot and other situations. You may be able to adapt it or to get the general idea from it.

Greg McKaskle
Reply With Quote
  #8   Spotlight this post!  
Unread 20-03-2012, 18:50
sjsamphex sjsamphex is offline
Registered User
AKA: Samir
FRC #1261 (Robolions)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Georgia
Posts: 1
sjsamphex is an unknown quantity at this point
Re: Controlling motors using vision processing help

Quote:
Originally Posted by Greg McKaskle View Post
There is a camera servo example that does a search pattern, moves the camera to point at a colored object, and has a small state machine for overshoot and other situations. You may be able to adapt it or to get the general idea from it.

Greg McKaskle
Can you tell us where this example is?

Thanks!
Reply With Quote
  #9   Spotlight this post!  
Unread 20-03-2012, 20:57
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Controlling motors using vision processing help

Quote:
Originally Posted by sjsamphex View Post
Can you tell us where this example is?
It's with all the other LabVIEW examples on your programming computer.

When you launch LabVIEW, the "Getting Started" window appears. It has a number of tabs down the left side. One of those tabs is "Support", and it leads to a set of links including "Find FRC Examples..."

I think the specific example Greg is talking about is named "Servo Camera Example.lvproj". It resides in the FRC Robotics > Vision folder.
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 22:11.

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