title: issue launching multiple robots
body: <p>I have launched two robots with same urdf with different name. And no error message is shown when launched in gazebo. The launch file is:</p>
  <pre><code>    &lt;launch&gt;
      
        &lt;!-- &lt;rosparam file=&quot;$(find bini_simulation)/config/bini_sim_hw_interface.yaml&quot; command=&quot;load&quot; ns=&quot;bini1&quot;/&gt; --&gt;
      
        &lt;include file=&quot;$(find gazebo_ros)/launch/empty_world.launch&quot;&gt;
          &lt;arg name=&quot;world_name&quot; value=&quot;$(find turtlebot3_gazebo)/worlds/turtlebot3_house.world&quot;/&gt;
          &lt;arg name=&quot;paused&quot; value=&quot;false&quot;/&gt;
          &lt;arg name=&quot;use_sim_time&quot; value=&quot;true&quot;/&gt;
          &lt;arg name=&quot;gui&quot; value=&quot;true&quot;/&gt;
          &lt;arg name=&quot;headless&quot; value=&quot;false&quot;/&gt;
          &lt;arg name=&quot;debug&quot; value=&quot;false&quot;/&gt;
        &lt;/include&gt;
      
        &lt;group ns=&quot;Bini1&quot;&gt;
          &lt;param name=&quot;tf_prefix&quot; value=&quot;Bini1_tf&quot; /&gt;
          &lt;!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot --&gt;
          &lt;node name=&quot;spawn_urdf&quot; pkg=&quot;gazebo_ros&quot; type=&quot;spawn_model&quot; 
            args=&quot;-urdf -model Bini1 -x 0 -y 0 -z 0 -param robot_description&quot; /&gt;
      
          &lt;!-- Load the URDF into the ROS Parameter Server --&gt;
          &lt;param name=&quot;robot_description&quot;
            command=&quot;$(find xacro)/xacro --inorder '$(find bini_simulation)/urdf/bini.xacro'&quot; /&gt;
        &lt;/group&gt;
      
        &lt;group ns=&quot;Bini2&quot;&gt;
          &lt;param name=&quot;tf_prefix&quot; value=&quot;Bini2_tf&quot; /&gt;
          &lt;!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot --&gt;
          &lt;node name=&quot;spawn_urdf&quot; pkg=&quot;gazebo_ros&quot; type=&quot;spawn_model&quot; 
            args=&quot;-urdf -model Bini2 -x 1 -y 0 -z 0 -param robot_description&quot; /&gt;
      
          &lt;!-- Load the URDF into the ROS Parameter Server --&gt;
          &lt;param name=&quot;robot_description&quot;
            command=&quot;$(find xacro)/xacro --inorder '$(find bini_simulation)/urdf/bini.xacro'&quot; /&gt;
        &lt;/group&gt;
      &lt;/launch&gt;
  
  And the launch file for the ros controllers including joint_state_publisher is:
  
      &lt;?xml version=&quot;1.0&quot;?&gt;
      &lt;launch&gt;
      
        &lt;arg name=&quot;serial_port&quot; default=&quot;/dev/ttyUSB0&quot;/&gt;
        &lt;arg name=&quot;use_ekf&quot; default=&quot;false&quot;/&gt;
        &lt;arg name=&quot;simulation&quot; default=&quot;false&quot;/&gt;
        &lt;arg name=&quot;robot&quot; default=&quot;$(env BINI_MODEL)&quot;/&gt;
      &lt;group ns=&quot;Bini1&quot;&gt;
        &lt;param name=&quot;tf_prefix&quot; value=&quot;Bini1_tf&quot; /&gt;
        &lt;!-- Load joint controller configurations from YAML file to parameter server --&gt;
        &lt;rosparam file=&quot;$(find motion_controllers)/config/bini_controllers.yaml&quot; command=&quot;load&quot;/&gt;
      
        &lt;param name=&quot;base_controller/enable_odom_tf&quot; type=&quot;bool&quot; value=&quot;true&quot;/&gt;
      
        &lt;group unless=&quot;$(arg simulation)&quot;&gt;
          &lt;param name=&quot;robot_description&quot; command=&quot;$(find xacro)/xacro --inorder '$(find bini_simulation)/urdf/bini.xacro'&quot; /&gt;
          &lt;rosparam file=&quot;$(find motion_controllers)/config/bini_hw_interface.yaml&quot; command=&quot;load&quot;/&gt;
          &lt;param name=&quot;/hardware_interface/serial_port&quot; type=&quot;string&quot; value=&quot;$(arg serial_port)&quot;/&gt;
          &lt;node name=&quot;bini_hw_main&quot; pkg=&quot;motion_controllers&quot; type=&quot;bini_hw_main&quot;
            output=&quot;screen&quot; launch-prefix=&quot;$(arg launch_prefix)&quot;&gt;
          &lt;/node&gt;
        &lt;/group&gt;
      
        &lt;group if=&quot;$(arg use_ekf)&quot;&gt;
          &lt;param name=&quot;base_controller/enable_odom_tf&quot; type=&quot;bool&quot; value=&quot;false&quot;/&gt;
        &lt;/group&gt;
      
        &lt;!-- load the controllers --&gt;
        &lt;node name=&quot;ros_control_controller_manager&quot; pkg=&quot;controller_manager&quot; type=&quot;controller_manager&quot; 
          respawn=&quot;false&quot; output=&quot;screen&quot; args=&quot;spawn
                    joint_state_controller
                    base_controller 
                    head_controller 
                    body_controller&quot;&gt;
        &lt;/node&gt;
      
        &lt;node name=&quot;move_head&quot; pkg=&quot;motion_controllers&quot; type=&quot;move_head&quot;&gt;
          &lt;remap from=&quot;local_plan&quot; to=&quot;move_base/NavfnROS/plan&quot;/&gt;
          &lt;remap from=&quot;command&quot; to=&quot;head_controller/command&quot;/&gt;
        &lt;/node&gt;
      
        &lt;node name=&quot;move_body&quot; pkg=&quot;motion_controllers&quot; type=&quot;move_body&quot; output=&quot;screen&quot;&gt;
          &lt;remap from=&quot;command&quot; to=&quot;body_controller/command&quot;/&gt;
          &lt;remap from=&quot;current_goal&quot; to=&quot;move_base/current_goal&quot;/&gt;
        &lt;/node&gt;
      
        &lt;node name=&quot;update_footprint&quot; pkg=&quot;motion_controllers&quot; type=&quot;update_footprint_node&quot; output=&quot;screen&quot;/&gt;
      
        &lt;!-- convert joint states to TF transforms for rviz, etc --&gt;
        &lt;node name=&quot;robot_state_publisher&quot; pkg=&quot;robot_state_publisher&quot; type=&quot;robot_state_publisher&quot;&gt;
          &lt;param name=&quot;publish_frequency&quot; type=&quot;double&quot; value=&quot;50.0&quot; /&gt;
          &lt;remap from=&quot;tf&quot; to=&quot;Bini1_tf&quot;/&gt;
        &lt;/node&gt;
      &lt;/group&gt;
      
      &lt;group ns=&quot;Bini2&quot;&gt;
        &lt;param name=&quot;tf_prefix&quot; value=&quot;Bini2_tf&quot; /&gt;
        &lt;!-- Load joint controller configurations from YAML file to parameter server --&gt;
        &lt;rosparam file=&quot;$(find motion_controllers)/config/bini_controllers.yaml&quot; command=&quot;load&quot;/&gt;
      
        &lt;param name=&quot;base_controller/enable_odom_tf&quot; type=&quot;bool&quot; value=&quot;true&quot;/&gt;
      
        &lt;group unless=&quot;$(arg simulation)&quot;&gt;
          &lt;param name=&quot;robot_description&quot; command=&quot;$(find xacro)/xacro --inorder '$(find bini_simulation)/urdf/bini.xacro'&quot; /&gt;
          &lt;rosparam file=&quot;$(find motion_controllers)/config/bini_hw_interface.yaml&quot; command=&quot;load&quot;/&gt;
          &lt;param name=&quot;/hardware_interface/serial_port&quot; type=&quot;string&quot; value=&quot;$(arg serial_port)&quot;/&gt;
          &lt;node name=&quot;bini_hw_main&quot; pkg=&quot;motion_controllers&quot; type=&quot;bini_hw_main&quot;
            output=&quot;screen&quot; launch-prefix=&quot;$(arg launch_prefix)&quot;&gt;
          &lt;/node&gt;
        &lt;/group&gt;
      
        &lt;group if=&quot;$(arg use_ekf)&quot;&gt;
          &lt;param name=&quot;base_controller/enable_odom_tf&quot; type=&quot;bool&quot; value=&quot;false&quot;/&gt;
        &lt;/group&gt;
      
        &lt;!-- load the controllers --&gt;
        &lt;node name=&quot;ros_control_controller_manager&quot; pkg=&quot;controller_manager&quot; type=&quot;controller_manager&quot; 
          respawn=&quot;false&quot; output=&quot;screen&quot; args=&quot;spawn
                    joint_state_controller
                    base_controller 
                    head_controller 
                    body_controller&quot;&gt;
        &lt;/node&gt;
      
        &lt;node name=&quot;move_head&quot; pkg=&quot;motion_controllers&quot; type=&quot;move_head&quot;&gt;
          &lt;remap from=&quot;local_plan&quot; to=&quot;move_base/NavfnROS/plan&quot;/&gt;
          &lt;remap from=&quot;command&quot; to=&quot;head_controller/command&quot;/&gt;
        &lt;/node&gt;
      
        &lt;node name=&quot;move_body&quot; pkg=&quot;motion_controllers&quot; type=&quot;move_body&quot; output=&quot;screen&quot;&gt;
          &lt;remap from=&quot;command&quot; to=&quot;body_controller/command&quot;/&gt;
          &lt;remap from=&quot;current_goal&quot; to=&quot;move_base/current_goal&quot;/&gt;
        &lt;/node&gt;
      
        &lt;node name=&quot;update_footprint&quot; pkg=&quot;motion_controllers&quot; type=&quot;update_footprint_node&quot; output=&quot;screen&quot;/&gt;
      
        &lt;!-- convert joint states to TF transforms for rviz, etc --&gt;
        &lt;node name=&quot;robot_state_publisher&quot; pkg=&quot;robot_state_publisher&quot; type=&quot;robot_state_publisher&quot;&gt;
          &lt;param name=&quot;publish_frequency&quot; type=&quot;double&quot; value=&quot;50.0&quot; /&gt;
          &lt;remap from=&quot;tf&quot; to=&quot;Bini2_tf&quot;/&gt;
        &lt;/node&gt;
      &lt;/group&gt;
      &lt;/launch&gt;
  
      
  issue launching multiple robots edit
  noetic
  tf
  joint_state_publisher
  asked 4 mins ago
  
  dinesh gravatar image
  dinesh flag of Nepal
  740 ●152 ●209 ●243 https://dinesh99981.wi...
  I have launched two robots with same urdf with different name. And no error message is shown when launched in gazebo. The launch file is:
  
  &lt;launch&gt;
  
    &lt;!-- &lt;rosparam file=&quot;$(find bini_simulation)/config/bini_sim_hw_interface.yaml&quot; command=&quot;load&quot; ns=&quot;bini1&quot;/&gt; --&gt;
  
    &lt;include file=&quot;$(find gazebo_ros)/launch/empty_world.launch&quot;&gt;
      &lt;arg name=&quot;world_name&quot; value=&quot;$(find turtlebot3_gazebo)/worlds/turtlebot3_house.world&quot;/&gt;
      &lt;arg name=&quot;paused&quot; value=&quot;false&quot;/&gt;
      &lt;arg name=&quot;use_sim_time&quot; value=&quot;true&quot;/&gt;
      &lt;arg name=&quot;gui&quot; value=&quot;true&quot;/&gt;
      &lt;arg name=&quot;headless&quot; value=&quot;false&quot;/&gt;
      &lt;arg name=&quot;debug&quot; value=&quot;false&quot;/&gt;
    &lt;/include&gt;
  
    &lt;group ns=&quot;Bini1&quot;&gt;
      &lt;param name=&quot;tf_prefix&quot; value=&quot;Bini1_tf&quot; /&gt;
      &lt;!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot --&gt;
      &lt;node name=&quot;spawn_urdf&quot; pkg=&quot;gazebo_ros&quot; type=&quot;spawn_model&quot; 
        args=&quot;-urdf -model Bini1 -x 0 -y 0 -z 0 -param robot_description&quot; /&gt;
  
      &lt;!-- Load the URDF into the ROS Parameter Server --&gt;
      &lt;param name=&quot;robot_description&quot;
        command=&quot;$(find xacro)/xacro --inorder '$(find bini_simulation)/urdf/bini.xacro'&quot; /&gt;
    &lt;/group&gt;
  
    &lt;group ns=&quot;Bini2&quot;&gt;
      &lt;param name=&quot;tf_prefix&quot; value=&quot;Bini2_tf&quot; /&gt;
      &lt;!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot --&gt;
      &lt;node name=&quot;spawn_urdf&quot; pkg=&quot;gazebo_ros&quot; type=&quot;spawn_model&quot; 
        args=&quot;-urdf -model Bini2 -x 1 -y 0 -z 0 -param robot_description&quot; /&gt;
  
      &lt;!-- Load the URDF into the ROS Parameter Server --&gt;
      &lt;param name=&quot;robot_description&quot;
        command=&quot;$(find xacro)/xacro --inorder '$(find bini_simulation)/urdf/bini.xacro'&quot; /&gt;
    &lt;/group&gt;
  &lt;/launch&gt;
  </code></pre>
  <p>And the launch file for the ros controllers including joint_state_publisher is:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;launch&gt;
  
    &lt;arg name=&quot;serial_port&quot; default=&quot;/dev/ttyUSB0&quot;/&gt;
    &lt;arg name=&quot;use_ekf&quot; default=&quot;false&quot;/&gt;
    &lt;arg name=&quot;simulation&quot; default=&quot;false&quot;/&gt;
    &lt;arg name=&quot;robot&quot; default=&quot;$(env BINI_MODEL)&quot;/&gt;
  &lt;group ns=&quot;Bini1&quot;&gt;
    &lt;param name=&quot;tf_prefix&quot; value=&quot;Bini1_tf&quot; /&gt;
    &lt;!-- Load joint controller configurations from YAML file to parameter server --&gt;
    &lt;rosparam file=&quot;$(find motion_controllers)/config/bini_controllers.yaml&quot; command=&quot;load&quot;/&gt;
  
    &lt;param name=&quot;base_controller/enable_odom_tf&quot; type=&quot;bool&quot; value=&quot;true&quot;/&gt;
  
    &lt;group unless=&quot;$(arg simulation)&quot;&gt;
      &lt;param name=&quot;robot_description&quot; command=&quot;$(find xacro)/xacro --inorder '$(find bini_simulation)/urdf/bini.xacro'&quot; /&gt;
      &lt;rosparam file=&quot;$(find motion_controllers)/config/bini_hw_interface.yaml&quot; command=&quot;load&quot;/&gt;
      &lt;param name=&quot;/hardware_interface/serial_port&quot; type=&quot;string&quot; value=&quot;$(arg serial_port)&quot;/&gt;
      &lt;node name=&quot;bini_hw_main&quot; pkg=&quot;motion_controllers&quot; type=&quot;bini_hw_main&quot;
        output=&quot;screen&quot; launch-prefix=&quot;$(arg launch_prefix)&quot;&gt;
      &lt;/node&gt;
    &lt;/group&gt;
  
    &lt;group if=&quot;$(arg use_ekf)&quot;&gt;
      &lt;param name=&quot;base_controller/enable_odom_tf&quot; type=&quot;bool&quot; value=&quot;false&quot;/&gt;
    &lt;/group&gt;
  
    &lt;!-- load the controllers --&gt;
    &lt;node name=&quot;ros_control_controller_manager&quot; pkg=&quot;controller_manager&quot; type=&quot;controller_manager&quot; 
      respawn=&quot;false&quot; output=&quot;screen&quot; args=&quot;spawn
                joint_state_controller
                base_controller 
                head_controller 
                body_controller&quot;&gt;
    &lt;/node&gt;
  
    &lt;node name=&quot;move_head&quot; pkg=&quot;motion_controllers&quot; type=&quot;move_head&quot;&gt;
      &lt;remap from=&quot;local_plan&quot; to=&quot;move_base/NavfnROS/plan&quot;/&gt;
      &lt;remap from=&quot;command&quot; to=&quot;head_controller/command&quot;/&gt;
    &lt;/node&gt;
  
    &lt;node name=&quot;move_body&quot; pkg=&quot;motion_controllers&quot; type=&quot;move_body&quot; output=&quot;screen&quot;&gt;
      &lt;remap from=&quot;command&quot; to=&quot;body_controller/command&quot;/&gt;
      &lt;remap from=&quot;current_goal&quot; to=&quot;move_base/current_goal&quot;/&gt;
    &lt;/node&gt;
  
    &lt;node name=&quot;update_footprint&quot; pkg=&quot;motion_controllers&quot; type=&quot;update_footprint_node&quot; output=&quot;screen&quot;/&gt;
  
    &lt;!-- convert joint states to TF transforms for rviz, etc --&gt;
    &lt;node name=&quot;robot_state_publisher&quot; pkg=&quot;robot_state_publisher&quot; type=&quot;robot_state_publisher&quot;&gt;
      &lt;param name=&quot;publish_frequency&quot; type=&quot;double&quot; value=&quot;50.0&quot; /&gt;
      &lt;remap from=&quot;tf&quot; to=&quot;Bini1_tf&quot;/&gt;
    &lt;/node&gt;
  &lt;/group&gt;
  
  &lt;group ns=&quot;Bini2&quot;&gt;
    &lt;param name=&quot;tf_prefix&quot; value=&quot;Bini2_tf&quot; /&gt;
    &lt;!-- Load joint controller configurations from YAML file to parameter server --&gt;
    &lt;rosparam file=&quot;$(find motion_controllers)/config/bini_controllers.yaml&quot; command=&quot;load&quot;/&gt;
  
    &lt;param name=&quot;base_controller/enable_odom_tf&quot; type=&quot;bool&quot; value=&quot;true&quot;/&gt;
  
    &lt;group unless=&quot;$(arg simulation)&quot;&gt;
      &lt;param name=&quot;robot_description&quot; command=&quot;$(find xacro)/xacro --inorder '$(find bini_simulation)/urdf/bini.xacro'&quot; /&gt;
      &lt;rosparam file=&quot;$(find motion_controllers)/config/bini_hw_interface.yaml&quot; command=&quot;load&quot;/&gt;
      &lt;param name=&quot;/hardware_interface/serial_port&quot; type=&quot;string&quot; value=&quot;$(arg serial_port)&quot;/&gt;
      &lt;node name=&quot;bini_hw_main&quot; pkg=&quot;motion_controllers&quot; type=&quot;bini_hw_main&quot;
        output=&quot;screen&quot; launch-prefix=&quot;$(arg launch_prefix)&quot;&gt;
      &lt;/node&gt;
    &lt;/group&gt;
  
    &lt;group if=&quot;$(arg use_ekf)&quot;&gt;
      &lt;param name=&quot;base_controller/enable_odom_tf&quot; type=&quot;bool&quot; value=&quot;false&quot;/&gt;
    &lt;/group&gt;
  
    &lt;!-- load the controllers --&gt;
    &lt;node name=&quot;ros_control_controller_manager&quot; pkg=&quot;controller_manager&quot; type=&quot;controller_manager&quot; 
      respawn=&quot;false&quot; output=&quot;screen&quot; args=&quot;spawn
                joint_state_controller
                base_controller 
                head_controller 
                body_controller&quot;&gt;
    &lt;/node&gt;
  
    &lt;node name=&quot;move_head&quot; pkg=&quot;motion_controllers&quot; type=&quot;move_head&quot;&gt;
      &lt;remap from=&quot;local_plan&quot; to=&quot;move_base/NavfnROS/plan&quot;/&gt;
      &lt;remap from=&quot;command&quot; to=&quot;head_controller/command&quot;/&gt;
    &lt;/node&gt;
  
    &lt;node name=&quot;move_body&quot; pkg=&quot;motion_controllers&quot; type=&quot;move_body&quot; output=&quot;screen&quot;&gt;
      &lt;remap from=&quot;command&quot; to=&quot;body_controller/command&quot;/&gt;
      &lt;remap from=&quot;current_goal&quot; to=&quot;move_base/current_goal&quot;/&gt;
    &lt;/node&gt;
  
    &lt;node name=&quot;update_footprint&quot; pkg=&quot;motion_controllers&quot; type=&quot;update_footprint_node&quot; output=&quot;screen&quot;/&gt;
  
    &lt;!-- convert joint states to TF transforms for rviz, etc --&gt;
    &lt;node name=&quot;robot_state_publisher&quot; pkg=&quot;robot_state_publisher&quot; type=&quot;robot_state_publisher&quot;&gt;
      &lt;param name=&quot;publish_frequency&quot; type=&quot;double&quot; value=&quot;50.0&quot; /&gt;
      &lt;remap from=&quot;tf&quot; to=&quot;Bini2_tf&quot;/&gt;
    &lt;/node&gt;
  &lt;/group&gt;
  </code></pre>
  
  Here is gif of the robot being visualized in rviz: [link][1]
  <p>Here is the tf visualiztion in rqt: <a href="https://answers.ros.org/upfiles/16370535508278989.png" rel="nofollow noreferrer">link</a></p>
  <p>It looks like their is some problem in tf publisher or joint state publisher. How should i resolve this issue?</p>