Home | Tutorials | Wiki | Issues
Ask Your Question
0

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 -0500

Ben B gravatar image

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

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 [parser.cc:528] 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:

launch/
  wam.launch
worlds/
  wam.world
CMakeLists.txt
package.xml

Within wam_description I have:

meshes/
  ... a bunch of stl files.
CMakeLists.txt
package.xml
model.config
wam.sdf

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

Comments

Does roslaunch preserve environment variables?

scpeters gravatar imagescpeters ( 2015-02-04 18:36:57 -0500 )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 -0500 )edit

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

scpeters gravatar imagescpeters ( 2015-02-05 16:53:35 -0500 )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 -0500 )edit

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

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

3 Answers

Sort by ยป oldest newest most voted
1

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

Jose Luis Rivero gravatar image

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

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

Comments

1
0

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

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
  3. Set GAZEBOMODELPATH: export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/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

Comments

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 -0500 )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 -0500 )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 -0500 )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 -0500 )edit

I have to test that particular case a bit more.

nkoenig gravatar imagenkoenig ( 2015-02-11 12:00:33 -0500 )edit
0

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

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

Comments

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 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

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

Seen: 4,304 times

Last updated: Mar 25 '15