It is by a motor which induces a magnetic field which interferes with magnetometers. When logging Robot.NAVX.getPitch() it always returns (30,40). When rotating the robot (even slowly)
in teleop, the robot will be about 20 degrees too far when the robot has gone around 360 degrees according to Robot.NAVX.getYaw(). An example of this is seen in the image below (the robot started facing the chair directly in front of the camera).
The placement of the navX in the robot = :(
It is by a motor which induces a magnetic field which interferes with magnetometers. When logging
Robot.NAVX.getPitch()
it always returns(30,40)
. When rotating the robot (even slowly) in teleop, the robot will be about 20 degrees too far when the robot has gone around 360 degrees according toRobot.NAVX.getYaw()
. An example of this is seen in the image below (the robot started facing the chair directly in front of the camera).