Gazebo | Ignition | Community
Ask Your Question
0

Error Code 12 Msg: Unable to find uri

asked 2021-06-15 12:17:51 -0600

sudiv gravatar image

Hi! I'm new to gazebo, I'm trying to build a world for my four wheeled bot. I followed TheConstruct tutorial, where i downloaded models from 3dwarehouse and added to world. When I tried to launch my world file I keep getting this error

Error Code 12 Msg: Unable to find uri[model://road]

and I'm unable to see my model in gazebo. I added setup.sh file as well to my bash and tried exporting GAZEBO_MODEL_PATH. my empty_world.world file:

<?xml version="1.0" ?>
<sdf version="1.5">
<world name="default">
    <!-- A global light source -->
    <include>
        <uri>model://sun</uri>
    </include>

    <include>
        <uri>model://road</uri>

    </include>  
</world>
</sdf>

my road.sdf file:

 <?xml version="1.0" ?>
 <sdf version="1.5">
 <model name="road">
 <static>true</static>
  <link name="road_link">
      <collision name="road_collision">  
     <geometry>
        <box>
            <size>10.5156 10.5156 8.7122 </size>
        </box>
    </geometry>
  </collision>

  <visual name="road_mesh">
    <cast_shadows>true</cast_shadows>
    <geometry>
        <mesh>
            <uri>model://road/meshes/model.dae</uri>
        </mesh>
    </geometry>
  </visual>
</link>
</model>
</sdf>

my launch file:

<launch>
    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="$(find m4wr_gazebo)/world/empty_world.world"/>
    </include>
</launch>

my config file:

<?xml version="1.0"?>
<model>
 <name>road</name>
 <version>1.0</version>
 <sdf version="1.5">road.sdf</sdf>
 <author>
    <name>xxxx</name>
    <email>xxxxxx@gmail.com</email>
 </author>
  <description>
    Road
  </description>
</model>

I do not understand what is the problem. Can you help me? Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-06-18 08:27:16 -0600

sudiv gravatar image

updated 2021-06-18 08:27:53 -0600

I haven't set the model paths. The problem is solved once I edited .bashrc file and added:

export GAZEBO_PLUGIN_PATH=~/<path>/my_package_example/lib:${GAZEBO_PLUGIN_PATH}

export GAZEBO_MODEL_PATH=~/<path>/my_package_example/models:${GAZEBO_MODEL_PATH}

export GAZEBO_RESOURCE_PATH=~/<path>/my_package_example/models:${GAZEBO_RESOURCE_PATH}

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-06-15 12:14:38 -0600

Seen: 279 times

Last updated: Jun 18