Dronekit-sitl error

I am trying to use dronekit-sitl. I ran the “simple_goto” example from dronekit (dronekit-python/simple_goto.py at master · dronekit/dronekit-python · GitHub) . However, every time I run it this is what I get on my console:

SITL already Downloaded and Extracted.
Ready to boot.
Connecting to vehicle on: tcp:127.0.0.1:5760
CRITICAL:autopilot:APM:Copter V3.3 (d6053245)
CRITICAL:autopilot:Frame: QUAD
CRITICAL:autopilot:Calibrating barometer
CRITICAL:autopilot:Initialising APM...
CRITICAL:autopilot:barometer calibration complete
CRITICAL:autopilot:GROUND START
Basic pre-arm checks
 Waiting for vehicle to initialise...
 Waiting for vehicle to initialise...
 Waiting for vehicle to initialise...
 Waiting for vehicle to initialise...
 Waiting for vehicle to initialise...
Arming motors
 Waiting for arming...
 Waiting for arming...
 Waiting for arming...
 Waiting for arming...
ERROR:autopilot:ARMING MOTORS
CRITICAL:autopilot:GROUND START
 Waiting for arming...
WARNING:dronekit:Link timeout, no heartbeat in last 5 seconds
CRITICAL:autopilot:Initialising APM...
Taking off!
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.01
 Altitude:  0.02
 Altitude:  0.02
 Altitude:  0.02
 Altitude:  0.03
ERROR:autopilot:DISARMING MOTORS
 Altitude:  0.01
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.0
 Altitude:  0.01

By the way, before I ran the simple_goto code, I executed this other one on another terminal

dronekit-sitl copter

And this what shows on that terminal before and during the execution of the simple_goto example:

os: linux, apm: copter, release: stable
SITL already Downloaded and Extracted.
Ready to boot.
Execute: /home/vitor/.dronekit/sitl/copter-3.3/apm --home=[blah blah blah]  --model=quad -I 0
SITL-0> Started model quad at [blah blah blah]  at speed 1.0
SITL-0.stderr> bind port 5760 for 0
Starting sketch 'ArduCopter'
Serial port 0 on TCP port 5760
Starting SITL input
Waiting for connection ....
bind port 5762 for 2
Serial port 2 on TCP port 5762
bind port 5763 for 3
Serial port 3 on TCP port 5763
Closed connection on serial port 0

FYI, these are the commands I ran to install things:

sudo apt-get install python3-dev python3-opencv python3-wxgtk4.0 python3-pip python3-matplotlib python3-lxml python3-pygame
pip3 install PyYAML mavproxy --user
echo "export PATH=$PATH:$HOME/.local/bin" >> ~/.bashrc

I also had to run
pip install wheel
because the installation of mavproxy was leading to an error, but after I installed ‘wheel’ it worked.

Could someone help me out, please?

There might be some dronekit-sitl and support sw version incompatibilities.

What versions are you using for dronekit-sitl, pymavlinnk, mavproxy and APM?

Probably the latest versions. Because I just ran the commands given in the documentation. Which version should I use for each? I could remove them and install it again

I just uninstalled them. dronekit was 2.9.2, mavproxy was 1.8.46, pymavlink was 2.4.27, and dronekit-sitl was 3.3.0. I’m not sure about APM though, how do I check that?

It looks ok but I have pymavlink==2.4.19.

Did you include the commands

sudo usermod -a -G dialout $USER
sudo apt remove modemmanager -y

Other than that I’m not sure.