Hi everyone,
I’m new with you here, recently i switched fom gazebo calssic to gazebo harmonic I’m currently integrating a custom indoor environment into PX4 + Gazebo Harmonic. The environment comes from this repo: GitHub - projectrobotplayground/warehouse_sim: Warehouse simulation models. Built on top of the ARIAC competition environment (https://bitbucket.org/osrf/ariac)
I converted the warehouse model into .sdf format to use it with (Gz v8.9). My goal is to simulate the gz_x500 drone flying inside this indoor warehouse.
Here’s what works:
- Running gz_x500 with the default forest world works perfectly:
PX4_GZ_MODEL=x500 PX4_GZ_WORLD=forest make px4_sitl gz_x500
- When it with the warehouse world i get this :
~/PX4-Autopilot$ PX4_GZ_WORLD=wrehouse make px4_sitl gz_x500
[0/1] cd /home/soheib/PX4-Autopilot/build/px4.../PX4-Autopilot/build/px4_sitl_default/bin/px4
______ __ __ ___
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/
px4 starting.
INFO [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
INFO [init] found model autostart file as SYS_AUTOSTART=4001
INFO [param] selected parameter default file parameters.bson
INFO [param] importing from 'parameters.bson'
INFO [parameters] BSON document size 312 bytes, decoded 312 bytes (INT32:13, FLOAT:3)
INFO [param] selected parameter backup file parameters_backup.bson
INFO [dataman] data manager file './dataman' size is 1208528 bytes
INFO [init] Gazebo simulator 8.9.0
INFO [init] Starting gazebo with world: /home/soheib/PX4-Autopilot/Tools/simulation/gz/worlds/wrehouse.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...
- So what i did i launched the custom
warehouse.sdf
world manually:
gz sim ~/PX4-Autopilot/Tools/simulation/gz/worlds/warehouse.sdf
- Then, in another terminal:
PX4_GZ_MODEL=x500 PX4_GZ_WORLD=warehouse make px4_sitl gz_x500
This setup successfully spawns the x500 inside the warehouse world.
- This setup successfully spawns the x500 inside the warehouse world , but cannot arm due to health check failures. commander takeoff returns:
pxh> commander takeoff
pxh> WARN [commander] Arming denied: Resolve system health failures first
- Also, I confirmed that there’s no present for libgz_px4_bridge.so
Here’s the worlds model.sdf:
<?xml version="1.0" ?>
<sdf version="1.5">
<world name="default">
<!-- Set the initial camera pose to be looking at the workspace. -->
<gui fullscreen='0'>
<camera name='user_camera'>
<pose frame=''>-7.56272 4.06148 6.60308 0 0.636 -0.467992</pose>
<view_controller>orbit</view_controller>
<projection_type>perspective</projection_type>
</camera>
</gui>
<physics type="ode">
<real_time_update_rate>0</real_time_update_rate>
</physics>
<scene>
<shadows>false</shadows>
</scene>
<!-- A global light source -->
<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>
<!-- a directed light source -->
<light name="camera_spot_light" type='spot'>
<pose>14 -3.0 3.0 -1.55 0.0 -1.62</pose>
<diffuse>0.5 0.5 0.5 1</diffuse>
<specular>0.1 0.1 0.1 1</specular>
<direction>0 0 -1</direction>
<attenuation>
<range>50</range>
<constant>0.5</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<cast_shadows>0</cast_shadows>
<spot>
<inner_angle>0.6</inner_angle>
<outer_angle>1</outer_angle>
<falloff>1</falloff>
</spot>
</light>
<!-- the workcell -->
<include>
<uri>model://workcell</uri>
<pose>0 0 0 0 0 1.57</pose>
</include>
<!-- the shipping container -->
<include>
<uri>model://shipping_container_ariac</uri>
<pose>-4.85 12.5 0 0 0 0</pose>
</include>
<!-- a workcell bin -->
<include>
<uri>model://workcell_bin</uri>
<pose>-3.5 2 0 0 0 0</pose>
</include>
<!-- a yellow bin -->
<include>
<uri>model://yellow_bin_ariac</uri>
<pose>1.3 1.5 0.9 0 0 0</pose>
<name>yellow_bin_0</name>
</include>
<!-- another yellow bin -->
<include>
<uri>model://yellow_bin_ariac</uri>
<pose>1.3 3 0.9 0 0 0</pose>
<name>yellow_bin_1</name>
</include>
<!-- ground plane -->
<model name="ground_plane">
<static>true</static>
<pose>-50 50 -0.01 0 0 0</pose>
<link name="link">
<visual name="visual">
<cast_shadows>false</cast_shadows>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>150 150</size>
</plane>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
</model>
</world>
</sdf>
I’m looking for the correct way to automatically build or load the libgz_px4_bridge.so plugin when using PX4 with Gazebo Harmonic. With my custom warehouse world, even when I manually launch Gazebo first and the x500 spawns, PX4 doesn’t allow arming or takeoff due to missing health checks. Any advice on fully integrating this world into PX4 SITL with proper sensor simulation, bridge loading, and automatic model spawning would be greatly appreciated.
Thanks in advance!