Not sure why when I tried to run the file ramp.py https://github.com/bitcraze/crazyflie-l ... es/ramp.py. The motors of my crazyflie do not spin. There is no error when I ran the code and it connects to my crazyflie.
I am using ubuntu 18.04
Also is there a take off command for autonomous flight?
crazyflie motors do not run using ramp.py
-
- Beginner
- Posts: 10
- Joined: Sat Sep 01, 2018 3:31 pm
Re: crazyflie motors do not run using ramp.py
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:
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.
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)
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.