The new nav6 Open Source Inertial Measurement Unit (IMU) designed for FIRST robotics is now available for sale at the Kauailabs store.
The nav6 IMU makes sophisticated inertial navigation capabilities easily available to student robotics teams, including the FIRST Robotics Challenge (FRC). The nav6 IMU rapidly calculates yaw, pitch, roll and compass heading, as well as linear acceleration; these capabilities enable robot features that include:
“Field-oriented” drive mode
Automatically rotating to an absolute or relative angle
As a team who was considering purchasing one, how is the Java code meant to be imported into an existing project? It seems to cause an error with the Java versions as the default project seems to use Java 3 whereas @Override isn’t available until Java 5.
Thanks for reporting the problem. We’re still working out the kinks w/the Java and the LabView libraries to interface to the nav6.
At this point there are two known issues w/the Java code that’s in the repository:
The IMU and IMUAdvanced classes use @Override, which is not supported in J2ME / Java 1.3
The IMUAdvanced class uses atan2() and atan(), which are not present in the math library in the J2ME.
We have a test app on the PC that we tested the java IMUProtocol class with, but that was with Java 1.7; the IMU and IMUAdvanced classes are ported from our original C++ code base, and haven’t been fully tested on the robot yet.
For the first item, it’s a simple task to comment out the override.
For the second item, a member of Team 11 is adding support for the inverse trig functions.
I’ll post a note to this forum when we get the java classes fully tested and checked in, this should happen over the next few weeks.
Please let me know if you have any more questions.
I got them both working last night by removing the @Override line and switching from Math to MathUtils. We purchased a nav6 on Saturday and as soon as we get it I’ll test everything as thoroughly as possible.
That’s great news, Eddie. I’ve also checked in similar changes to the java code, including updating the net beans project file to perform the J2ME/Jdk1.4 build (following the convention of the other projects created by the FRC Plugins).
One other small change was to rename a few of the functions in the IMUAdvanced class to start the first word w/a lower-case letter (e.g., isMoving()).
The plan once we finalize the testing of the java code is to create a “released” nav6.jar file, the idea being that teams would simply drop that in their sunspotfrsdk/lib directory to use it. I’ll keep you posted on that.
If you have any more questions or issues, please let me know; you can contact me at [email protected]
A nav6 LabView VI library is also available now, and an example LabView application that uses the library. Many thanks to our volunteer! Some documentation is currently being developed as well, and will be posted when it’s ready. More details are on the nav6 wiki.