[ros-users] how to spawn an object in gazebo
Billy Okal
b.okal at jacobs-university.de
Thu Jan 6 14:15:30 UTC 2011
Hi Ali,
To spawn objet in gazebo you need to first have gazebo running by doing this
roslaunch gazebo_worlds empty_world.launch
This should start a gazebo gui. then spawn the object using the
'rosrun gazebo spawn_model -file `pwd`/object.urdf -urdf -z 1 -model
my_object'
as you did before. For more info, look at the tutorials here
http://www.ros.org/wiki/simulator_gazebo/Tutorials/SpawningObjectInSimulation
Futher, the code segment
<gazebo reference="my_box">
<material>Gazebo/Blue</material>
</gazebo>
just adds color to the object(my_object in this case). More info on this is
available on the urdf reference here
http://www.ros.org/wiki/urdf/XML under the gazebo elements
best,
billy
On 6 January 2011 14:52, Ali Abbas <malikaliabbas at gmail.com> wrote:
>
> Hello All,
>
> I am using karmic. Also I am a student. I have made an object using urdf
> and
> succeeded to spawn it in RViz. Now I want to spawn this object in gazebo
> using that urdf file by executing the following command.
>
> 'rosrun gazebo spawn_model -file `pwd`/object.urdf -urdf -z 1 -model
> my_object'
>
> but unable to view it in gazebo.
>
> Moreover I just want to know about the following few lines in 'urdf' file.
> I
> have not written these lines in my 'urdf' file.
>
> <gazebo reference="my_box">
> <material>Gazebo/Blue</material>
> </gazebo>
>
> 'my_box' is just a link. what should be the procedure to spawn an object
> with multiple links.
>
> Thanks in advance,
>
> Regrds,
> Ali Abbas
> --
> View this message in context:
> http://ros-users.122217.n3.nabble.com/how-to-spawn-an-object-in-gazebo-tp2205680p2205680.html
> Sent from the ROS-Users mailing list archive at Nabble.com.
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20110106/cac63a5b/attachment-0003.html>
More information about the ros-users
mailing list