Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

Gazebo looks for models in a few specific directories. The tutorial tells you to place the model inside ~/.gazebo/models because Gazebo always looks there by default (unless you made some custom installation).

If the ~/.gazebo/models directory doesn't exist, it should be fine to create it yourself. In fact, that's what the -p flag in the mkdir command in the tutorial is doing.

It's also fine to use a custom directory path as you did. But in this case, you must tell Gazebo to look there too. Gazebo checks an environment variable GAZEBO_MODEL_PATH to know where to look. You can prepend your path to that variable like this:

export GAZEBO_MODEL_PATH=/home/iclab/gazebo_models:$GAZEBO_MODEL_PATH

Note that this will only work for the current shell (terminal). To make it persistent for the next terminals you open, you can do:

echo "export GAZEBO_MODEL_PATH=/home/iclab/gazebo_models:$GAZEBO_MODEL_PATH" >> ~/.bashrc

Gazebo looks for models in a few specific directories. The tutorial tells you to place the model inside ~/.gazebo/models because Gazebo always looks there by default (unless you made some custom installation).

If the ~/.gazebo/models directory doesn't exist, it should be fine to create it yourself. In fact, that's what the -p flag in the mkdir command in the tutorial is doing.

(by the way, it looks like you already have some models in that directory, look on the top left corner of your screenshot)

It's also fine to use a custom directory path as you did. But in this case, you must tell Gazebo to look there too. Gazebo checks an environment variable GAZEBO_MODEL_PATH to know where to look. You can prepend your path to that variable like this:

export GAZEBO_MODEL_PATH=/home/iclab/gazebo_models:$GAZEBO_MODEL_PATH

Note that this will only work for the current shell (terminal). To make it persistent for the next terminals you open, you can do:

echo "export GAZEBO_MODEL_PATH=/home/iclab/gazebo_models:$GAZEBO_MODEL_PATH" >> ~/.bashrc