Closed nathanchan631 closed 12 months ago
PX4 documentation (https://docs.px4.io/v1.13/en/flying/pre_flight_checks.html):
PX4 checks if any systems on the drone are inconsistent (gyroscope, GPS, position, etc). It also checks if the battery is usable as in the simulation I got a "Preflight Fail: Battery Unhealthy" message and was unable to arm. It seems that all of these except the battery problem can be fixed with a series of calibrations performed by the mavsdk.calibration
class. Once everything is calibrated we can arm the drone using the mavsdk.action
class command arm()
We can also check if the drone is armable using the mavsdk.telemetry.Health
object and use the appropriate calibrations if is it not armable.
Looks good! You can implement code for arming into flight/main.py if it's short, and if it's longer, make a separate script under flight/src. Just make sure to test if it arms the plane using the sim. If arming fails, we want to pause execution until it's successful.
Look into how PX4 does pre-arm checks and what requirements are needed for the drone to arm.