Gazebo | Ignition | Community
Ask Your Question

roslaunch gazebo_ros mars_world.launch cannot find

asked 2013-07-26 10:57:05 -0600

ynevatia gravatar image

updated 2013-07-26 18:12:23 -0600

nkoenig gravatar image


I have a question regarding the directory structure expected by gazebo_ros when launching it using roslaunch.

I am using ROS Groovy, with Gazebo 1.9 and gazeborospkgs built from source.

I have a catkin workspace with gazebo_ros, where I have copied the following launch file (into ~/gazebo_src/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/launch).

  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value=""/> <!-- Note: the world_name is with respect to GAZEBO_RESOURCE_PATH environmental variable -->
    <arg name="paused" value="false"/>
    <arg name="use_sim_time" value="true"/>
    <arg name="gui" value="true"/>
    <arg name="debug" value="false"/>

I need to keep the in a separate folder (internal/project repository) - ~/faster_dev/branches/yn/gazebo/plugin - which I have added to GAZEBO_RESOURCE_PATH. However when I try to launch gazebo with the command "roslaunch gazebo_ros mars_world.launch" I get the error that cannot be found.

I know that the works when I launch it with gazebo ("gazebo").

My environment variables are:

env | grep GAZEBO

The relevant folders are

gazebo_ros: ~/gazebo_source/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros
models: ~/faster_dev/branches/yn/gazebo/models (contains a databse.config and a number of models in subfolders)
world file: ~/faster_dev/branches/yn/gazebo/plugin
launch file: ~/gazebo_source/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/launch

Does anyone have any ideas why this could be giving me an error even though the world file path is correct (relative to GAZEBO_RESOURCE_PATH)?

I guess I could include "~/faster_dev/branches/yn/gazebo/plugin" in my global path, but I'd rather avoid this if possible..



edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-07-30 06:50:57 -0600

ynevatia gravatar image

updated 2013-07-30 06:51:55 -0600

I finally figured out the problem: it lies with the scripts in gazebo_ros/scripts. These call the from Gazebo, which was overwriting the environment variables I had set in my .bashrc with default values.

By commenting out the relevant lines in gazebo_ros/scripts/gazebo and building it again (for safety), roslaunch gazebo_ros mars_world.launch works.

edit flag offensive delete link more

answered 2013-07-26 18:25:02 -0600

nkoenig gravatar image

Try putting the file in a "worlds" subdirectory:


edit flag offensive delete link more


Hi Nate, I tried doing that and it gives the same error - with the launch file referencing either worlds/ or just

ynevatia gravatar imageynevatia ( 2013-07-27 02:41:12 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2013-07-26 10:57:05 -0600

Seen: 1,138 times

Last updated: Jul 30 '13