PX4 SITL: no connection to QgroundControl?

Ubuntu 24.04.2 LTS, PX4 v1.15.4

Today I downloaded the latest stable version of PX4, and several QgroundControl images.
PX4 built without errors, but make px4_sitl gz_x500 fails on takeoff messages listed below.

I attempted to diagnose a connection failure: Please correct me , but I assume the following means that QgroundControl is trying to communicate on
0.0.0.0:14550, but neither PX4 nor gz sim are listening to that.

What is supposed to be happening ? What should I do to fix this ?

Not the same problem as Profile - lux_nychta - Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink
================ PX4 =============================
make px4_sitl gz_x500
……

INFO [commander] Ready for takeoff!
ERROR [sensors] Accel #0 fail: TIMEOUT!
ERROR [sensors] Accel #0 fail: TIMEOUT!
WARN [health_and_arming_checks] Preflight Fail: High Accelerometer Bias
ERROR [sensors] Accel #0 fail: TIMEOUT!
ERROR [sensors] Accel #0 fail: TIMEOUT!
ERROR [sensors] Accel #0 fail: TIMEOUT!
ERROR [sensors] Accel #0 fail: TIMEOUT!
ERROR [sensors] Accel #0 fail: TIMEOUT!
INFO [commander] Connection to ground station lost
WARN [health_and_arming_checks] Preflight Fail: High Accelerometer Bias
WARN [health_and_arming_checks] Preflight Fail: No connection to the ground control station
INFO [commander] GCS connection regained
WARN [health_and_arming_checks] Preflight Fail: High Accelerometer Bias
ERROR [sensors] Accel #0 fail: TIMEOUT!
WARN [health_and_arming_checks] Preflight Fail: vertical velocity unstable
…. continues like this ….

================ Connections =============================
sudo netstat -tulnp | grep 14550
udp 0 0 0.0.0.0:14550 0.0.0.0:* 40366/QGroundContro

$ sudo netstat -tulnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.20.18:33155 0.0.0.0:* LISTEN 44405/gz sim -g
tcp 0 0 192.168.20.18:33707 0.0.0.0:* LISTEN 44404/gz sim --verb
tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN 1047/systemd-resolv
tcp 0 0 192.168.20.18:36853 0.0.0.0:* LISTEN 44244/px4
tcp 0 0 192.168.20.18:39561 0.0.0.0:* LISTEN 44244/px4
tcp 0 0 192.168.20.18:39553 0.0.0.0:* LISTEN 44405/gz sim -g
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 1047/systemd-resolv
tcp 0 0 192.168.20.18:44487 0.0.0.0:* LISTEN 44244/px4
tcp 0 0 192.168.20.18:46225 0.0.0.0:* LISTEN 44405/gz sim -g
tcp 0 0 192.168.20.18:46655 0.0.0.0:* LISTEN 44404/gz sim --verb
tcp 0 0 192.168.20.18:45669 0.0.0.0:* LISTEN 44404/gz sim --verb
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1761/cupsd
tcp6 0 0 :::80 :::* LISTEN 1832/apache2
tcp6 0 0 ::1:631 :::* LISTEN 1761/cupsd
udp 208768 212992 0.0.0.0:10317 0.0.0.0:* 44244/px4
udp 128128 212992 0.0.0.0:10317 0.0.0.0:* 44404/gz sim --verb
udp 168576 107136 0.0.0.0:10317 0.0.0.0:* 44405/gz sim -g
udp 0 1792 0.0.0.0:10318 0.0.0.0:* 44244/px4
udp 0 135296 0.0.0.0:10318 0.0.0.0:* 44404/gz sim --verb
udp 0 90240 0.0.0.0:10318 0.0.0.0:* 44405/gz sim -g
udp 0 0 0.0.0.0:13030 0.0.0.0:* 44244/px4
udp 0 0 0.0.0.0:14280 0.0.0.0:* 44244/px4
udp 0 0 0.0.0.0:14550 0.0.0.0:* 40366/QGroundContro
udp 0 0 0.0.0.0:14580 0.0.0.0:* 44244/px4
udp 0 0 127.0.0.54:53 0.0.0.0:* 1047/systemd-resolv
udp 0 0 127.0.0.53:53 0.0.0.0:* 1047/systemd-resolv
udp 0 0 0.0.0.0:18570 0.0.0.0:* 44244/px4
udp 0 0 0.0.0.0:5353 0.0.0.0:* 1242/avahi-daemon:
udp 0 0 0.0.0.0:54842 0.0.0.0:* 1242/avahi-daemon:
udp6 0 0 :::41397 :::* 1242/avahi-daemon:
udp6 0 0 fe80::bf84:f439:94b:546 :::* 1350/NetworkManager
udp6 0 0 :::5353 :::* 1242/avahi-daemon:

This shouldn’t happen, and doesn’t happen for me. Is this a setup in a virtual machine? Just wondering if the CPU is struggling?

Thanks Julian for your reply.
I would not expect the CPU to be struggling. It is an Acer Nitro 5 (low end gaming laptop:
Intel® Core™ i5-10300H × 8, NVIDIA GeForce RTX™ 3060 Laptop GPU ) with 32 GB ram added. Running native Ubuntu 24.04.2 LTS, with nearly daily updates.

I know little about system software, but it seems to me unfortunate that PX4 is so heavily dependent on system details, and that PX4 v1.15.4 resorts to using in ubuntu.sh:

python3 -m pip install --break-system-packages -r ${DIR}/requirements.txt

irrespective of whether or not this is related to my problem.
In my case it is not safe and it doesn’t even give me a working build.

I’m thinking of going back to PX4 v1.15.2 and attempting to use a Python virtual environment as suggested by Error at Installation of PX4 development environment

Is that a reasonable way for me to try? And if so, in Tools/setup/requirements.txt do I need matplotlib>=3.0.*
Can I safely delete that line? Or is there an alternative that would build ok?

Regards,
Don

That should be plenty powerful, so that’s not the reason then.

The Python packages shouldn’t be a problem either.

That’s fine. I don’t think that’s required for SITL.

Have you tried with latest main? Does that work better?

Thanks Julian,
What is “latest main” ? I will try that if I understand what it is and where to find it - my knowledge of PX4 is very limited.

Since I didn’t know you would reply, I yesterday tried hacking PX4 v1.15.2 to run on Ubuntu 24.04.2 LTS, with what appears to be success - maybe.

  1. I roughly hacked ubuntu.sh using script from PX4 v1.15.4 to support Ubuntu 24.04
  2. setup a python virtual environment - I accept your advice that this is not necessary - but this was before I got your reply, and i don’t like python3 -m pip install --break-system-packages.
    python3 -m venv ./pyenv
    source /.pyenv/activate
    pip install --upgrade pip
    bash ./Tools/setup/ubuntu.sh
    – install various missing requirements
    Restart computer
    Start QgroundControl
    cd ~/PX4-Autopilot-1.15.2/Firmware
    source ./pyenv/bin/activate
    make px4_sitl gz_x500
    ======== RESULT 1 =============
    ….
    WARN [init] PX4_GZ_MODEL_POSE not set, spawning at origin.
    INFO [gz_bridge] world: default, model name: x500_0, simulation model: x500
    INFO [gz_bridge] Requested Model Position: 0,0,0,0,0,0
    INFO [gz_bridge] Model position z is less or equal 0.0, moving upwards
    ERROR [gz_bridge] Service call timed out. Check GZ_SIM_RESOURCE_PATH is set correctly.
    ERROR [gz_bridge] Task start failed (-1)
    ERROR [init] gz_bridge failed to start and spawn model
    ERROR [init] gz_bridge failed to start and spawn model
    ERROR [px4] Startup script returned with return value: 256
    libEGL warning: egl: failed to create dri2 screen
    libEGL warning: egl: failed to create dri2 screen
    libEGL warning: egl: failed to create dri2 screen
    ^Cninja: build stopped: interrupted by user.
    make: *** [Makefile:232: px4_sitl] Interrupt
    === give it another kick =================================
    make px4_sitl gz_x500
    ======== RESULT 2 =============
    ….
    pxh> INFO [commander] Ready for takeoff!
    pxh> commander takeoff
    pxh> INFO [commander] Armed by internal command
    INFO [tone_alarm] arming warning
    INFO [navigator] Using default takeoff altitude: 2.5 m
    INFO [commander] Takeoff detected
    pxh> commander land
    pxh> INFO [commander] Landing at current position
    INFO [commander] Landing detected
    INFO [commander] Disarmed by landing
    INFO [tone_alarm] notify neutral

==================================================

Ok I suppose you mean the version can clone as in Building PX4 Software | PX4 Guide (main)
I did that:
$ git status
On branch main
Your branch is up to date with ‘origin/main’
and I see a commit yesterday Date: Fri Mar 14 16:25:28 2025 +0100

I will try that

So I tried the version I cloned at
([Building PX4 Software | PX4 Guide (main)]
with hacks as for PX4 v1.15.2 (see above and below)

This built without error ( as far as I know) but the result is similar to the failure of PX4 v1.15.4
Looks like it produced a much improved UI for gazebo.
But my hack of PX4 v1.15.2 (see above) seems to actually fly.
Don

make px4_sitl gz_x500
======== RESULT =============

CMake Deprecation Warnings


| ___ \ \ \ / / / |
| |/ / \ V / / /| |
| __/ / \ / /
| |
| | / /^\ \ ___ |
_| / / |_/

px4 starting.

INFO [px4] Startup script returned successfully
pxh> WARN [health_and_arming_checks] Preflight Fail: No connection to the ground control station
INFO [commander] Ready for takeoff!
ERROR [sensors] Accel #0 fail: TIMEOUT!
WARN [health_and_arming_checks] Preflight Fail: vertical velocity unstable
ERROR [sensors] Accel #0 fail: TIMEOUT!
WARN [health_and_arming_checks] Preflight Fail: vertical velocity unstable
pxh> commWARN [health_and_arming_checks] Preflight Fail: vertical velocity unstable
WARN [health_and_arming_checks] Preflight Fail: High Accelerometer Bias
pxh> commander WARN [health_and_arming_checks] Preflight Fail: High Accelerometer Bias
pxh> commander takeoff
pxh> WARN [commander] Arming denied: Resolve system health failures first
INFO [tone_alarm] notify negative
ERROR [sensors] Accel #0 fail: TIMEOUT!
ERROR [sensors] Accel #0 fail: TIMEOUT!
ERROR [sensors] Accel #0 fail: TIMEOUT!
ERROR [sensors] Accel #0 fail: TIMEOUT!

======== HACKS =============
As with PX4 v1.15.2 I hacked
./Tools/setup/requirements.txt:
DELETE LINE ( matplotlib>=3.0.* )`

./Tools/setup/ubuntu.sh
DELETE
if
[[ “$(printf ‘%s\n’ “$REQUIRED_VERSION”
“$PYTHON_VERSION” | sort -V | head -n1)” ==
“$REQUIRED_VERSION” ]]; then`
python3 -m pip install --break-system-packages -r ${DIR}/requirements.txt
else

fi

And used a virtual environment for python as above
python3 -m venv ./pyenv

the same issue.
refer to: ERROR [sensors] Accel #0 Fail: TIMEOUT!