Gazebo | Ignition | Community
Ask Your Question

Loading a URDF file from a World Plugin (gazebo without ROS)

asked 2018-11-15 08:45:27 -0500

kincurt gravatar image


I am using gazebo to perform some robotics simulations. To this purpose I am using a Model Plugin to control my model and want to use a World Plugin to spawn the scenario of the simulation. Doing it this will allow me in the future to easily run several different scenario easily.

The problem is that my models are .urdf files and it seems that the Wolrd class only allows to insert .sdf files.

I tried using commands like gz sdf -p to convert the files but without succes, when I try to load them I always get this kind of errors while testing the spawn with gz model

[Err] [] URI doesn't exist[package://robot/model/materials/scripts/robot.material]


[Err] [] Unable to download model[model://robot/model/meshes/Waist.STL]

The corresponding lines in the .urdf would be:

   <gazebo reference="Leg">


<geometry name="Waist_visual">
    <mesh filename="package://robot/model/meshes/Waist.STL" scale="0.03937 0.03937 0.03937"/>

It should be noted that the models were previously spawned with ROS, but I decided to stop using it and only use the gazebo API which is less heavy to use.

Do you know if there is a way of directly spawning .urdf models with a World Plugin or if not a way of doing it without ROS?

Thanks for your help!

edit retag flag offensive close merge delete


I didn't mention, I run with gazebo 7.14

kincurt gravatar imagekincurt ( 2018-11-15 16:50:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-11-16 08:26:09 -0500

wentz gravatar image

The Problem is related to the answer of this question

In addition: you are using the keyword package: which is related to ROS Packages. Gazebo can't use them. I recommend you to export your GAZEBO_MODEL_PATH and change the "package:" to "model:"

export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/path/to/your/package
edit flag offensive delete link more


Thank you!!!!!!!

JeBear76 gravatar imageJeBear76 ( 2022-09-23 06:14:44 -0500 )edit

Question Tools

1 follower


Asked: 2018-11-15 08:41:53 -0500

Seen: 942 times

Last updated: Nov 16 '18