make px4_sitl gz_x500
[0/1] cd /home/afoster/PX4-Autopilot/build/px4_sitl_default/src/modules/simulation/gz_bridge && /usr/b...E env PX4_SIM_MODEL=gz_x500 GZ_IP=127.0.0.1 /home/afoster/PX4-Autopilot/build/px4_sitl_default/bin/px4
______ __ __ ___
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/
px4 starting.
INFO [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
INFO [init] found model autostart file as SYS_AUTOSTART=4001
INFO [param] selected parameter default file parameters.bson
INFO [param] importing from 'parameters.bson'
INFO [parameters] BSON document size 554 bytes, decoded 554 bytes (INT32:18, FLOAT:9)
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] Starting gazebo with world: /home/afoster/PX4-Autopilot/Tools/simulation/gz/worlds/default.sdf
INFO [init] Starting gz gui
INFO [init] Waiting for Gazebo world...
INFO [init] Gazebo world is ready
INFO [init] Spawning model
INFO [gz_bridge] world: default, model: x500_0
INFO [lockstep_scheduler] setting initial absolute time to 3604000 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: No connection to the ground control station
INFO [uxrce_dds_client] init UDP agent IP:127.0.0.1, port:8888
INFO [tone_alarm] home set
INFO [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
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-05-09/17_31_04.ulg
INFO [logger] Opened full log file: ./log/2025-05-09/17_31_04.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> INFO [mavlink] partner IP: 127.0.0.1
ERROR [sensors] Accel #0 fail: TIMEOUT!
ERROR [mavlink] vehicle_command_ack lost, generation 3 -> 24
ERROR [mavlink] vehicle_command_ack lost, generation 3 -> 24
ERROR [mavlink] vehicle_command_ack lost, generation 3 -> 24
ERROR [mavlink] vehicle_command_ack lost, generation 3 -> 24
WARN [health_and_arming_checks] Preflight Fail: Strong magnetic interference
WARN [health_and_arming_checks] Preflight Fail: Strong magnetic interference
That’s weird. If you can still reproduce I think worth a cross link to discord in the #maintainer channel, indicating which version of PX4 you are simulating. Also confirming the OS in which you are running.
Thank you for responding!
I have been slogging through ROS2 and have a lot of questions!
I wish that there was someone to run them by.
In this case, I think that PX4 or QGC had become corrupted.
I nuked them and re-installed the QGC image, and re-did the PX4 git clone …
After that, the problem seems to have gone away.
Although I do get a lot of “Already above takeoff altitude” errors that can be nasty and tricky to work around.
I also get a lot of unsupported command in the logs when I try to publish loiter (and some other) commands using ROS2 and VehicleCommand msgs.
And, to answer some of the questions.
I am running ubuntu inside WSL on a windows 11 OS.
PX4 is the latest, or very close to the latest at the time of the post (I actually cannot find the PX4 version in the output) .
Yeah, reinstall sounds sensible. I use WSL on windows 11 too. When posting worth saying if you’re using a release or recent main just so people are on the same page.
Although I do get a lot of “Already above takeoff altitude” errors that can be nasty and tricky to work around.
If they are happening when you are doing nothing and you can reproduce that is IMO a bug worth posting. But I’d do it as a separate thing - perhaps as post on discord - “do others see this”.
I also get a lot of unsupported command in the logs when I try to publish loiter (and some other) commands using ROS2 and VehicleCommand msgs.
Depending on your vehicle that may well be correct. PX4 does not support every command you might expect, and in some cases it doesn’t report back things it does support.
Mavlink testing shows the following set should work with Gazebo simulator on X500 as commands - supported means the commands returned something, unsupported means they ack with unsupported. The remainder ack with nothing, which means that the things are supported, but for some reason the command isn’t handled with a response. This is a bug - it might happen, for example, if you send a camera message with no camera attached - PX4 knows it is supported, but the module that would handle the response isn’t loaded.
I have been slogging through ROS2 and have a lot of questions!
I wish that there was someone to run them by.
I suggest you create a thread for your questions here, then cross link to discord ROS 1 / ROS 2 channel if you don’t get responses. Make sure you read the tutorials first of course. If you then don’t get a response you ping me here and I’ll see if I can link someone in.
ROS con is in Singapore this year if you’re local to that. These forums are more specific to PX4 though.
PS I know no more than the docs say. Not the right person to help in general.