View Single Post
  #3   Spotlight this post!  
Unread 18-11-2015, 00:34
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: 339
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: Using navX MXP to get robot velocity

Quote:
Originally Posted by Poseidon1671 View Post
From this thread:



I'm assuming that Arhowk tried this with the roboRIO's built-in accelerometer. Has anyone tried something similar with accelerometer data from the navX MXP expansion board? If integrating that data can give a reasonably accurate velocity, I could see this being another solution for simple autonomous motion profiling, rather than using encoders on the drive.
There are a number of reasons why using the onboard RoboRIO accelerometers for this is a non-starter, including that rotation needs to be taken into account, and that accelerometers measure acceleration due to gravity in addition to acceleration due to linear motion, and the gravity component needs to be removed accurately to access the linear acceleration data.

The navX-MXP can track the rotation and remove the gravity component since it fuses the gyroscope data w/the accelerometer data. The navX-MXP v. 2.0 firmware has been modified to calculate velocity and displacement onboard in real-time. However....

After analyzing the resulting displacement data, my determination is that it's accurate to about 1 meter over a 15 second autonomous period, which is not accurate enough for the types of things we are doing. There are a few reasons for this level of accuracy. The primary reason is that the levels of noise present in the current generation of MEMS accelerometers, such as those in the navX-MXP, is high enough that when it is double-integrated (cubed) there's a large error that's introduced. And this is what leads to the inaccuracy. Lots of work went into filtering the data, and also disabling integration when no motion is detection, but the results still aren't near what we need for use in Autonomous.

Based upon this investigation, my current estimation is we need to see noise levels that are about 1/100th (2 orders of magnitude) lower than current technology to get to an error of about a centimeter or so during the autonomous period. When technology reaches that point, we'll build a board that makes this features available for use in FIRST FRC and FTC robots. But until that time, it's a waiting game.

STMicro is making good strides towards lower-noise MEMS accelerometers (25 ug/square-root-hertz is their best noise spec); these accelerometers are more expensive, and they're still not to the level we'll need them to be (~2 ug/square-root-hertz). Looking into my crystal ball, I think we're roughly 5 years away from something that becomes viable.

If you do want to play around with what the navX-MXP calculates, there's a new "Experimental" button in the navXUI that, along w/the new v. 2.0 firmware, will display integrated velocity and displacement in the x and y axes. It's marked "experimental" for a reason...