I added my custom world env to Tools/simulation/gz/worlds and I opened the sdf file using my gz sim and it works, now using make px4_sitl gz_x500_ionic(ionic is my custom world) gives the error of
(it does work when I use px4_sitl gz_x500_baylands for instance)The gazebo world and drone do spawn in gazebo when I run PX4_GZ_WORLD=ionic make px4_sitl gz_x500_depthbut the preflight checks keeps failing and it never becomes ready for takeoff which isn’t custom world specific but doesn’t work with existing world environments either.
You can’t build gz_x500_ionic directly — just use PX4_GZ_WORLD=ionic make px4_sitl gz_x500, and if preflight fails it’s usually missing sensor topics, not the world itself.
That warning isn’t about the world file — it’s coming from the simulated magnetometer. In custom worlds the mag can end up uninitialized or noisy, so either adjust the MAG_DECL/sensor params or disable the mag checks for testing.