Using a Custom World Environment in PX4 v1.16

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

ninja: error: unknown target ‘gz_x500_ionic’
make: *** [Makefile:232: px4_sitl] Error 1

(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.

Preflight fails due to
WARN [health_and_arming_checks] Preflight Fail: Strong magnetic interference

Is this an issue with the referenced world model file 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.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.