View Single Post
  #13   Spotlight this post!  
Unread 23-01-2015, 10:16
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: ANNOUNCING: navX MXP Robotics Navigation Sensor

Quote:
Originally Posted by jSoft View Post
Is anybody here able to guide me through the process of maintaining a fixed header in labview?
If you mean a fixed heading, then it's pretty simple in concept. Read the current heading (using whatever gyro you have), subtract it from the desired heading to give an error value, and use the error value to turn the robot in the direction necessary to bring the error to zero.

An easy way to do this is to multiply (or divide) the error by a scale factor and wire it to the X axis of an Arcade Drive function. This won't be perfect; it is likely to either oscillate around the desired heading or never quite reach it. That's where a PID function comes in handy, using the Proportional term to turn the robot faster when it's farther off target, and adding in an Integral term to give the turn a little more oomph when it's been off target for too long. A Derivative term is rarely necessary, but might help reduce overshoot if the robot ever gets way off target.
Reply With Quote