0
$\begingroup$

I am struggling to load my dae world in gazebo using a launch file.

I have a dae file containing an apartment called apartment.dae. I have a simple world file called apartment.world calling the dae file, like shown below

<?xml version="1.0"?>
<sdf version="1.4">
  <world name="default">
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <include>
      <uri>model://sun</uri>
    </include>
    <model name="my_mesh">
      <pose>0 0 0  1.5708 0 0</pose>
      <static>true</static>
      <link name="body">
        <visual name="visual">
          <geometry>
            <mesh><uri>file://apartment.dae</uri></mesh>
          </geometry>
        </visual>
      </link>
    </model>
  </world>
</sdf>

When I call the world using gazebo apartment.world everything works fine.

Now I want a launch file like the following the launch my .world and with it my .dae.

<launch>
  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find buildon_main)/apartment.world"/> 
    <arg name="paused" value="false"/>
    <arg name="use_sim_time" value="true"/>
    <arg name="gui" value="true"/>
    <arg name="recording" value="false"/>
    <arg name="debug" value="false"/>
  </include>
</launch>

But all I get is an empty world.

I'm pretty sure, to know the problem, but I can't solve it. I think when the launch file takes the apartment.world it tries to find the apartment.dae in it in relation to the gazebo_ros package. Obviously without success. But now I don't know how to give it the right path, since the .world file doesn't seem to have a function like the $(find gazebo_ros) in the launch file.

I am grateful for any advice or if someone could lead me in the right direction. Best regards! Elias

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.