0

I add model into gazebo classic using the insert -> add path. However it started to overflow the tab and making the tab messy. Other than that it will not delete the path that was already deleted manually. And for some reasons, sometimes it will not renew the file under the path and causes problem for me to add new models under the same path. My Gazebo version is 11.14.0. (I know this is kinda a duplicated question of this, but it was never answered for really long time.)

brian2lee
  • 119
  • 5

1 Answers1

1

I have encountered the need to add specific model paths when including custom models in Gazebo worlds. The following two explanations will help you tidy up the paths:

  • Edit the related environment variable:

    Gazebo uses the GAZEBO_MODEL_PATH to determine where to look for models. If you've added paths, they might have been appended to this variable. You can edit or clear this variable in your shell (like ~/.bashrc) to clear it or export GAZEBO_MODEL_PATH=/new/desirable/path to set it to a new directory.

    You can know the value of this variable in shell using

    echo $GAZEBO_MODEL_PATH
    

    If you do not see the paths you want to remove, then check the next point.

  • Directly modify the configuration file:

    Gazebo stores certain model paths in a configuration file in the home directory under .gazebo/gui.ini. You can open this file in a text editor and manually edit or delete the lines of model paths you want to remove.

    After editing the file, close the terminal and open Gazebo in a new terminal environment.

I tried those solutions on my machine just before posting the anwer, and the second one did the trick. Hope this helps!

Robotawi
  • 500
  • 3
  • 7
  • Thanks, the second one works for me (Directly modify the configuration file), so weird that they added a "add path" option but forget "delete path". – brian2lee Jan 17 '24 at 15:15