No subject


Tue Sep 21 18:39:23 UTC 2010


/home/robot/src/autnavarc/ros-ana-pkg/wheelchair/fete_nico_mapa.png

but you mentioned you had saved map.png in
/home/robot/src/ros/stacks/simulator_gazebo/gazebo_worlds/Media/materials/t=
extures

possibly double check your parameter "walls" containing walls.model and mak=
e
sure the image tag contains only the file name, e.g.
<image>fete_nico_mapa.png</image>

and your grayscale map image file is located at
/home/robot/src/ros/stacks/simulator_gazebo/gazebo_worlds/Media/materials/t=
extures/fete_nico_mapa.png

John



2010/11/9 Nicol=E1s Alvarez Picco <nicolasapicco at hotmail.com>

>  Hi John,
> Thanks for answering, I ve tried with that you suggest me and also with
> executing in a new terminal "convert myfile.pgm myfile.png " but it is st=
ill
> giving this message:
>
> Param [quickStep] is deprecated: [replace quickStep with stepType]
> Param [quickStepIters] is deprecated: [replace quickStepIters with
> stepIters]
> Param [quickStepW] is deprecated: [replace quickStepW with stepW]
> [ INFO] [1289322971.691105690]: Obtained obstacle map.
> Gazebo successfully initialized
> Error:
> [/home/robot/src/ros/stacks/simulator_gazebo/gazebo/build/gazebo-r8947/se=
rver/rendering/Image.cc:136]
> Unable to open image
> file[/home/robot/src/autnavarc/ros-ana-pkg/wheelchair/fete_nico_mapa.png]
> /home/robot/src/ros/stacks/simulator_gazebo/gazebo/build/gazebo-r8947/ser=
ver/physics/MapShape.cc:117
> : Exception: Unable to open image
> file[/home/robot/src/autnavarc/ros-ana-pkg/wheelchair/fete_nico_mapa.png]
>
> Main simulation loop failed
> /home/robot/src/ros/stacks/simulator_gazebo/gazebo/build/gazebo-r8947/ser=
ver/physics/MapShape.cc:117
> : Exception: Unable to open image
> file[/home/robot/src/autnavarc/ros-ana-pkg/wheelchair/fete_nico_mapa.png]
>
> Service call failed: transport error completing service call: unable to
> receive data from sender, check sender's logs for details
> spawning success None
> [gazebo-2] process has died [pid 3701, exit code -11].
> log files:
> /home/robot/.ros/log/0bd3add0-ec25-11df-a9ef-0026b9e75b87/gazebo-2*.log
> [xml2factor_walls-3] process has finished cleanly.
> log file:
> /home/robot/.ros/log/0bd3add0-ec25-11df-a9ef-0026b9e75b87/xml2factor_wall=
s-3*.log
> [ INFO] [1289322976.775538978, 0.958000000]: Server up
> [ INFO] [1289322976.777365139, 0.958000000]: Spinning now
>
>
>
> I saved my map in
>
>
>  /home/robot/src/ros/stacks/simulator_gazebo/gazebo_worlds/Media/material=
s/textures
>
> Any idea?
>
> Thanks
>
> Nicolas
>
>
> ------------------------------
> From: johnhsu at willowgarage.com
> Date: Tue, 9 Nov 2010 07:29:20 -0800
> To: ros-users at code.ros.org
> Subject: Re: [ros-users] Gazebo - spawn_model
>
>
> Hi Nicolas,
>
> I don't think gazebo can read pgm files.  Try opening your map file in
> gimp, save it as a grayscale .png file.  Place the file in a package that
> exports its prefix to gazebo_media_path (for example take a look at
> manifest.xml for gazebo_worlds), under a subdirectory
> [package_name]/Media/materials/texture/walls.png.
>
> Then try your spawn again.  Note that if the map is complicated, it might
> take gazebo's recursive rectangle wall builder more than 30 sec. to
> construct the model.
>
> John
>
>
>
> 2010/11/9 Nicol=E1s Alvarez Picco <nicolasapicco at hotmail.com>
>
>  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=3D"scenario"/>
>   <arg name=3D"no_window"/>
>   <!-- start gazebo with an empty plane -->
>   <param name=3D"/use_sim_time" value=3D"true" />
>
>   <!-- if no window is set then start with -r (no window displayed) -->
>   <node name=3D"gazebo" pkg=3D"gazebo" type=3D"gazebo" args=3D"-r $(find
> han_Scene)/worlds/empty.world" respawn=3D"false" output=3D"screen" if=3D"=
$(arg
> no_window)"/>
>
>   <!-- Otherwise start normally -->
>   <node name=3D"gazebo" pkg=3D"gazebo" type=3D"gazebo" args=3D"$(find
> han_Scene)/worlds/empty.world" respawn=3D"false" output=3D"screen" unless=
=3D"$(arg
> no_window)"/>
>
>   <!-- walls-->
>   <param name=3D"walls" textfile=3D"$(find han_Scene)/scenarios/$(arg
> scenario)/walls.model" />
>
>   <node name=3D"xml2factor_walls" pkg=3D"gazebo" type=3D"spawn_model"
> args=3D"-gazebo -param walls -model walls" respawn=3D"false" output=3D"sc=
reen" />
>
>   <!-- <node name=3D"xml2factor_walls" pkg=3D"gazebo" type=3D"spawn_model=
"
> args=3D"-gazebo -param walls -x -16 -y -16 -model walls" respawn=3D"false=
"
> output=3D"screen" /> -->
>
> </launch>
>
> Where the file walls.model is
>
> <?xml version=3D"1.0" ?>
> <model:physical name=3D"walls_model"
>   xmlns:model=3D"http://playerstage.sourceforge.net/gazebo/xmlschema/#mod=
el"
>
>   xmlns:body=3D"http://playerstage.sourceforge.net/gazebo/xmlschema/#body=
"
>   xmlns:geom=3D"http://playerstage.sourceforge.net/gazebo/xmlschema/#geom=
" >
>
>   <static>true</static>
>   <body:map name=3D"walls_body">
>     <xyz>-8 -8 0 </xyz>
>     <geom:map name=3D"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
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
>
> _______________________________________________ ros-users mailing list
> ros-users at code.ros.org https://code.ros.org/mailman/listinfo/ros-users
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>

--0016e64c19ced60e900494a9064f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Nicol=E1s,<br><br>From your console output it looks like gazebo is looking =
for a file <br>/home/robot/src/autnavarc/ros-ana-pkg/wheelchair/fete_nico_m=
apa.png<br><div><br>but you mentioned you had saved map.png in<br></div>/ho=
me/robot/src/ros/stacks/simulator_gazebo/gazebo_worlds/Media/materials/text=
ures<br>

<div><br>possibly double check your parameter &quot;walls&quot; containing =
walls.model and make sure the image tag contains only the file name, e.g.<b=
r>&lt;image&gt;fete_nico_mapa.png&lt;/image&gt;<br><br>and your grayscale m=
ap image file is located at<br>

/home/robot/src/ros/stacks/simulator_gazebo/gazebo_worlds/Media/materials/t=
extures/fete_nico_mapa.png<br><br>John<br><br></div><br><br><div class=3D"g=
mail_quote">2010/11/9 Nicol=E1s Alvarez Picco <span dir=3D"ltr">&lt;<a href=
=3D"mailto:nicolasapicco at hotmail.com">nicolasapicco at hotmail.com</a>&gt;</sp=
an><br>

<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



<div>
Hi John,<br>Thanks for answering, I ve tried with that you suggest me and a=
lso with executing in a new terminal &quot;convert myfile.pgm myfile.png &q=
uot; but it is still giving this message:<br><br>Param [quickStep] is depre=
cated: [replace quickStep with stepType]<br>

Param [quickStepIters] is deprecated: [replace quickStepIters with stepIter=
s]<br>Param [quickStepW] is deprecated: [replace quickStepW with stepW]<br>=
[ INFO] [1289322971.691105690]: Obtained obstacle map.<br>Gazebo successful=
ly initialized<br>

<font color=3D"#ff0000">Error: [/home/robot/src/ros/stacks/simulator_gazebo=
/gazebo/build/gazebo-r8947/server/rendering/Image.cc:136]</font><br>Unable =
to open image file[/home/robot/src/autnavarc/ros-ana-pkg/wheelchair/fete_ni=
co_mapa.png]<br>

/home/robot/src/ros/stacks/simulator_gazebo/gazebo/build/gazebo-r8947/serve=
r/physics/MapShape.cc:117 : Exception: Unable to open image file[/home/robo=
t/src/autnavarc/ros-ana-pkg/wheelchair/fete_nico_mapa.png]<br><br>Main simu=
lation loop failed<br>

/home/robot/src/ros/stacks/simulator_gazebo/gazebo/build/gazebo-r8947/serve=
r/physics/MapShape.cc:117 : Exception: Unable to open image file[/home/robo=
t/src/autnavarc/ros-ana-pkg/wheelchair/fete_nico_mapa.png]<br><br>Service c=
all failed: transport error completing service call: unable to receive data=
 from sender, check sender&#39;s logs for details<br>

spawning success None<br><font color=3D"#ff0000">[gazebo-2] process has die=
d [pid 3701, exit code -11].</font><font color=3D"#ff0000"><br></font><font=
 color=3D"#ff0000">log files: /home/robot/.ros/log/0bd3add0-ec25-11df-a9ef-=
0026b9e75b87/gazebo-2*.log</font><br>

[xml2factor_walls-3] process has finished cleanly.<br>log file: /home/robot=
/.ros/log/0bd3add0-ec25-11df-a9ef-0026b9e75b87/xml2factor_walls-3*.log<br>[=
 INFO] [1289322976.775538978, 0.958000000]: Server up<br>[ INFO] [128932297=
6.777365139, 0.958000000]: Spinning now<br>

=A0<br><br><br>I saved my map in<br><br>=A0/home/robot/src/ros/stacks/simul=
ator_gazebo/gazebo_worlds/Media/materials/textures<br><br>Any idea?<br><br>=
Thanks <br><br>Nicolas<br><br><br><hr>From: <a href=3D"mailto:johnhsu at willo=
wgarage.com" target=3D"_blank">johnhsu at willowgarage.com</a><br>

Date: Tue, 9 Nov 2010 07:29:20 -0800<br>To: <a href=3D"mailto:ros-users at cod=
e.ros.org" target=3D"_blank">ros-users at code.ros.org</a><br>Subject: Re: [ro=
s-users] Gazebo - spawn_model<div><div></div><div class=3D"h5"><br><br>Hi N=
icolas,<br>

<br>I don&#39;t think gazebo can read pgm files.=A0 Try opening your map fi=
le in gimp, save it as a grayscale .png file.=A0 Place the file in a packag=
e that exports its prefix to gazebo_media_path (for example take a look at =
manifest.xml for gazebo_worlds), under a subdirectory [package_name]/Media/=
materials/texture/walls.png.<br>



<br>Then try your spawn again.=A0 Note that if the map is complicated, it m=
ight take gazebo&#39;s recursive rectangle wall builder more than 30 sec. t=
o construct the model.<br><br>John<br><br><br><br><div>

2010/11/9 Nicol=E1s Alvarez Picco <span dir=3D"ltr">&lt;<a href=3D"mailto:n=
icolasapicco at hotmail.com" target=3D"_blank">nicolasapicco at hotmail.com</a>&g=
t;</span><br><blockquote style=3D"padding-left: 1ex;">





<div>
Hi Everybody!!!<br><br>I have made a map with gmapping, it is a file &#39;m=
ap.pgm&#39;. Now I want to spawn its walls, for that I am using this launch=
 file:<br><br>&lt;launch&gt;<br><br>=A0 &lt;arg name=3D&quot;scenario&quot;=
/&gt;<br>



=A0 &lt;arg name=3D&quot;no_window&quot;/&gt;<br>=A0 &lt;!-- start gazebo w=
ith an empty plane --&gt;<br>=A0 &lt;param name=3D&quot;/use_sim_time&quot;=
 value=3D&quot;true&quot; /&gt;<br><br>=A0 &lt;!-- if no window is set then=
 start with -r (no window displayed) --&gt;<br>



=A0 &lt;node name=3D&quot;gazebo&quot; pkg=3D&quot;gazebo&quot; type=3D&quo=
t;gazebo&quot; args=3D&quot;-r $(find han_Scene)/worlds/empty.world&quot; r=
espawn=3D&quot;false&quot; output=3D&quot;screen&quot; if=3D&quot;$(arg no_=
window)&quot;/&gt;<br>



=A0 <br>=A0 &lt;!-- Otherwise start normally --&gt;<br>=A0 &lt;node name=3D=
&quot;gazebo&quot; pkg=3D&quot;gazebo&quot; type=3D&quot;gazebo&quot; args=
=3D&quot;$(find han_Scene)/worlds/empty.world&quot; respawn=3D&quot;false&q=
uot; output=3D&quot;screen&quot; unless=3D&quot;$(arg no_window)&quot;/&gt;=
<br>



=A0 <br>=A0 &lt;!-- walls--&gt;<br>=A0 &lt;param name=3D&quot;walls&quot; t=
extfile=3D&quot;$(find han_Scene)/scenarios/$(arg scenario)/walls.model&quo=
t; /&gt;<br><br>=A0 &lt;node name=3D&quot;xml2factor_walls&quot; pkg=3D&quo=
t;gazebo&quot; type=3D&quot;spawn_model&quot; args=3D&quot;-gazebo -param w=
alls -model walls&quot; respawn=3D&quot;false&quot; output=3D&quot;screen&q=
uot; /&gt;<br>



<br>=A0 &lt;!-- &lt;node name=3D&quot;xml2factor_walls&quot; pkg=3D&quot;ga=
zebo&quot; type=3D&quot;spawn_model&quot; args=3D&quot;-gazebo -param walls=
 -x -16 -y -16 -model walls&quot; respawn=3D&quot;false&quot; output=3D&quo=
t;screen&quot; /&gt; --&gt;<br>



<br>&lt;/launch&gt;<br><br>Where the file walls.model is <br><br>&lt;?xml v=
ersion=3D&quot;1.0&quot; ?&gt;<br>&lt;model:physical name=3D&quot;walls_mod=
el&quot;<br>=A0 xmlns:model=3D&quot;<a href=3D"http://playerstage.sourcefor=
ge.net/gazebo/xmlschema/#model" target=3D"_blank">http://playerstage.source=
forge.net/gazebo/xmlschema/#model</a>&quot; <br>



=A0 xmlns:body=3D&quot;<a href=3D"http://playerstage.sourceforge.net/gazebo=
/xmlschema/#body" target=3D"_blank">http://playerstage.sourceforge.net/gaze=
bo/xmlschema/#body</a>&quot; <br>=A0 xmlns:geom=3D&quot;<a href=3D"http://p=
layerstage.sourceforge.net/gazebo/xmlschema/#geom" target=3D"_blank">http:/=
/playerstage.sourceforge.net/gazebo/xmlschema/#geom</a>&quot; &gt;<br>



<br>=A0 &lt;static&gt;true&lt;/static&gt;<br>=A0 &lt;body:map name=3D&quot;=
walls_body&quot;&gt;<br>=A0=A0=A0 &lt;xyz&gt;-8 -8 0 &lt;/xyz&gt;<br>=A0=A0=
=A0 &lt;geom:map name=3D&quot;walls_geom&quot;&gt;<br>=A0=A0=A0=A0=A0 &lt;i=
mage&gt;map.pgm&lt;/image&gt; &lt;!-- for now this is in the gazebo model d=
ir, change later--&gt;<br>



=A0=A0=A0=A0=A0 &lt;height&gt;2&lt;/height&gt;<br>=A0=A0=A0=A0=A0 &lt;thres=
hold&gt;200&lt;/threshold&gt;<br>=A0=A0=A0=A0=A0 &lt;granularity&gt;1&lt;/g=
ranularity&gt;<br>=A0=A0=A0=A0=A0 &lt;negative&gt;false&lt;/negative&gt;<br=
>=A0=A0=A0=A0=A0 &lt;scale&gt;0.04&lt;/scale&gt;<br>



=A0=A0=A0=A0=A0 &lt;offset&gt;0 0 0&lt;/offset&gt;<br>=A0=A0=A0=A0=A0 &lt;m=
aterial&gt;Gazebo/Rocky&lt;/material&gt;<br>=A0=A0=A0 &lt;/geom:map&gt;<br>=
=A0 &lt;/body:map&gt;<br>&lt;/model:physical&gt;<br><br>The thing is that n=
othing happens in gazebo. <br>



Any clue?? Does exist any documentation about how to spawn walls of a map??=
<br><br>Many thanks<br><br>Nicolas<br> 		 	   		  </div>
<br>_______________________________________________<br>
ros-users mailing list<br>
<a href=3D"mailto:ros-users at code.ros.org" target=3D"_blank">ros-users at code.=
ros.org</a><br>
<a href=3D"https://code.ros.org/mailman/listinfo/ros-users" target=3D"_blan=
k">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br>
<br></div></div>_______________________________________________
ros-users mailing list
<a href=3D"mailto:ros-users at code.ros.org" target=3D"_blank">ros-users at code.=
ros.org</a>
<a href=3D"https://code.ros.org/mailman/listinfo/ros-users" target=3D"_blan=
k">https://code.ros.org/mailman/listinfo/ros-users</a> 		 	   		  </div>
<br>_______________________________________________<br>
ros-users mailing list<br>
<a href=3D"mailto:ros-users at code.ros.org">ros-users at code.ros.org</a><br>
<a href=3D"https://code.ros.org/mailman/listinfo/ros-users" target=3D"_blan=
k">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br>

--0016e64c19ced60e900494a9064f--


More information about the ros-users mailing list