Gazebo garden cannot find custom models included in the package when called from a world sdf file

when i launch the ros2 launch vrx_gz world:=/home/usman/boat_ws/src/vrx/vrx_gz/worlds/gymkhana_task.sdf from this repo for the marine simulation GitHub - osrf/vrx: Virtual RobotX (VRX) resources.
The models (i have attached folder tree of vrx_gz as well) that are inside the vrx_gz package cannot be recognized. However if i launch the “gz sim” i can spawn the models in the simulation.

Here are the error that i am getting

[ruby $(which ign) gazebo-1] [Err] [] Error Code 13: [/sdf/world[@name=“gymkhana_task”]/include[1]/uri:/home/usman/boat_ws/src/vrx/vrx_gz/worlds/gymkhana_task.sdf:L351]: Msg: Unable to find uri[coast_waves]
similar error comes for all models that are inside this folder.

Please let me know why the gazebo cannot find these models

here is the output of echo $GZ_SIM_RESOURCE_PATH

here is the version of gazebo that i am using on Ubuntu 22.04 with ROS humble.
Ignition Gazebo, version 6.11.0
Copyright (C) 2018 Open Source Robotics Foundation.
Released under the Apache 2.0 License.

1 Like

Hi Muhammad, did you manage to solve this already? I am currently facing the same problem with the same setup, and hope you might have found a solution :slight_smile:

Yes i found a solution.

If you are interested in a docker based environment than view my post at this forum

Otherwise run the following command in the workspace
colcon build --merge-install
Source your workspace and than run the following command
ros2 launch vrx_gz

The terminal will say requesting world file name. Now you need to have a internet connection connected. It will dowload some resources when you run it for the first time.

1 Like

Awesone, thanks Muhammad. That fixed it for me