Cannot start gazebo simulation besides gz_xxx

Hello everyone,

I’m trying to conduct tests of takeoff_without_navigation flight mode, which was created recently by one of the developers. When manually changing flight mode in pxh terminal during takeoff without GPS data everything works fine (plane reaches desired altitude and then triggers another flight mode), but I want to simulate takeoff with catapult launch.

Problem is my gazebo simulation works only when building with
make px4_sitl gz_xxx (i.e. gz_advanced_plane, gz_cessna).
When I’m trying to build it with every other command, especially with gazebo-classic_plane_catapult, it won’t work (tried many combinantions and models from gazebo-classic). I’ve seen Tools/simulation folder and saw that gz has inside models I’m using, but gazebo-classic is almost empty with bash scripts only and when trying to run setup_gazebo it requires to be sourced and not run directly.

Question is how to build gazebo simulation other than gz_xxx - is sourcing somewhere setup_gazebo script is the right way and if yes, where should I do it?

As far as I tested default sitl drones are strongly coupled with the simulator. Since there is no gz_plane_catapult, you will have to write an autostart yourself and rebuild the px4 project if you are using gz garden or harmonic (not sure if fortress/ign would support gz series sitl by px4).
Alternatively, I would suggest to have a look at Gazebo Simulation | PX4 Guide (main) , and try start pxh directly by the px4 sitl binary you built. This gives me better documented usage than make sitl. If you do use a classic gazebo (i.e. start simulator by typing gazebo instead of gz or ign), try setting the PX4_SIM_MODEL with the ones you’ve downloaded, usually at ~/.gazebo, as well as PX4_SIMULATOR