Home | Tutorials | Wiki | Issues
Ask Your Question
0

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

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

kincurt gravatar image

Hi,

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] [RenderEngine.cc:484] URI doesn't exist[package://robot/model/materials/scripts/robot.material]

or

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

The corresponding lines in the .urdf would be:

   <gazebo reference="Leg">
    <visual>
      <material>
        <script>
          <uri>package://robot/model/materials/scripts/robot.material</uri>
          <name>robot/darkgrey</name>
        </script>
      </material>
    </visual>
  </gazebo>

and

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

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

Comments

I didn't mention, I run with gazebo 7.14

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

1 Answer

Sort by ยป oldest newest most voted
1

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

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
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 65 times

Last updated: Nov 16