nav6 Open Source IMU designed for FIRST Robotics

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
  • Robot balancing
  • Automatically rotating to an absolute or relative angle
  • Motion / No-Motion Detection
  • Bump Detection

https://nav6.googlecode.com/svn/trunk/images/nav6_purple_1_small.jpg

== Key Features ==

  • Yaw, Pitch and Roll Angles
  • Tilt-compensated Compass Heading
  • 100Hz Update Rate
  • Automatic Accelerometer/Gyroscope Calibration
  • Automatic Hard-Iron Magnetometer Calibration
  • Completely Open Source: Source Code, Schematics/Bill of Materials and Enclosure Design files (for 3D printer) are available on-line at no cost
  • Arduino-compatible - programmable with free Arduino IDE
  • C++ and Java Classes for rapidly integrating the nav6 IMU into your robot control software
  • Electrical design for easy integration into the FIRST FRC CRio-based Control System

For more details, please visit the nav6 Wiki - which includes full documentation on how to install and use the nav6 IMU, including application examples and much more.

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.

Hi Eddie,

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.

  • scott

For the second item, a member of Team 11 is adding support for the inverse trig functions.

atan and atan2 are available in squawk in com.sun.squawk.util.MathUtils. No need to implement them.

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.

We’re currently investigating an issue where if the nav6 is unpowered, our robot code slows down dramatically (cycle times of 30 msec becoming 5000 msec).

We’re using the Java libraries, and the only thing we’ve done is instantiate the IMU and send data to the LiveWindow.

Seen anything like this before?

Is this before or after r561?

Aha, before! We just integrated the code a few days ago, so we wouldn’t have this update.

Just tested it now - looking good!