Ask Your Question

Revision history [back]

I modified your launch file a little and it worked for me.

<launch> <group ns="turtlebot1"> <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle]"/> <arg name="x_pos" default="0.0"/> <arg name="y_pos" default="2.0"/> <arg name="z_pos" default="0.0"/>

<node name="spawn_urdf_1" pkg="gazebo_ros" type="spawn_model" args="-urdf -model turtlebot3_burger -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos) -param robot_description"/> </group>

<group ns="turtlebot2"> <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle]"/> <arg name="x_pos_2" default="2.0"/> <arg name="y_pos_2" default="0.0"/> <arg name="z_pos_2" default="0.0"/>

<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model turtlebot3_burger_2 -x $(arg x_pos_2) -y $(arg y_pos_2) -z $(arg z_pos_2) -param robot_description_2"/> </group>

<include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="world_name" value="$(find turtlebot3_gazebo)/models/empty.world"/> <arg name="paused" value="false"/> <arg name="use_sim_time" value="true"/> <arg name="gui" value="true"/> <arg name="headless" value="false"/> <arg name="debug" value="false"/> </include> </launch>

click to hide/show revision 2
No.2 Revision

I modified your launch file a little and it worked for me.

<launch>
<group ns="turtlebot1">
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle]"/>
<arg name="x_pos" default="0.0"/>
<arg name="y_pos" default="2.0"/>
<arg name="z_pos" default="0.0"/>

default="0.0"/>

<param name="robot_description" command="$(find xacro)/xacro.py $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />

<node name="spawn_urdf_1" pkg="gazebo_ros" type="spawn_model" args="-urdf -model turtlebot3_burger -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos) -param robot_description"/> </group>

robot_description" /> </group>

<group ns="turtlebot2"> <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle]"/> <arg name="x_pos_2" default="2.0"/> <arg name="y_pos_2" default="0.0"/> <arg name="z_pos_2" default="0.0"/>

default="0.0"/>

<param name="robot_description_2" command="$(find xacro)/xacro.py $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />

<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model turtlebot3_burger_2 -x $(arg x_pos_2) -y $(arg y_pos_2) -z $(arg z_pos_2) -param robot_description_2"/> robot_description_2" /> </group>

</group>

<include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="world_name" value="$(find turtlebot3_gazebo)/models/empty.world"/> <arg name="paused" value="false"/> <arg name="use_sim_time" value="true"/> <arg name="gui" value="true"/> <arg name="headless" value="false"/> <arg name="debug" value="false"/> </include> </launch>

</launch>