Gazebo | Ignition | Community
Ask Your Question

Can't find model database when roslaunch'd, but can find it when Gazebo is run by itself.

asked 2015-02-04 13:16:24 -0600

Ben B gravatar image

updated 2015-02-13 18:30:17 -0600

I have a robot model (wam), launch file, and world file. When I run Gazebo by itself, I see the robot model show up in the "insert" menu and I can drop it in without problem. However, when I try to roslaunch my launch file, I get Error [] Unable to find uri[model://wam_description] . Not only that, but all of a sudden I can no longer see the robot in the "insert" menu (I can't see any of my robots. Only the .gazebo folder and the online database).

Any advice on how to get this roslaunch working?

I'm using Gazebo 4 and am running ROS Indigo.

I have a catkin workspace in ~/path/ros_stuff.

In ros_stuff, I have a number of gazebo model directories, but the relevant ones are: wam_gazebo and wam_description.

Within wam_gazebo I have:


Within wam_description I have:

  ... a bunch of stl files.

in my .bashrc:

export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/path/ros_stuff/src/
source /opt/ros/indigo/setup.bash
source ~/path/ros_stuff/devel/setup.bash

Edit: I can succesfully roslaunch gazebo_ros empty_world.launch but my model directory (ros_stuff) still doesn't show up in the "insert" menu.

Bug confirmed. Workaround: Others have no confirmed this bug in the ticket that Jose posted. As a workaround until it's fixed, one can copy their models to the ~/.gazebo folder and they'll show up even when roslaunch is used.

edit retag flag offensive close merge delete


Does roslaunch preserve environment variables?

scpeters gravatar imagescpeters ( 2015-02-04 18:36:57 -0600 )edit

See my comment on Nate's comment. It doesn't seem to actually change the value in the environment.

Ben B gravatar imageBen B ( 2015-02-05 16:23:25 -0600 )edit

Maybe the folks would have some betting insight into this? Have you posted this there as well?

scpeters gravatar imagescpeters ( 2015-02-05 16:53:35 -0600 )edit

Can you post the contents of your launch file, or at least the part of the launch file which launches gazebo?

William gravatar imageWilliam ( 2015-02-11 12:43:47 -0600 )edit

William, this happens even when I roslaunch the standard empty_world.

Ben B gravatar imageBen B ( 2015-02-13 03:00:00 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2015-02-10 21:26:04 -0600

Jose Luis Rivero gravatar image

updated 2015-03-25 12:43:41 -0600

I was able to reproduce the issue. It is not present if you don't use the roslaunch command.

I've created an issue to track it down and fix our current tutorial.

Thanks Ben for reporting.

Update 25/03/2015: this has been fixed and released for gazebo 4.1.2 and 5.1.0

edit flag offensive delete link more



answered 2015-03-02 10:32:21 -0600

Hi, I am experiencing the same issue. I have updated GAZEBOMODELPATH and GAZEBOPLUGINSPATH with my other folders. When I launch gazebo itself I saw my models, launching the roslaunch version not. I am using Gazebo 5.0.

edit flag offensive delete link more


We have fixed this if you build gazebo_4.1, gazebo5, or default branch, but the fix is not yet in any debian packages.

scpeters gravatar imagescpeters ( 2015-03-03 01:54:58 -0600 )edit

answered 2015-02-05 09:32:55 -0600

nkoenig gravatar image

I tried the following:

  1. Create a directory structure: mkdir -p ~/path/ros_stuff/src
  2. Copy in a model: cp ~/.gazebo/models/pr2 ~/path/ros_stuff/src
  4. Run gazebo, and the ros_stuff path is in the insert tab.

Can you try that experiment? If it works, then chances are high the GAZEBO_MODEL_PATH is being changed or overwritten by something.

edit flag offensive delete link more


Indeed, this works (ros_stuff is in the insert tab). However running echo $GAZEBO_MODEL_PATH before, during (using a & after the command), and after running roslaunch gazebo_ros empty_worlds.launch all yield ~/path/ros_stuff/src. But with the roslaunch, the database still isn't visible.

Ben B gravatar imageBen B ( 2015-02-05 16:22:05 -0600 )edit

Can you try running gazebo with verbose turned on? You'll have to modify the launch file to pass gazebo the "--verbose" command line argument. Look for messages in red.

nkoenig gravatar imagenkoenig ( 2015-02-05 18:22:43 -0600 )edit

I tried running roslaunch gazebo_ros empty_world.launch extra_gazebo_args:="--verbose" (which I think should work, no? If not, how do I pass this argument?) And there's nothing red, or anything about the model path/.

Ben B gravatar imageBen B ( 2015-02-05 19:36:03 -0600 )edit

Nate, do you also have ROS installed? If you use roslaunch to launch empty_worlds, or whatever else, do you lose your non- ~/.gazebo databases?

Ben B gravatar imageBen B ( 2015-02-05 19:41:14 -0600 )edit

I have to test that particular case a bit more.

nkoenig gravatar imagenkoenig ( 2015-02-11 12:00:33 -0600 )edit
Login/Signup to Answer

Question Tools


Asked: 2015-02-04 13:16:24 -0600

Seen: 5,640 times

Last updated: Mar 25 '15