Go to Post You have to start at the bottom to get to the top, usually. - Kyle [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 10-01-2012, 08:26
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: Advanced Vision Concept [help!]

There is an example in Program Files/National Instruments/LabVIEW 2011/Examples/FRC/Vision called Servo Camera Example. It detected the pink and green fabric and aimed the servo at it. It is a bit difficult to setup, runs on the cRIO, but includes most of the code you are looking for provided you are only aiming the camera and hobby servos will work. If you are rotating a heavier mass, you will need a motor with more torque and you'll need an encoder or other sensor that gives feedback.

Greg McKaskle
Reply With Quote
  #2   Spotlight this post!  
Unread 10-01-2012, 22:28
bhaidet's Avatar
bhaidet bhaidet is offline
Registered User
FRC #0435
Team Role: Mentor
 
Join Date: Dec 2010
Rookie Year: 2009
Location: Raleigh, NC
Posts: 33
bhaidet is an unknown quantity at this point
Re: Advanced Vision Concept [help!]

the problem with servos is that they are not continuous. I would opt for a servo to control the up/down motion and a regular "servo-ed" motor to control the side-to-side. This would let you turn all the way around (although your cable would wrap up).

Basically, to keep the camera set, you just need to find the target and find out how far away it is from the center of your field of view. Continually send instructions to the motor to move it to the middle.

The difficulty is actually mechanically attaching the camera. Without a fancy rotary brush thing, you would have issues with the camera cable being tangled up. If you measured the "actual" rotation of the robot with a gyro, you might be able to get away with a normal servo:
have a variable called "offset_angle" or something.
you will also (because you plan to use a servo) know the angle between the front of the robot and the camera. when the camera sees the target, you can use some trig to determine the angle between the line of sight of the camera and the direction to the goal.

subtract all of these angles to determine how far the robot is from the target (as an angle, ie. "if you turn 15 degrees to the right, you will be facing the target")

You can turn in place and keep track of this angle using the gyro, even if you do not see the goal markings. With this setup, to keep the camera on-track without a continuous motor, point the servo to the "angle between the robot and the goal" Then it will point the camera towards the goal and if you turn around backwards where the servo cannot go, the camera will pan all the way around, turning away from the goal for a minute, and pick it up on the other side.

Did I ramble too much there?
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:41.

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