View Single Post
  #5   Spotlight this post!  
Unread 10-02-2013, 20:57
shawn.schwartz's Avatar
shawn.schwartz shawn.schwartz is offline
Lead Systems Engineer
FRC #0004 (Team 4 ELEMENT)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Lake Balboa, CA
Posts: 27
shawn.schwartz is an unknown quantity at this point
Re: WPILIB Camera Code Implementation HELP

Quote:
Originally Posted by Ginto8 View Post
I'm not quite sure what you mean by "simple motor implementation." A shooter wheel control? In that case, you'll want to look either into a PID control or a Bang-Bang control (http://www.chiefdelphi.com/media/papers/2663). An example of turning toward the target? If you don't have a turret, you can use a PIDCommand or something similar with the output set to something like drive.tankdrive(output,-output) and the input set to something like gyro.getAngle() (assuming drive is a RobotDrive and gyro is a Gyro). Tilting gets a little more complicated because you probably need to use an accelerometer, which only measures angle indirectly.
What I meant was that with the methods provided in the above code from WPI, how can these methods be called to make a robot change its angle or move its motors at a certain speed, depending on the output of camera data from the methods? Thanks.
__________________
Shawn Schwartz
Programming/Head of Website & Media, Team 4 ELEMENT
team4element.com
"Innovation distinguishes between a leader and a follower." -Steve Jobs
Reply With Quote