Page 1 of 1

Stopping my crazyflie

Posted: Wed May 01, 2019 12:43 pm
by RyanMco
Hi guys, I'm controlling my crazyflie by python script and I would like to know how can I stop immediately my crazyflie eventhough if he didn't land, I mean whenever I press for example the button "f" then my crazyflie should be land immediately(shut down) .. any clue?
what command/code should I add to my python script for letting my crazyflie to stop immediately even though it was hovering/running ?! any clue?

because sometimes my crazyflie goes crazy and I need a away to stop it while running the script of crazyflie's controlling .

Re: Stopping my crazyflie

Posted: Thu May 02, 2019 6:53 am
by arnaud
The exact answer depends of what API you are using in your python script. If you are sending commander serpoints at regular interval, you can just call "cf.commander.send_stop_setpoint()" and the motors will stop directly.

If you are using the motion commander, unfortunately there is no stop functionality for it yet. One thing you can try (I have not tried it myself but in theory it should work) is to raise an exception and at the end of your program, outside the motion commander context, call "cf.commander.send_stop_setpoint()".