Dronekit-SITL and Python Problem


I am trying to simulate a drone via a python script, but the problem is it keeps bugging with something. The altitude is always staying 0, and it is not taking-off for some reasons. I think this is a common problem, but if you can help, that would be great.

Here is a video to explain:

Thank you!


I am not used to dronekit SITL but copter v3.3 is verrrrrrrry old…
But you sequence is wrong. You should start by waiting to be connected to the drone then try to change mode to GUIDED, wait ready for arming and arm.
What could happen in your work flow is that you are waiting the drone to be ready in manual mode ( Stabilize, althold etc ) and not in automatic mode ( auto, guided)

But also in your case, the change mode failed surely due to the old SITL version

Ok, so I updated everything, but the problem is once is starts to takeoff, the copter then just disarms the motor. I think it is because of the disarm_delay thing. Do you know how to disable that?

you shouldn’t disable anything, even arming check should be enable unless you get a good reason to disable them. And not having a working code isn’t a great one !

You should look at why it disarm before you could send the takeoff command, there must be an issue in your code