View Single Post
  #103   Spotlight this post!  
Unread 28-01-2015, 22:46
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: 343
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: ANNOUNCING: navX MXP Robotics Navigation Sensor

Quote:
Originally Posted by cjl2625 View Post
I calibrated the magnetometer, but the MAG_DISTURBANCE indicator is constantly on.
Also, if I rotate the robot 180 degrees, the yaw reads 200 degrees.
Among other things, the navX MXP magnetometer calibration process will calculate the strength of the earth's magnetic field. Once calibrated, magnetic disturbance will be detected whenever the current magnetic measurement diverges from the calibrated earth's magnetic field strength by more than a threshold (which defaults to 19%).

So in your case either the magnetic field is truly being disturbed, or the value being used for the magnetic field strength is incorrect.

When calibrated at a high quality level, the navX MXP magnetometer is quite sensitive. Simply holding an iphone a few inches away from the navX MXPUI (when the magnetometer calibration is of high quality) is sufficient to trigger a "magnetic disturbance" detection.

More often, though, the quality of the calibration is an issue. I have yet to meet anyone who achieves quality magnetic calibration on the first try - indeed it's taken quite some practice for me personally to get quality calibration. Here are some hints to help achieve quality calibration:

- Carefully double and triple-check each step along the way - it's very easy to get the orientation of the axes wrong on one or more of the 12 steps. A single error in orientation can lead to low-quality calibration data.
- Another important factor to consider is it's very important that there are not *changing* sources of magnetic disturbance during the magnetometer calibration process. We've seen problems when calibrating the magnetometer near a PC, and another time near a USB cable that had a "choke" (a round piece of ferrous metal) on it. If there are any such sources of interference nearby that _are still_, while you _are moving_ the navX MXP to calibrate it, the fluctuations in the magnetic field measured by the navX MXP will lead to errors in the calibration.

Regarding the yaw measurement, there's a common cause for the symptom you report. It's very important to ensure that the navX MXP is held still during the startup (calibration) phase in order to get accurate yaw measurements. Please read the gyroscope/accelerometer calibration wiki page for details on this. You can also use the navX MXP UI to see this clearly - when the "Calibrating..." indicator is displayed the navX MXP must be held still. Only after this indicator is removed will yaw measurements exhibit high accuracy.
Reply With Quote