PX4 and QGC Startup In Invalid State

I simply start QGC and then PX4 with gazebo and the x500 vehicle;
and the system is already in a “Not Ready” state.

PX4 Output

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.

{'supported': ['MAV_CMD_NAV_RETURN_TO_LAUNCH',
               'MAV_CMD_NAV_LAND',
               'MAV_CMD_NAV_TAKEOFF',
               'MAV_CMD_NAV_LAND_LOCAL',
               'MAV_CMD_DO_ORBIT',
               'MAV_CMD_NAV_ROI',
               'MAV_CMD_NAV_VTOL_TAKEOFF',
               'MAV_CMD_DO_SET_MODE',
               'MAV_CMD_DO_CHANGE_SPEED',
               'MAV_CMD_DO_SET_HOME',
               'MAV_CMD_DO_FLIGHTTERMINATION',
               'MAV_CMD_DO_CHANGE_ALTITUDE',
               'MAV_CMD_DO_SET_ACTUATOR',
               'MAV_CMD_DO_LAND_START',
               'MAV_CMD_DO_GO_AROUND',
               'MAV_CMD_DO_SET_ROI_LOCATION',
               'MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET',
               'MAV_CMD_DO_SET_ROI_NONE',
               'MAV_CMD_DO_SET_ROI',
               'MAV_CMD_DO_AUTOTUNE_ENABLE',
               'MAV_CMD_PREFLIGHT_CALIBRATION',
               'MAV_CMD_PREFLIGHT_STORAGE',
               'MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN',
               'MAV_CMD_DO_SET_STANDARD_MODE',
               'MAV_CMD_MISSION_START',
               'MAV_CMD_COMPONENT_ARM_DISARM',
               'MAV_CMD_RUN_PREARM_CHECKS',
               'MAV_CMD_GET_HOME_POSITION',
               'MAV_CMD_GET_MESSAGE_INTERVAL',
               'MAV_CMD_SET_MESSAGE_INTERVAL',
               'MAV_CMD_REQUEST_MESSAGE',
               'MAV_CMD_REQUEST_PROTOCOL_VERSION',
               'MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES',
               'MAV_CMD_REQUEST_STORAGE_INFORMATION',
               'MAV_CMD_REQUEST_FLIGHT_INFORMATION',
               'MAV_CMD_LOGGING_START',
               'MAV_CMD_LOGGING_STOP',
               'MAV_CMD_CONTROL_HIGH_LATENCY',
               'MAV_CMD_FIXED_MAG_CAL_YAW',
               'MAV_CMD_EXTERNAL_POSITION_ESTIMATE',
               'MAV_CMD_EXTERNAL_WIND_ESTIMATE'],
 'unknown': ['MAV_CMD_DO_FIGURE_EIGHT',
             'MAV_CMD_NAV_DELAY',
             'MAV_CMD_DO_DIGICAM_CONTROL',
             'MAV_CMD_DO_MOUNT_CONFIGURE',
             'MAV_CMD_DO_MOUNT_CONTROL',
             'MAV_CMD_DO_SET_CAM_TRIGG_DIST',
             'MAV_CMD_DO_GRIPPER',
             'MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL',
             'MAV_CMD_DO_MOUNT_CONTROL_QUAT',
             'MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS',
             'MAV_CMD_PREFLIGHT_UAVCAN',
             'MAV_CMD_OBLIQUE_SURVEY',
             'MAV_CMD_ACTUATOR_TEST',
             'MAV_CMD_CONFIGURE_ACTUATOR',
             'MAV_CMD_INJECT_FAILURE',
             'MAV_CMD_START_RX_PAIR',
             'MAV_CMD_REQUEST_CAMERA_INFORMATION',
             'MAV_CMD_SET_CAMERA_MODE',
             'MAV_CMD_SET_CAMERA_ZOOM',
             'MAV_CMD_SET_CAMERA_FOCUS',
             'MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW',
             'MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE',
             'MAV_CMD_DO_TRIGGER_CONTROL',
             'MAV_CMD_DO_VTOL_TRANSITION',
             'MAV_CMD_PAYLOAD_PREPARE_DEPLOY',
             'MAV_CMD_PAYLOAD_CONTROL_DEPLOY',
             'MAV_CMD_DO_WINCH'],
 'unsupported': ['MAV_CMD_NAV_WAYPOINT',
                 'MAV_CMD_NAV_LOITER_UNLIM',
                 'MAV_CMD_NAV_LOITER_TURNS',
                 'MAV_CMD_NAV_LOITER_TIME',
                 'MAV_CMD_NAV_TAKEOFF_LOCAL',
                 'MAV_CMD_NAV_FOLLOW',
                 'MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT',
                 'MAV_CMD_NAV_LOITER_TO_ALT',
                 'MAV_CMD_DO_FOLLOW',
                 'MAV_CMD_DO_FOLLOW_REPOSITION',
                 'MAV_CMD_NAV_PATHPLANNING',
                 'MAV_CMD_NAV_SPLINE_WAYPOINT',
                 'MAV_CMD_NAV_VTOL_LAND',
                 'MAV_CMD_NAV_GUIDED_ENABLE',
                 'MAV_CMD_NAV_PAYLOAD_PLACE',
                 'MAV_CMD_NAV_LAST',
                 'MAV_CMD_CONDITION_DELAY',
                 'MAV_CMD_CONDITION_CHANGE_ALT',
                 'MAV_CMD_CONDITION_DISTANCE',
                 'MAV_CMD_CONDITION_YAW',
                 'MAV_CMD_CONDITION_LAST',
                 'MAV_CMD_DO_JUMP',
                 'MAV_CMD_DO_SET_PARAMETER',
                 'MAV_CMD_DO_SET_RELAY',
                 'MAV_CMD_DO_REPEAT_RELAY',
                 'MAV_CMD_DO_SET_SERVO',
                 'MAV_CMD_DO_REPEAT_SERVO',
                 'MAV_CMD_DO_RETURN_PATH_START',
                 'MAV_CMD_DO_RALLY_LAND',
                 'MAV_CMD_DO_REPOSITION',
                 'MAV_CMD_DO_PAUSE_CONTINUE',
                 'MAV_CMD_DO_SET_REVERSE',
                 'MAV_CMD_DO_SET_ROI_SYSID',
                 'MAV_CMD_DO_CONTROL_VIDEO',
                 'MAV_CMD_DO_DIGICAM_CONFIGURE',
                 'MAV_CMD_DO_FENCE_ENABLE',
                 'MAV_CMD_DO_PARACHUTE',
                 'MAV_CMD_DO_MOTOR_TEST',
                 'MAV_CMD_DO_INVERTED_FLIGHT',
                 'MAV_CMD_NAV_SET_YAW_SPEED',
                 'MAV_CMD_DO_GUIDED_MASTER',
                 'MAV_CMD_DO_GUIDED_LIMITS',
                 'MAV_CMD_DO_ENGINE_CONTROL',
                 'MAV_CMD_DO_SET_MISSION_CURRENT',
                 'MAV_CMD_DO_LAST',
                 'MAV_CMD_DO_UPGRADE',
                 'MAV_CMD_OVERRIDE_GOTO',
                 'MAV_CMD_ILLUMINATOR_ON_OFF',
                 'MAV_CMD_DO_ILLUMINATOR_CONFIGURE',
                 'MAV_CMD_REQUEST_CAMERA_SETTINGS',
                 'MAV_CMD_STORAGE_FORMAT',
                 'MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS',
                 'MAV_CMD_RESET_CAMERA_SETTINGS',
                 'MAV_CMD_SET_STORAGE_USAGE',
                 'MAV_CMD_SET_CAMERA_SOURCE',
                 'MAV_CMD_SET_AT_S_PARAM',
                 'MAV_CMD_JUMP_TAG',
                 'MAV_CMD_DO_JUMP_TAG',
                 'MAV_CMD_DO_SET_SYS_CMP_ID',
                 'MAV_CMD_DO_SET_GLOBAL_ORIGIN',
                 'MAV_CMD_IMAGE_START_CAPTURE',
                 'MAV_CMD_IMAGE_STOP_CAPTURE',
                 'MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE',
                 'MAV_CMD_CAMERA_TRACK_POINT',
                 'MAV_CMD_CAMERA_TRACK_RECTANGLE',
                 'MAV_CMD_CAMERA_STOP_TRACKING',
                 'MAV_CMD_VIDEO_START_CAPTURE',
                 'MAV_CMD_VIDEO_STOP_CAPTURE',
                 'MAV_CMD_VIDEO_START_STREAMING',
                 'MAV_CMD_VIDEO_STOP_STREAMING',
                 'MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION',
                 'MAV_CMD_REQUEST_VIDEO_STREAM_STATUS',
                 'MAV_CMD_AIRFRAME_CONFIGURATION',
                 'MAV_CMD_PANORAMA_CREATE',
                 'MAV_CMD_ARM_AUTHORIZATION_REQUEST',
                 'MAV_CMD_SET_GUIDED_SUBMODE_STANDARD',
                 'MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE',
                 'MAV_CMD_CONDITION_GATE',
                 'MAV_CMD_NAV_FENCE_RETURN_POINT',
                 'MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION',
                 'MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION',
                 'MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION',
                 'MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION',
                 'MAV_CMD_NAV_RALLY_POINT',
                 'MAV_CMD_UAVCAN_GET_NODE_INFO',
                 'MAV_CMD_DO_SET_SAFETY_SWITCH_STATE',
                 'MAV_CMD_DO_ADSB_OUT_IDENT',
                 'MAV_CMD_ODID_SET_EMERGENCY',
                 'MAV_CMD_WAYPOINT_USER_1',
                 'MAV_CMD_WAYPOINT_USER_2',
                 'MAV_CMD_WAYPOINT_USER_3',
                 'MAV_CMD_WAYPOINT_USER_4',
                 'MAV_CMD_WAYPOINT_USER_5',
                 'MAV_CMD_SPATIAL_USER_1',
                 'MAV_CMD_SPATIAL_USER_2',
                 'MAV_CMD_SPATIAL_USER_3',
                 'MAV_CMD_SPATIAL_USER_4',
                 'MAV_CMD_SPATIAL_USER_5',
                 'MAV_CMD_USER_1',
                 'MAV_CMD_USER_2',
                 'MAV_CMD_USER_3',
                 'MAV_CMD_USER_4',
                 'MAV_CMD_USER_5',
                 'MAV_CMD_CAN_FORWARD',
                 'MAV_CMD_REQUEST_OPERATOR_CONTROL']}

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.

Thank you for addressing my questions/statements.
I will take to heart what you said.

The unsupported category makes a lot of sense now!

I greatly appreciate it!

Hi everyone,

I’m working with PX4 v1.16 SITL (the X500 Gazebo world) and trying to simulate a visual-odometry–only scenario: fly indoors, no GPS.
My plan was still in sim, it is vio based on aruco of known pose:

  1. Arm and take off with GPS still enabled (so arming succeeds).
  2. Once airborne, inject a GPS failure via MAV_CMD_INJECT_FAILURE so the EKF falls back to vision positioning.

What I see so far:

  • With SYS_FAILURE_EN = 0 I do get a COMMAND_ACKDENIED (as expected, the guard is off).
  • After setting SYS_FAILURE_EN = 1 (and rebooting) the command returns no ACK at all. It looks as if “GPS failure” is unknown to the firmware.

My questions

  1. Where can I find the up-to-date list of mav commands that PX4 currently accepts, versus those that are unsupported or simply unknown? Weirdly I have failure in px4 console but the attached mavlink command is unknown ?
  • I’ve seen scattered mentions in the developer guide, but no definitive table.
  1. Is the set of supported failures expected to grow (e.g. GPS OFF, STUCK, etc.) in future releases?
  2. If GPS failure really isn’t implemented yet, what’s the recommended way to arm and fly with vision only in SITL?
  • I tried setting COM_ARM_WO_GPS along with SYS_HAS_GPS at 0, but SITL still refuses to arm because the no global position. My VIO need at least 1 aruco in its vision so be 2.5 m high.

Should I just sensor_gps_sim stop does not anything uorb top still show sensor gps


Environment

  • PX4 v1.16 (fresh build from the v1.16 tag)
  • make px4_sitl gazebo X500 SYS_FAILURE_EN=1

Any pointers to documentation, code pointers, or example workflows would be really appreciated.
Thanks a lot!