Home | Tutorials | Wiki | Issues
Ask Your Question

gazebo does not load simple model

asked 2018-08-11 04:11:31 -0500

Subodh Malgonde gravatar image

updated 2018-08-12 03:53:50 -0500

I created a simple .world file:

<?xml version="1.0"?>
<sdf version="1.4">
    <world name="office">


My launch file also adds a robot to this world. It launches fine in gazebo, I can see the gray ground plane with grid markings on it and also my robot. image description

Next I created a simple building layout (some walls created using Gazebo's building editor). I saved the building model and added these lines to my .world file:

    <pose>25 20.2 0 0 0 0</pose>

When I launch the file again, this time it takes ages to launch. I see a 'Preparing your world ...' screen for a long time (~10 mins): image description

and then I see this dark screen:

image description

Other solutions which I have tried and did not work for me are:

  1. Adding the following code to the package's package.xml

       <gazebo_ros gazebo_model_path="${prefix}/models"/>
       <gazebo_ros gazebo_media_path="${prefix}/models"/>
  2. Adding the environment variable GAZEBO_MODEL_PATHto my .bashrc file:

    export GAZEBO_MODEL_PATH=/home/my_user/my_catkin_ws/src/

There are no errors thrown in the terminal. What am I doing wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-12 02:52:21 -0500

Subodh Malgonde gravatar image

I placed the model files in the ~/.gazebo/models directory and changed the code in the .world file to:

    <pose>25 20.2 0 0 0 0</pose>

Its working fine now. However I still don't know how to provide a reference to models which are not in the ~/.gazeo/models directory.

edit flag offensive delete link more


What is the output of "echo $GAZEBO_MODEL_PATH"?

Raskkii gravatar imageRaskkii ( 2018-08-13 04:49:48 -0500 )edit

This environment variable is not set by ROS. So the output is blank. After I set it in `.bashrc`, I get the output. However it did not fix my problem.

Subodh Malgonde gravatar imageSubodh Malgonde ( 2018-08-23 03:05:09 -0500 )edit

Try changing the command set in .bashrc slightly: export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:/home/my_user/my_catkin_ws/src/ The difference here is that this adds your custom path to the existing model path (which should be ~/.gazebo/models) and doesn't overwrite it, allowing both paths to be used.

Raskkii gravatar imageRaskkii ( 2018-08-23 03:55:29 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-08-11 03:37:25 -0500

Seen: 3,680 times

Last updated: Aug 12 '18