Make posix <my_wolrd_file>


I’d like to add a copter model to my gazebo world file.
I can launch SITL simulation with default wold file (such as solo, iris and so on). I wonder how can I configure my world file to run a simulation in SITL, I didn’t find any documentation on this topic…

Does anyone has experience on this?

Thankyou in advance

1 Like

I can’t figure this out either. I know where to put my .world file, but how can I get Gazebo to start with my world?

For instance my new world file is, and I place it in the directory:


If it try

make px4_sitl gazebo_foo

it doesn’t find my world. Yet, if I ask for gazebo_tailsitter, that works OK. I grep’d around, but couldn’t find a place where the worlds were configured. What am I missing?


Stubbornness triumphs. I can now answer my own question.

It’s always best to start with a working model, so here’s how to clone the iris quadcopter world as “foo”, as the starting point for my new model.

First, the world file for Gazebo:

cd <wherever>/Firmware/Tools/sitl_gazebo/worlds

Next, the model name needs to added to the list of known models:

cd <wherever>/Firmware/platforms/posix/cmake/
<favorite editor> sitl_target.cmake

Look for the line that begins:

set(models ...

and add the model name to the list

Finally, the PX4 software needs to know something about the model:

cd <wherever>/Firmware/ROMFS/px4fmu_common/init.d-posix/
cp 10016_iris 10017_foo

I think the number in the first part of the file name just needs to be unique.

Now test it:

cd <wherever>/Firmware
make px4_sitl gazebo_foo