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 ?
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:
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?
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.
I roughly hacked ubuntu.sh using script from PX4 v1.15.4 to support Ubuntu 24.04
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
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
…
I use a virtual python environment because I have an awful lot of python-dependent applications on this laptop that I really don’t want to compromise with --break-system-packages–. , though I doubt that’s relevant to your problem.
Then SETUP:
cd ~/PX4-Autopilot
EDIT /Tools/setup/ubuntu.sh
echo “**** Attempt --break-system-packages”
EDIT /Tools/setup/requirements.txt:
DELETE LINE ( matplotlib>=3.0.*) # seems ok to omit this
I just followed setup and just stuck in these lines
"
hen RUN:
make clean
bash /Tools/setup/ubuntu.sh
Start QgroundControl
QGroundControl-x86_64.AppImage
make px4_sitl gz_x500
"
can you please specify what to do? a little elaboration will help me to complete. also, please let me know if following the docs will be enough to start the px4. thank you…
I don’t understand what you did, or what happened.
Following the docs may be enough to start px4 on Ubuntu 24.04. I don’t know.
I have merely listed what I did to get a working result that I am happy with.
I edited ~/PX4-Autopilot/Tools/setup/ubuntu.sh
and
~/PX4-Autopilot//Tools/setup/requirements.txt
This editing may not be necessary - up to you.
If you want a python virtual environment which is contained inside the PX4-Autopilot folder, “open in terminal” the PX4-Autopilot folder and type
python3 -m venv ./pyenv
source ./pyenv/bin/activate