Gazebo | Ignition | Community
Ask Your Question

How to load the world save by ros gazebo on groovy?

asked 2013-10-20 10:10:39 -0500

sam gravatar image

I followed Tutorials/1.9/Using roslaunch Files to Spawn Models

My test.launch


    <!-- start gazebo with an empty plane -->
    <param name="/use_sim_time" value="true" />
    <include file="$(find pr2_gazebo)/launch/pr2_empty_world.launch">
        <arg name="world_name" value="/home/sam/code/groovy_overlay/src/gazebo_dir/"/>

    <!-- start gui -->
    <node name="gazebo_gui" pkg="gazebo" type="gui" respawn="false" output="screen"/>

</launch> is created by ROS groovy gazebo(use save as).

Then I run optirun roslaunch ./test.launch , it shows:

sam@sam:~/code/groovy_overlay/src/gazebo_dir$ optirun roslaunch ./test.launch 
... logging to /home/sam/.ros/log/de7b2aec-3998-11e3-a682-aeef2ab08fe6/roslaunch-sam-21514.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

unused args [world_name] for include of [/opt/ros/groovy/stacks/pr2_simulator/pr2_gazebo/launch/pr2_empty_world.launch]

I notice that doc says: the worldname is with respect to GAZEBORESOURCE_PATH environmental variable

But I can't understand what it means.

How to solve it?

Thank you~

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-21 03:09:23 -0500


the pr2 launch script does not use an argument world_name. If you want to use a launch script you have to write it yourself or use the ones that are shipped with the gazebo packages.

If you use gazebo_ros to spawn your world it could look like this:

     <param name="/use_sim_time" value="true" />
     <include file="$(find gazebo_ros)/launch/empty_world.launch">
         <arg name="world_name" value="$(find your_package)/"/>

edit flag offensive delete link more


Where is gazebo_ros? I can't find that package on ROS Groovy.

sam gravatar imagesam ( 2013-10-21 12:30:30 -0500 )edit
evilBiber gravatar imageevilBiber ( 2013-10-24 02:55:40 -0500 )edit

Does that mean when I use ROS Groovy, I shouldn't use pr2_gazebo package?

sam gravatar imagesam ( 2013-10-26 09:17:27 -0500 )edit

I'm not sure what this package contains. Maybe some of the the plugins are not compatible with the newer gazebo versions but I don't think so...

You might have to change some of the launch files to use gazebo_ros instead of other gazebo packages...

evilBiber gravatar imageevilBiber ( 2013-11-04 02:06:32 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-10-20 10:10:39 -0500

Seen: 1,439 times

Last updated: Oct 21 '13