Robotics StackExchange | Archived questions

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

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

My test.launch

<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/a.world"/>
    </include>

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

</launch>

a.world 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]
sam@sam:~/code/groovy_overlay/src/gazebo_dir$

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~

Asked by sam on 2013-10-20 10:10:39 UTC

Comments

Answers

Hi,

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:

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

</launch>

Asked by evilBiber on 2013-10-21 03:09:23 UTC

Comments

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

Asked by sam on 2013-10-21 12:30:30 UTC

you should take a look here:

http://gazebosim.org/wiki/Tutorials/1.9/Installing_gazebo_ros_Packages

Asked by evilBiber on 2013-10-24 02:55:40 UTC

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

Asked by sam on 2013-10-26 09:17:27 UTC

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

Asked by evilBiber on 2013-11-04 03:06:32 UTC