
Hello there,
I have quite a confusing problem. I created a custom Gazebo world that I am able to launch via:
$ gazebo /home/georg/catkin_ws/src/ml/worlds/chapter1_3.world
as well as with:
$ roslaunch gazebo_ros empty_world.launch world_name:="/home/georg/catkin_ws/src/ml/worlds/chapter1_3.world"
but with the following launchfile I can't manage
<launch>
<arg name="world_file" default="$(find ml)/worlds/chapter1_3.world"/>
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<arg name="extra_gazebo_args" default="--verbose"/>
<include file="<span class="math-container">$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$</span>(arg world_file)"/>
<arg name="paused" value="<span class="math-container">$(arg paused)"/>
<arg name="use_sim_time" value="$</span>(arg use_sim_time)"/>
<arg name="gui" value="<span class="math-container">$(arg gui)"/>
<arg name="headless" value="$</span>(arg headless)"/>
<arg name="debug" value="<span class="math-container">$(arg debug)"/>
<arg name="extra_gazebo_args" value="$</span>(arg extra_gazebo_args"/>
</include>
</launch>
And I can use roscd mlto navigate to /home/georg/catkin_ws/src/ml.
Originally posted by GeorgNo on ROS Answers with karma: 183 on 2021-02-05
Post score: 1
Original comments
Comment by skpro19 on 2021-02-05:
What is the error that you are getting?
Comment by GeorgNo on 2021-02-05:
None, it just spawns the empty world.
Comment by GeorgNo on 2021-02-05:
After adding: <arg name="verbose" value="true"/> inside the include tag I can see the following error:
[Wrn] [SystemPaths.cc:459] File or path does not exist [""] [$(arg]
[Err] [Server.cc:444] Could not open file[$(arg]
[Wrn] [Server.cc:359] Falling back on worlds/empty.world
Replaced $(find ml)/worlds/chapter1_3.world with the absolute path and still the same error.
However if I run roslaunch gazebo_ros empty_world.launch verbose:="true" world_name:="/home/georg/catkin_ws/src/ml/worlds/chapter1_3.world the world spawns.