DONT_RUN=1 (with gz) doesn't work?

I’m new to PX4.
I use main branch, and I want to run PX4 with Gazebo garden and ROS2.
To do so, I read here ROS with Gazebo Classic Simulation | PX4 User Guide that I need to compile PX4 with the DONT_RUN=1 variable to prevent PX4 from starting.
But the command DONT_RUN=1 make px4_sitl_default gz_x500 start PX4 and Gazebo.
did I miss something ?
What is the correct way to only compile code ?

Ubuntu 22.04
PX4-Autopilot main branch (2023.05.09)
Gazebo Garden (gz sim --versions → 7.4.0)

DONT_RUN=1 does not work with Gazebo (Garden), that’s correct.
At the same time, Gazebo (Garden) does not requires additional files to be compiled (compared to Gazebo Classic which requires its plugins to be compiled.
Therefore you can compile with

make px4_sitl_default

and the launch the simulation with

make px4_sitl_default gz_x500

or with the extended instructions like

PX4_SYS_AUTOSTART=4001 PX4_GZ_MODEL=x500 ./build/px4_sitl_default/bin/px4

see Gazebo Simulation | PX4 User Guide for more examples

1 Like

Thank you, I did not understand how the make works.