PX4 - Troubleshooting
Issue in SITL where drone flight altitude was fluctuating wildly
Case
Carlos Llamas found that when running two drone in SITL mode in Gazebo, their flight altitude would fluctuate wildly.
Replication
Running the SITL simulation and providing a commander takeoff command in the PX4 shell did not cause the drone to hover stably at 2.5m altitude.
This was further tested by causing takeoff from QGroundControl.
Diagnosis
The issue was found to be in the EKF estimate, as the /fmu/out/vehicle_local_position --field z was fluctuating wildly. After some research, this was found in the PX4 documentation.
Solution
Setting parameter EKF2_BARO_CTRL --> 'Disabled', the issue was resolved.
The barometer in simulation was causing an issue with the height estimate by the EKF.
Issue with the RC not maintaining connection with a Registered and Bound Reciever
Case
Carlos Llamas was attempting to register and bind a FrSky R9 SX Receiver to a FrSky Tandem X20 RC. After successfully doing so, the device was repeatedly gaining and losing connection.
Replication
Was also experienced when registered and bound using Renzo Bruzzone's RC.
It was also attempted with other receivers and same issue persisted.
Diagnosis
The issue was found to be outdated firmware. It was 1.4.X.
Solution
Updating firmware to 1.5.19 using Ethos Suite resolved this issue.
Issue with .ulog corruption when drone isn't shutdown gracefully
Case
- Data was collected by running
logger start->logger on. - Drone was set to stop logging at disarm.
- When drone was shutdown by turning off battery, the log dumped was corrupted and did not have all the data.
Replication
- Set SD_LOG mode to "arm to disarm".
- Do
logger startthenlogger onbefore arming. - Arm, run mission then disarm.
- Turn off battery.
- Log will be corrupted.
Diagnosis
- Turning off drone by switching off power is unsafe.
- Solution is to run
shutdownfrom PX4's NuttX console.
Solution
- To safely record logs:
logger start->logger on->logger stop