Log in

View Full Version : Navx-MXP AHRS error


DanielAndrews
27-01-2016, 20:50
Our kauailabs Navx-MXP is giving an error in the DriverStation after deploying code and following set up instructions:

ERROR Unhandled exception instantiating robot
org.usfirst.frc.team5510.robot.Robot java.lang.NoClassDefFoundError:
edu/wpi/first/wpilibj/PIDSourceType at
[com.kauailabs.navx.frc.AHRS.<init>(AHRS.java:187),
com.kauailabs.navx.frc.AHRS.<init>(AHRS.java:319),
org.usfirst.frc.team5510.robot.Robot.<init>(Robot.java:56),
sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:62),
sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:45) , java.lang.reflect.Constructor.newInstance(Construc tor.java:408),
java.lang.Class.newInstance(Class.java:433),
edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:197)]


We are still using the 2015 libraries if that matter. Any help would be greatly appreciated!

Ben Wolsieffer
27-01-2016, 21:02
Your problem is that you are using the 2015 WPILib with a library that was designed for 2016. One of the things that changed in 2016 was that PIDSourceParameter was renamed to PIDSourceType.

Source: https://wpilib.screenstepslive.com/s/4485/m/13810/l/480120-c-java-changes-and-porting-guide-2015-to-2016

My recommendation is simply that you update your roboRIO, because you will have to do it eventually.

DanielAndrews
27-01-2016, 21:03
oh, will do right now. Thanks!

TannerM
03-02-2016, 21:07
Hi,

When I try to compile my navX code on Eclipse using C++ it says "fatal error: AHRS.h: No such file or directory"

What can I do to fix it?

Inconceivable Programmers

slibert
04-02-2016, 11:21
Hi,

When I try to compile my navX code on Eclipse using C++ it says "fatal error: AHRS.h: No such file or directory"

What can I do to fix it?

Inconceivable Programmers

You'll need to follow the instructions to configure the Eclipse Library and Include Paths on the NavX-MXP C++ for Roborio Library page. (http://www.pdocs.kauailabs.com/navx-mxp/software/roborio-libraries/c/)