Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Spawm multiple sdf models from launch file

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.

Spawm multiple sdf models from launch file

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.