View Single Post
  #4   Spotlight this post!  
Unread 02-12-2016, 07:21 PM
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 337
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Problem with NavX to turn around.

Quote:
Originally Posted by team-4480 View Post
Unfortunately we don't have encoders on our robot to be able to do that.
You won't need encoders to implement a "rotate to angle" PID using navX-MXP.

Take a look at the "Rotate to Angle" examples. Online description of these is here.

You can find an example java project that implements this after you run the navX-MXP setup program. The sample for "Rotate to Angle" is installed at:

C:\Users\<your_username>\navx-mxp\java\examples\RotateToAngle

This example shows how to implement this, using Mecanum drive.

Some PID Tuning is required, so you'll want to read up on how to use PID (there are lots of links to good info here on ChiefDelphi). You should be able to implement something that works reasonably well by only using a P coefficient, though to get it to work well w/your specific drive system you may need to do additional tuning of the I and D coefficients.
Reply With Quote