Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After another 12 hours, I've found an "alternate" solution, or the real one maybe.
Everything started from seeing this stuff about environment variables . In case the link breaks, the relevant part is

Gazebo will find your model as long as its parent path is listed on the environment variable GAZEBO_MODEL_PATH

(beware: in the link GAZEBO_MODEL_PATH is mentioned, but for me for Ignition Fortress the right one is IGN_GAZEBO_RESOURCE_PATH. You can find out yours by using ign help gazebo or similar, depending on your Gazebo/Ignition version)

Instead of the above, I've used environment hooks, found in this GitHub issue.
In the package loading the model (pkg1 in the example above) I added a folder env-hooks with a file <project_name>, in which I've put


adding every possible path I might need.
Then I made sure to hook it up adding


For reference, everything is also explained in the issue I've linked above, which points at this and this as examples. I bit of exaplanation on environment hooks is here, with more in depth explanations in the ColCon docs.

If anyone has good info for the package.xml solution, please feel free to add them here! I'll try it out to have a good reference point for both methods!