-
Notifications
You must be signed in to change notification settings - Fork 15k
build: make appimage #25105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: make appimage #25105
Conversation
d6eab7d to
5b089e0
Compare
ed26963 to
fb9e087
Compare
|
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/px4-dev-call-june-25-2025-team-sync-and-community-q-a/46161/2 |
|
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/px4-dev-call-june-25-2025-team-sync-and-community-q-a/46161/1 |
Tested on my side on Ubuntu 24.04 and these are the outputs. |
| gperf \ | ||
| fuse \ | ||
| kconfig-frontends \ | ||
| libelf-dev \ | ||
| libexpat-dev \ | ||
| libfuse2 \ | ||
| libgmp-dev \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrpollo instead of libfuse2 and fuse, could the newer fuse3? Or is there a particular reason for using the other two?
|
@farhangnaderi the appimage needs to run with some env vars, see this test: PX4_SYS_AUTOSTART=4001 PX4_SIM_MODEL=gz_x500 ./PX4_Autopilot_SITL-x86_64.AppImage
INFO [px4] assuming working directory is rootfs, no symlinks needed.
______ __ __ ___
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/
px4 starting.
INFO [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
env SYS_AUTOSTART: 4001
INFO [param] selected parameter default file parameters.bson
INFO [param] selected parameter backup file parameters_backup.bson
SYS_AUTOCONFIG: curr: 0 -> new: 1
SYS_AUTOSTART: curr: 0 -> new: 4001
CAL_ACC0_ID: curr: 0 -> new: 1310988
CAL_GYRO0_ID: curr: 0 -> new: 1310988
CAL_ACC1_ID: curr: 0 -> new: 1310996
CAL_GYRO1_ID: curr: 0 -> new: 1310996
CAL_ACC2_ID: curr: 0 -> new: 1311004
CAL_GYRO2_ID: curr: 0 -> new: 1311004
CAL_MAG0_ID: curr: 0 -> new: 197388
CAL_MAG0_PRIO: curr: -1 -> new: 50
CAL_MAG1_ID: curr: 0 -> new: 197644
CAL_MAG1_PRIO: curr: -1 -> new: 50
SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
INFO [dataman] data manager file './dataman' size is 1208528 bytes
INFO [init] Gazebo simulator 8.9.0
INFO [init] Starting gazebo with world: /default.sdf
INFO [init] Starting gz gui
[Err] [SystemPaths.cc:534] File [/default.sdf] resolved to path [/default.sdf] but the path does not exist
[Err] [ServerPrivate.cc:631] Failed to find world [/default.sdf]
[Err] [Server.cc:86] Error Code 1: Msg: Failed to find world [/default.sdf]
INFO [init] Waiting for Gazebo world...
INFO [init] Waiting for Gazebo world...
INFO [init] Waiting for Gazebo world...
INFO [init] Waiting for Gazebo world...
INFO [init] Waiting for Gazebo world...
INFO [init] Waiting for Gazebo world...
INFO [init] Waiting for Gazebo world...all the combinations described in https://docs.px4.io/main/en/sim_gazebo_gz/#usage-configuration-options shall be available. |
|
@beniaminopozzan try running with |
|
@mrpollo [DEBUG] Running in debug mode
[DEBUG] PX4_VERSION = v1.16.0-rc1-341-g938ba6adb7
[DEBUG] STATE_HOME = /home/ubuntu/.local/state
[DEBUG] DATA_HOME = /home/ubuntu/.local/state
[DEBUG] Using cached ROMFS version v1.16.0-rc1-341-g938ba6adb7
[DEBUG] LOG_DIR = /home/ubuntu/.local/state/px4/logs
[DEBUG] Launching: /tmp/.mount_PX4_AuihPEtZ/usr/bin/px4 -w /home/ubuntu/.local/share/px4/romfs
INFO [px4] assuming working directory is rootfs, no symlinks needed.
______ __ __ ___
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/
px4 starting.
INFO [px4] startup script: /bin/sh etc/init.d-posix/rcS 0I think this is the expected behaviour. I'm running the Appimage in a docker container that does not have PX4-Autopilot cloned. Everything works nicely if the Appimage is combined with https://github.com/PX4/PX4-gazebo-models though: Prerequisites
Testing procedureTerminal 1From inside the directory where https://github.com/PX4/PX4-gazebo-models was cloned python3 simulation-gazeboTerminal 2PX4_GZ_STANDALONE=1 PX4_SYS_AUTOSTART=4001 PX4_SIM_MODEL=gz_x500 ./PX4_Autopilot_SITL-x86_64.AppImagewill produce output: ubuntu@113373fda9c9:~$ PX4_GZ_STANDALONE=1 PX4_SYS_AUTOSTART=4001 PX4_SIM_MODEL=gz_x500 ./PX4_Autopilot_SITL-x86_64.AppImage
INFO [px4] assuming working directory is rootfs, no symlinks needed.
______ __ __ ___
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/
px4 starting.
INFO [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
env SYS_AUTOSTART: 4001
INFO [param] selected parameter default file parameters.bson
INFO [param] importing from 'parameters.bson'
INFO [parameters] BSON document size 312 bytes, decoded 312 bytes (INT32:13, FLOAT:3)
INFO [param] selected parameter backup file parameters_backup.bson
INFO [dataman] data manager file './dataman' size is 1208528 bytes
INFO [init] Gazebo simulator 8.9.0
INFO [init] Standalone PX4 launch, waiting for Gazebo
INFO [init] Gazebo world is ready
INFO [init] Spawning Gazebo model
INFO [gz_bridge] world: default, model: x500_0
INFO [lockstep_scheduler] setting initial absolute time to 7500000 us
INFO [commander] LED: open /dev/led0 failed (22)
WARN [health_and_arming_checks] Preflight Fail: ekf2 missing data
WARN [health_and_arming_checks] Preflight Fail: system power unavailable
WARN [health_and_arming_checks] Preflight Fail: No connection to the ground control station
INFO [uxrce_dds_client] init UDP agent IP:127.0.0.1, port:8888
INFO [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
INFO [tone_alarm] home set
INFO [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
INFO [mavlink] mode: Gimbal, data rate: 400000 B/s on udp port 13030 remote port 13280
INFO [logger] logger started (mode=all)
INFO [logger] Start file log (type: full)
INFO [logger] [logger] ./log/2025-06-27/17_03_09.ulg
INFO [logger] Opened full log file: ./log/2025-06-27/17_03_09.ulg
INFO [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO [px4] Startup script returned successfully
pxh> WARN [health_and_arming_checks] Preflight Fail: No connection to the ground control station
WARN [health_and_arming_checks] Preflight Fail: No connection to the ground control stationand the x500 is properly spawned. @mrpollo what is your idea regarding the AppImage capabilities?
|
|
The idea is that this is a standalone instance, that is deployed in the backtground, I'm not too sure how the gz-transport works within sitl, but it's bundled in the appimage, it would be great if gazebo could be started independently and just work. |
|
Let's assume a fresh GZ Harmonic is installed.
The missing part here is the provider of the world and model files. Right now the Appimage does not contain them so you cannot do the equivalent of Do you want to run to run something like |
|
The current px4_sitl + Gazebo launcher is provided for convenience; it's, however, not a requirement. Both Gazebo and SITL should be able to coexist independently. The PX4 binary offers multiple ways to set up a vehicle; you don't always need to define it by the build target. You can also utilize environment variables or configuration files for added convenience. I'm going to look further into how Sitl and Gazebo communicate and how the wrapper launcher is currently working, so we can demystify some of its inner workings and document as much as possible. This will also enable us to utilize it conveniently for our use case. I agree that the models and worlds should be bundled in the AppImage. Do you know where they are typically stored and accessed from? |
Indeed, that's why I wanted to make sure it we want to support this in the appimage
https://docs.px4.io/main/en/sim_gazebo_gz/#usage-configuration-options covers most of the use cases.
Nice!
and the resulting gz_env.sh is sourced when px4 sim starts in non standalone mode.PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/px4-rc.gzsim Lines 40 to 46 in 2bc04f9
|
|
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/px4-dev-call-july-2-2025-team-sync-and-community-q-a/46266/4 |
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
avoids security issues in the runner Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
This makes it so its usable in ubuntu 22.04 & 24.04, otherwise we start running into dependency issues in the system for example: ``` /tmp/.mount_PX4_AuYR3Xk1/usr/bin/px4: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /tmp/.mount_PX4_AuYR3Xk1/usr/bin/px4) /tmp/.mount_PX4_AuYR3Xk1/usr/bin/px4: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /tmp/.mount_PX4_AuYR3Xk1/usr/bin/px4) ``` Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
silly me Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
Signed-off-by: Ramon Roche <[email protected]>
|
This PR was identified as stale and it will be closed in 30 days unless any activity is detected. |
|
This pull request has been automatically closed due to 120 days of inactivity. If you would like to continue, please feel free to reopen it or submit a new PR. |
Proposes an AppImage for PX4 SITL
The AppImage comes bundled with the gazebo transport shared libraries, and with all the ROMFS contents you need to run PX4 standalone. It also saves config and airframe metadata to XDG compliant directories in the user's home.
$XDG_STATE_HOME for persistant storage of logs under
$XDG_STATE_HOME/px4/logs$XDG_DATA_HOME for ROMFS contents under
$XDG_DATA_HOME/px4/romfsDirectory structures
You can download an AppImage that works in Ubuntu via CI (latest images), once you unzip you will find the AppImage.
How to use: