Quote:
Originally Posted by team-4480
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.