Open iris_with_standoffs in another package

Hello guys,

I followed this guide for sitl in gazebo.

I wanted to open iris_with_standoffs.sdf in my package (ap_ros2_test) rather than ardpilot_gazebo. So I create this packages and copied all the files and made necessary changes. But I am getting this error.
[Err] [Server.cc:203] Error Code 14: Msg: Parser configurations requested resolved uris, but uri [package://ap_ros2_test/models/iris_with_standoffs/meshes/iris.dae] could not be resolved.
[Err] [Server.cc:203] Error Code 14: Msg: Parser configurations requested resolved uris, but uri [package://ap_ros2_test/models/iris_with_standoffs/meshes/iris_prop_ccw.dae] could not be resolved.
[Err] [Server.cc:203] Error Code 14: Msg: Parser configurations requested resolved uris, but uri [package://ap_ros2_test/models/iris_with_standoffs/meshes/iris_prop_ccw.dae] could not be resolved.
[Err] [Server.cc:203] Error Code 14: Msg: Parser configurations requested resolved uris, but uri [package://ap_ros2_test/models/iris_with_standoffs/meshes/iris_prop_cw.dae] could not be resolved.
[Err] [Server.cc:203] Error Code 14: Msg: Parser configurations requested resolved uris, but uri [package://ap_ros2_test/models/iris_with_standoffs/meshes/iris_prop_cw.dae] could not be resolved.
[Err] [Server.cc:203] Error Code 9: Msg: Failed to load a world.
These are the changes made in zshrc.

export GZ_SIM_SYSTEM_PLUGIN_PATH=$HOME/ardupilot_ros2/src/ap_ros2_test/build:$GZ_SIM_SYSTEM_PLUGIN_PATH
GZ_SIM_RESOURCE_PATH=$HOME/ardupilot_ros2/src/ap_ros2_test/models:$HOME/ardupilot_ros2/src/ap_ros2_test/worlds:$GZ_SIM_RESOURCE_PATH

I noticed one more thing that it runs only in terminal, when I try to run the command in vs-code terminal it gives me this error. Command used:- gz sim -v4 -r iris_runway.sdf

Any suggestions on what the problem is and how to solve it.

Thanks

Unless you’re planning to change the iris model it shouldn’t need to be copied into another project. The problem with doing that it that any fixes or improvements to the model will not be updated in your copy. It’s usually better to just include the model from the original repo.

The model uri has the prefix package:// which suggests that you are planning to use ROS 2. In that case the Gazebo session will need to be launched with a ROS 2 launch file and the workspace will need to be sourced to resolve the location of each package. If you are not using ROS 2 and plan to launch Gazebo using the gz sim ... CLI tool, then the uri prefix should be model://.

1 Like

I don’t plan to make any changes to the iris model for now. I’ll use the original repo.
Thanks :+1:

Unless you are using ROS, ensure the main branch is checked out. The SDF to include the Iris pointing north is:

    <include>
      <uri>model://iris_with_gimbal</uri>
      <pose degrees="true">0 0 0.195 0 0 90</pose>
    </include>
1 Like