dronekit / dronekit-python

DroneKit-Python library for communicating with Drones via MAVLink.
https://readthedocs.org/projects/dronekit-python/
Apache License 2.0
1.62k stars 1.44k forks source link

How to reset to groundstart? #1010

Open cbenavidesdev opened 4 years ago

cbenavidesdev commented 4 years ago

When i run a script to takeoff and quit early (cntrl c), the next time i run any script, itll start off where I exited early. For example if I run simple_goto.py, let it reach target altitude, control c, and run simple_goto again, it will skip pre-arm checks and takeoff. How do I tell dronekit to restart fully? This has been very apparent with both drone flights and simulations.

peterbarker commented 4 years ago

On Mon, 16 Mar 2020, carlosbenavides123 wrote:

When i run a script to takeoff and quit early (cntrl c), the next time i run any script, itll start off where I exited early. For example if I run simple_goto.py, let it reach target altitude, control c, and run simple_goto again, it will skip pre-arm checks and takeoff. How do I tell dronekit to restart fully? This has been very apparent with both drone flights and simulations.

Well, you could reboot the vehicle.

Past that your script just has to detect and cope with the current state of the vehicle; if you start the script while the vehicle is in flight you may wish to reconsider rebooting it, for example....

Peter