PixHawk - MRoboSub/mrobosub GitHub Wiki

Update April 2025: We no longer use the PixHawk. This has been replaced by our Thruster Mixing code and Thruster Controller Board.

Measuring Yaw

Mavros Topic

Yaw can be measured by reading /mavros/imu/data and converting to Euler angles.

Calibration

The accelerometer should calibrated in QGroundControl via Vehicle Setup -> Sensors -> Accelerometer. Do this every time the PixHawk moves in the sub. Before calibration, make sure to select the Autopilot rotation. Sometimes the calibration process gets stuck at a certain step; in this situation, power cycle and try again.

Solving compass drift

The PixHawk fuses the IMU with compass, but this tends to cause significant drift in the yaw. To observe this drift, rotate the sub on the cart or table and see how fast the yaw is changing once the sub is stationary. This can be resolved by disabling the compass. Go to Vehicle Setup -> Sensors -> uncheck Use Compass -> Ok.

⚠️ **GitHub.com Fallback** ⚠️