Adding a new world with gz_x500

Hello,

I developed a new world file. Do I follow the steps in this following link to incorporate to PX4? I want to be able to start gz-x500 with the new world file.

Thank you,

Mustafa

Hello,

I followed the steps described in the following link.

I executed

PX4_GZ_WORLD=warehouse make px4_sitl gz_x500

Startup gets to a point and prints our “Unable to find or download file”. Is there debug print so that it prints more messages? I don’t know which file is it looking for?

INFO [init] Starting gazebo with world: /home/t470/git/PX4-Autopilot/Tools/simulation/gz/worlds/warehouse.sdf
INFO [init] Starting gz gui
Unable to find or download file
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…
INFO [init] Waiting for Gazebo world…

Mustafa

Hello,

I was able to sort out the Unable to find or download file issue. I believe It was the xml encoding issue. It was ASCII and version was 1.7. I copied from another source and neglected to change to UTF-8 and 1.9. Now I am able to open the world.

<?xml version="1.0" encoding="UTF-8"?>

However I am seeing this following message

INFO [init] Starting gazebo with world: /home/t470/git/PX4-Autopilot/Tools/simulation/gz/worlds/warehouse.sdf
INFO [init] Starting gz gui
Warning [Utils.cc:132] [/sdf/world[@name=“warehouse”]/physics/gravity:/home/t470/git/PX4-Autopilot/Tools/simulation/gz/worlds/warehouse.sdf:L8]: XML Element[gravity], child of element[physics], not defined in SDF. Copying[gravity] as children of [physics].

Please refer to screen capture. I don’t see the vehicle even though it is showing in Entity Tree. Would you please let me know how I should troubleshot this?

Mustafa

Hello,

I was able to fix the warning issue. The gravity tag needs to be outside of physics tag. I also replaced libgz-sim libraries with gz-sim in plugin e.g.

<plugin name="gz::sim::systems::Imu" filename="gz-sim-imu-system"/>
<!--<plugin name="gz::sim::systems::NavSat" filename="libgz-sim-navsat-system.so"/>-->
<plugin name="gz::sim::systems::NavSat" filename="gz-sim-navsat-system"/>