Can't import mesh in Gazebo world

asked 2021-08-29 14:43:09 -0500

anirban gravatar image

updated 2021-08-29 15:26:04 -0500

Hi,

I am working on a custom rospackage to spawn custom meshed models in Gazebo. The package name is person_sim. The file structure of the package is as following,

person_sim
  |->launch->environment.launch
  |->materials->...
  |->meshes-> my_mesh.world, standing.dae
  |->CMakeLists.txt
  |->package.xml

I have a custom world file which includes a mesh as model in the my_mesh.world file. The my_mesh.world file is as following,

<?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  0 0 0</pose>
      <static>true</static>
      <link name="body">
        <visual name="visual">
          <geometry>
            <mesh><uri>file://standing.dae</uri></mesh>
          </geometry>
        </visual>
      </link>
    </model>
  </world>
</sdf>

I order to check whether the mesh is working properly, I ran the following command which clearly shows the mesh in the gazebo environment.

$ roscd person_sim/meshes
$ gazebo my_mesh.world

But when I am trying to launch this my_mesh.world through roslaunch file, I do not the see the model corresponding to the mesh standing.dae at all. The roslaunch file named environment.launch that I am using is given below

<?xml version="1.0"?>
<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find person_sim)/meshes/my_mesh.world"/>
  </include>
</launch>
edit retag flag offensive close merge delete