Hi Ali,<div><br></div><div>To spawn objet in gazebo you need to first have gazebo running by doing this</div><div><br></div><div><meta charset="utf-8"><span class="Apple-style-span" style="font-family: Helvetica, Verdana, Arial, 'Lucida Grande', sans-serif; font-size: 15px; "><pre style="border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(174, 189, 204); border-right-color: rgb(174, 189, 204); border-bottom-color: rgb(174, 189, 204); border-left-color: rgb(174, 189, 204); background-color: rgb(243, 245, 247); padding-top: 5pt; padding-right: 5pt; padding-bottom: 5pt; padding-left: 5pt; font-family: courier, monospace; white-space: pre-wrap; word-wrap: break-word; ">
roslaunch gazebo_worlds empty_world.launch</pre></span><div><br></div><div>This should start a gazebo gui. then spawn the object using the </div><div><br></div><div><meta charset="utf-8">'rosrun gazebo spawn_model -file `pwd`/object.urdf -urdf -z 1 -model<br>
my_object'</div><div><br></div><div>as you did before. For more info, look at the tutorials here</div><div><br></div><div><a href="http://www.ros.org/wiki/simulator_gazebo/Tutorials/SpawningObjectInSimulation">http://www.ros.org/wiki/simulator_gazebo/Tutorials/SpawningObjectInSimulation</a></div>
<div><br></div><div>Futher, the code segment </div><div><meta charset="utf-8"><gazebo reference="my_box"><br>   <material>Gazebo/Blue</material><br></gazebo></div><div><br></div><div>just adds color to the object(my_object in this case). More info on this is available on the urdf reference here</div>
<div><a href="http://www.ros.org/wiki/urdf/XML">http://www.ros.org/wiki/urdf/XML</a> under the gazebo elements</div><div><br></div><div>best,</div><div>billy</div><br><div class="gmail_quote">On 6 January 2011 14:52, Ali Abbas <span dir="ltr"><<a href="mailto:malikaliabbas@gmail.com">malikaliabbas@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Hello All,<br>
<br>
I am using karmic. Also I am a student. I have made an object using urdf and<br>
succeeded to spawn it in RViz. Now I want to spawn this object in gazebo<br>
using that urdf file by executing the following command.<br>
<br>
'rosrun gazebo spawn_model -file `pwd`/object.urdf -urdf -z 1 -model<br>
my_object'<br>
<br>
but unable to view it in gazebo.<br>
<br>
Moreover I just want to know about the following few lines in 'urdf' file. I<br>
have not written these lines in my 'urdf' file.<br>
<br>
<gazebo reference="my_box"><br>
    <material>Gazebo/Blue</material><br>
</gazebo><br>
<br>
'my_box' is just a link. what should be the procedure to spawn an object<br>
with multiple links.<br>
<br>
Thanks in advance,<br>
<br>
Regrds,<br>
Ali Abbas<br>
<font color="#888888">--<br>
View this message in context: <a href="http://ros-users.122217.n3.nabble.com/how-to-spawn-an-object-in-gazebo-tp2205680p2205680.html" target="_blank">http://ros-users.122217.n3.nabble.com/how-to-spawn-an-object-in-gazebo-tp2205680p2205680.html</a><br>

Sent from the ROS-Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</font></blockquote></div><br></div>