Hi!
I’ve been following some old Constructsim YouTube tutorials on how to create a custom world on Gazebo, but I’m having some difficulties replicating what it shown on the video in my local machine.
So I have the same package structure as shown in the video, meaning I have a package named my_simulations, with a world file inside a world folder, and a launch file inside the launch folder (both executable)
Inside this world file I define a world with nothing but a ground plane, a sun and a postbox (an existing model inside the gazebo package, as explained in the video).
This is the world file:
<?xml version="1.0" ?>
<sdf version="1.5">
<world name="default">
<!-- A global light source -->
<include>
<uri>model://sun</uri>
</include>
<!-- A ground plane -->
<include>
<uri>model://ground_plane</uri>
</include>
<include>
<uri>model://postbox</uri>
</include>
</world>
</sdf>
And this is the launch file:
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="debug" default="false" />
<arg name="gui" default="true" />
<arg name="pause" default="false" />
<arg name="world" default="$(find my_simulations/world/empty_world.world" />
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(arg world)"/>
<arg name="debug" value="$(arg debug)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="paused" value="$(arg pause)"/>
<arg name="use_sim_time" value="true"/>
</include>
</launch>
Both exactly as shown in the tutorial.
My problem is that, when I launch this package (which launches without issues), gazebo just opens an empty world, not recognizing the one I specified with the postbox.
I’ve tried to edit the files to somehow get a different output, but there’s nothing getting included in the empty world.
I tried removing the build and devel folders also and recompiling the package, with no luck.
Could you please help me understand what’s wrong here?
Thanks in advance!