Are you running in a virtual machine?
I installed an Ubuntu 18.04 VM to test and I got the same problem a couple of time, then it started working. My assumption is that the first setpoint command sometime get lost: https://github.com/bitcraze/crazyflie-l ... amp.py#L89
. If that is the case, the motors will not run.
One way to reduce the problem would be to send this packet more than once, for example by modifying the code this way:
Code: Select all
# Unlock startup thrust protection
for _ in range(10):
self._cf.commander.send_setpoint(0, 0, 0, 0)
As for the take-off command, you can look at the motion commander, it does take off automatically: https://github.com/bitcraze/crazyflie-l ... emo.py#L54
The motion commander is sequencing the take-off using python code by sending setpoints packets. There is a high-level commander in the Crazyflie that has a take-off command that can be sent to the Crazyflie, then the sequence is handled onboard the Crazyflie. Though there is no python API for the high-level commander yet.