How to run px4 sitl with custom world?

I made a custom world in gazebo and saved it to sitl_gazebo/worlds. How to run make px4_sitl with the custom world? I tried make px4_sitl gazebo_iris__[custom world] but it said unknown target.

@Rayhan You need to add the target to sitl_target.cmake


Thanks, that works. Anyway then when I tried to run it, the gazebo stuck on loading “preparing your world” with black blank screen like this.

Is the problem came from my .world file?

Yes, it is most likely that it can’t find resources you included in your world file

1 Like

place the asset folder in your /models folder, and update the name of your world in the sitl_target.cmake.

Then build px4 by make px4_sitl gazebo__world