Here is the code that worked for me, and as steve said on the comment above, you have to pay attention for hardcoded topics.
For namespace:
<arg name="model" default="$(find your_package)/urdf/robot.urdf.xacro"/>
<!-- Launch gazebo -->
<include file="$(find your_package)/launch/gazebo.launch">
<arg name="model" value="$(arg model)"/>
</include>
<group ns="robot1">
<param name="tf_prefix" value="robot1_tf" />
<include file="$(find your_package)/launch/robot.launch" >
<arg name="init_pose" value="-x 0 -y 1 -z 0" />
<arg name="robot_name" value="robot1" />
</include>
<include file="$(find ira_laser_tools)/launch/laserscan_multi_merger.launch">
<arg name="robot_name" value="robot1"/>
</include>
</group>
then for robot.launch:
<launch>
<arg name="robot_name" default="your_default_value"/>
<arg name="init_pose" default="your_default_value"/>
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
args="$(arg init_pose) -urdf -param /robot_description -model $(arg robot_name)"
respawn="false" output="screen" />
<node pkg="robot_state_publisher" type="robot_state_publisher"
name="robot_state_publisher" output="screen"/>
</launch>
I'm facing the same issue, could you solve this problem?
@Alireza_msb this question is over 2 years old, you should create a new question and reference this one instead of commenting here. This will give your problem more visibility
@jayess Thanks, I made a new question here as you mentioned: https://answers.ros.org/question/3803...