Spawn multiple bots (SDF's) in launch file

asked 2017-03-26 12:24:29 -0500

vvyogi gravatar image

updated 2017-04-06 09:44:03 -0500

I have created a sdf model (named MyBot.sdf) that contains a differential drive vehicle with "differential_drive_controller" plugin.

Earlier I used xacro to spawn multiple models. Following lines

<param name="robot_description" command="$(find xacro)/xacro.py '$(find swarm_try)/description/urdf/mybot.xacro'"/>
<node name="bot_1" pkg="gazebo_ros" type="spawn_model" output="screen"    args="-urdf -param robot_description -model mybot1 -x 5.66311896062 -y 4.11449676605 -z 0 -Y 3.76991118431  -namespace bot_1" />

Now I have a model in my gazebo model database named "MyBot", how do I spawn multiple copies of it using the launch file.

edit retag flag offensive close merge delete