Gazebo | Ignition | Community
Ask Your Question

[GUI] [Err] [] Unable to find file with URI [model://model_pkg/models/base.dae]

asked 2023-02-23 11:01:08 -0500

ryn gravatar image

updated 2023-02-23 11:04:33 -0500

Im trying to load an sdf of a model in a project structure like this:


with this this sdf:

<sdf version='1.10'>
  <model name='diff_bot'>
    <link name='base_link'>
        <pose>0 0 0 0 0 0</pose>
      <visual name='base_link_visual'>
        <pose>0 0 0 0 0 0</pose>
            <scale>1 1 1</scale>

with this bash script:


export GAZEBO_MODEL_PATH=<insert path to project here>/src/model_pkg/models:
export GAZEBO_RESOURCE_PATH=<insert path to project here>/src/model_pkg/models:

gz sim <insert path to project here>/src/model_pkg/urdf/diff_bot.sdf

However, when I try to load the model with the .bash script, I get the error in the title, and other errors all relating to not being able to find the model, base.dae. Every post ive found thus far has said editing gazebo paths to lead to the model's location would fix the error(s), but editing the bash script to export GAZEBO_MODEL_PATH and GAZEBO_RESOURCE_PATH hasn't fixed that for me.

Is there something I'm missing?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-02-24 10:52:05 -0500

azeey gravatar image

The GAZEBO_RESOURCE_PATH variable is used for Gazebo-classic. For Gazebo Garden, you need to set GZ_SIM_RESOURCE_PATH. It also needs to be the path of a directory such that starting from that directory, model_pkg/models/base.dae is valid. You can think of model:// as being replaced by one of the directories in GZ_SIM_RESOURCE_PATH. See for more details.

edit flag offensive delete link more


editing my bash script to be:


killall ruby

export GZ_SIM_RESOURCE_PATH=/home/rydb/Projects/ROS2_easy/src:

gz sim /home/rydb/Projects/ROS2_easy/src/model_pkg/urdf/diff_bot.sdf

allowed the model to load. Also, the help command for gazebo simulation, for garden, gz sim -h lists env variables at the bottom. GZ_SIM_RESOURCE_PATH might no longer work one day so look for the equivalent env variable if y'all get stuck via your gazebo's help command

ryn gravatar imageryn ( 2023-02-24 11:23:06 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2023-02-23 11:01:08 -0500

Seen: 408 times

Last updated: Feb 24