[ros-users] Gazebo - spawn_model
Nicolás Alvarez Picco
nicolasapicco at hotmail.com
Tue Nov 9 14:14:45 UTC 2010
Hi Everybody!!!
I have made a map with gmapping, it is a file 'map.pgm'. Now I want to spawn its walls, for that I am using this launch file:
<launch>
<arg name="scenario"/>
<arg name="no_window"/>
<!-- start gazebo with an empty plane -->
<param name="/use_sim_time" value="true" />
<!-- if no window is set then start with -r (no window displayed) -->
<node name="gazebo" pkg="gazebo" type="gazebo" args="-r $(find han_Scene)/worlds/empty.world" respawn="false" output="screen" if="$(arg no_window)"/>
<!-- Otherwise start normally -->
<node name="gazebo" pkg="gazebo" type="gazebo" args="$(find han_Scene)/worlds/empty.world" respawn="false" output="screen" unless="$(arg no_window)"/>
<!-- walls-->
<param name="walls" textfile="$(find han_Scene)/scenarios/$(arg scenario)/walls.model" />
<node name="xml2factor_walls" pkg="gazebo" type="spawn_model" args="-gazebo -param walls -model walls" respawn="false" output="screen" />
<!-- <node name="xml2factor_walls" pkg="gazebo" type="spawn_model" args="-gazebo -param walls -x -16 -y -16 -model walls" respawn="false" output="screen" /> -->
</launch>
Where the file walls.model is
<?xml version="1.0" ?>
<model:physical name="walls_model"
xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"
xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom" >
<static>true</static>
<body:map name="walls_body">
<xyz>-8 -8 0 </xyz>
<geom:map name="walls_geom">
<image>map.pgm</image> <!-- for now this is in the gazebo model dir, change later-->
<height>2</height>
<threshold>200</threshold>
<granularity>1</granularity>
<negative>false</negative>
<scale>0.04</scale>
<offset>0 0 0</offset>
<material>Gazebo/Rocky</material>
</geom:map>
</body:map>
</model:physical>
The thing is that nothing happens in gazebo.
Any clue?? Does exist any documentation about how to spawn walls of a map??
Many thanks
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20101109/e83719b9/attachment-0002.html>
More information about the ros-users
mailing list