Gazebo | Ignition | Community
Ask Your Question

How to use a custom mesh in .world file

asked 2014-06-24 14:54:06 -0600

JoSo gravatar image

updated 2014-06-24 14:59:05 -0600

Hi all, This is low level, as I am a noob at Gazebo and ROS. I follow the custom world build tutorial just fine and create a gas station but I want to sub in a custom mesh. The mesh was created in MeshLab from a .stl and I exported it as a .dae file to the /models folder in my gazebo package. The code is below for the world file, I simply replaced




but I'm not sure if this is the right format or if the file needs to be in a different folder for it to be scene. Perhaps I need to modify my package.xml or CMakeLists.txt or source something to recognize it. The full file is below along with the error produced when I run


from my package path

> <?xml version="1.0" ?>
<sdf version="1.4">
  <world name="default">
    <model name="hardhat">
       <pose>0 0 0  0 0 0</pose>
      <link name="body">
        <visual name="visual">

The error:

> Error [] File or path does not exist[""]
Error [] No mesh specified

Any and all help is appreciated. Kinda need to spell it out for me. Thanks for your time, guys.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-06-24 15:07:18 -0600

JoSo gravatar image

Sorry guys, answered my own question. I only needed the line to be


and have the file inside my /worlds folder with my .world xml

Thanks. Don't worry there will be plenty of other stupid questions to answer!

edit flag offensive delete link more


I believe a full system path would have also worked, file:///home/foo/worlds/bar.dae, just not the tilde, and maybe have worked from roslaunch also- but no package:// support which would be nice.

Lucas Walter gravatar imageLucas Walter ( 2014-12-03 16:27:53 -0600 )edit
Login/Signup to Answer

Question Tools


Asked: 2014-06-24 14:54:06 -0600

Seen: 2,963 times

Last updated: Jun 24 '14