ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After some painful hours, I've finally been able to control both robots at the same time! :) I'd like to mention how I solved the biggest challenge, just in case that anybody else has a similiar problem. Whenever I tried to define controllers for more than one robot at a time, I had problems due to the different hardware interfaces. I circumvented by using two groups with different namespaces in my launch-file. So basically, I splitted up the ros_controllers.yaml file, thus I have three controller files:

  1. controllers.yaml (the file for MoveIt, including the controller_list tag. Be sure to adjust the controller names so they are equal to the the other ones, e.g. - name: ur5_control/ur5_controller )
  2. panda_controllers.yaml (the controllers of the Panda robot for ros_control)
  3. ur5_controllers.yaml (the controllers of the UR5 robot for ros_control)

The part of my .launch file where I load the robot drivers looks like this:

<!-- Launch interface and controllers for real panda -->
  <group ns="panda_control">
    <rosparam command="load" file="$(find panda_ur5_moveit_config)/config/panda_controllers.yaml" />
    <node name="franka_control" pkg="franka_control" type="franka_control_node" output="screen" required="true">
      <rosparam command="load" file="$(find franka_control)/config/franka_control_node.yaml" />
      <param name="robot_ip" value="$(arg robot_ip_panda)" />
    </node>
    <node name="panda_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="panda_controller franka_state_controller"/>
  </group>




<!-- UR5 params -->
  <group ns="ur5_control">
    <rosparam command="load" file="$(find panda_ur5_moveit_config)/config/ur5_controllers.yaml" />
    [a lot of <arg name=... lines]

<!-- Launch interface and controllers for real UR5 -->
    <node name="ur_driver" pkg="ur_modern_driver" type="ur_driver" output="log" launch-prefix="$(arg launch_prefix)">
      <param name="robot_ip_address" type="str" value="$(arg robot_ip_ur5)"/>
      [a lot of <param name=... lines]
    </node>
    <node name="ur5_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="ur5_controller ur5_joint_state_controller"/>
  </group>

After some painful hours, I've finally been able to control both robots at the same time! :) I'd like to mention how I solved the biggest challenge, just in case that anybody else has a similiar problem. Whenever I tried to define controllers for more than one robot at a time, I had problems due to the different hardware interfaces. I circumvented by using two groups with different namespaces in my launch-file. So basically, I splitted up the ros_controllers.yaml file, thus I have three controller files:

  1. controllers.yaml (the file for MoveIt, including the controller_list tag. Be sure to adjust the controller names so they are equal to the the other ones, e.g. - name: ur5_control/ur5_controller )
  2. panda_controllers.yaml (the controllers of the Panda robot for ros_control)
  3. ur5_controllers.yaml (the controllers of the UR5 robot for ros_control)

The part of my .launch file where I load the robot drivers looks like this:

<!-- Launch interface and controllers for real panda -->
  <group ns="panda_control">
    <rosparam command="load" file="$(find panda_ur5_moveit_config)/config/panda_controllers.yaml" />
    <node name="franka_control" pkg="franka_control" type="franka_control_node" output="screen" required="true">
      <rosparam command="load" file="$(find franka_control)/config/franka_control_node.yaml" />
      <param name="robot_ip" value="$(arg robot_ip_panda)" />
    </node>
    <node name="panda_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="panda_controller franka_state_controller"/>
  </group>




<!-- UR5 params -->
  <group ns="ur5_control">
    <rosparam command="load" file="$(find panda_ur5_moveit_config)/config/ur5_controllers.yaml" />
    [a lot of <arg name=... lines]

<!-- Launch interface and controllers for real UR5 -->
    <node name="ur_driver" pkg="ur_modern_driver" type="ur_driver" output="log" launch-prefix="$(arg launch_prefix)">
      <param name="robot_ip_address" type="str" value="$(arg robot_ip_ur5)"/>
      [a lot of <param name=... lines]
    </node>
    <node name="ur5_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="ur5_controller ur5_joint_state_controller"/>
  </group>

For whatever reason I wasn't able to rename the franka_state_controller (even if I redefined it in my own controllers file in the same way). Therefore I just used the provided one.

After some painful hours, I've finally been able to control both robots at the same time! :) I'd like to mention how I solved the biggest challenge, just in case that anybody else has a similiar problem. Whenever I tried to define controllers for more than one robot at a time, I had problems due to the different hardware interfaces. I circumvented by using two groups with different namespaces in my launch-file. So basically, I splitted up the ros_controllers.yaml file, thus I have three controller files:

  1. controllers.yaml (the file for MoveIt, including the controller_list tag. Be sure to adjust the controller names so they are equal to the the other ones, e.g. - name: ur5_control/ur5_controller )
  2. panda_controllers.yaml (the controllers of the Panda robot for ros_control)
  3. ur5_controllers.yaml (the controllers of the UR5 robot for ros_control)

The part of my .launch file where I load the robot drivers looks like this:

<!-- Launch interface and controllers for real panda -->
  <group ns="panda_control">
    <rosparam command="load" file="$(find panda_ur5_moveit_config)/config/panda_controllers.yaml" />
    <node name="franka_control" pkg="franka_control" type="franka_control_node" output="screen" required="true">
      <rosparam command="load" file="$(find franka_control)/config/franka_control_node.yaml" />
      <param name="robot_ip" value="$(arg robot_ip_panda)" />
    </node>
    <node name="panda_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="panda_controller franka_state_controller"/>
  </group>




<!-- UR5 params -->
  <group ns="ur5_control">
    <rosparam command="load" file="$(find panda_ur5_moveit_config)/config/ur5_controllers.yaml" />
    [a lot of <arg name=... lines]

<!-- Launch interface and controllers for real UR5 -->
    <node name="ur_driver" pkg="ur_modern_driver" type="ur_driver" output="log" launch-prefix="$(arg launch_prefix)">
      <param name="robot_ip_address" type="str" value="$(arg robot_ip_ur5)"/>
      [a lot of <param name=... lines]
    </node>
    <node name="ur5_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="ur5_controller ur5_joint_state_controller"/>
  </group>

For whatever reason I wasn't able to rename the franka_state_controller (even if I redefined it in my own controllers file in the same way). Therefore I just used the provided one.

Also, it was very helpful to remind myself what I'm mostly doing in the launch/yaml files: I configure parameters in ROS. When ROS is running, these can always be checked by rosparam list and rosparam get [namespace/parametername].

After some painful hours, I've finally been able to control both robots at the same time! :) I'd like to mention how I solved the biggest challenge, just in case that anybody else has a similiar similar problem. Whenever I tried to define controllers for more than one robot at a time, I had problems due to the different hardware interfaces. I circumvented by using two groups with different namespaces in my launch-file. So basically, I splitted split up the ros_controllers.yaml file, thus I have three controller files:

  1. controllers.yaml (the file for MoveIt, including the controller_list tag. Be sure to adjust the controller names so they are equal to the the other ones, e.g. - name: ur5_control/ur5_controller )
  2. panda_controllers.yaml (the controllers of the Panda robot for ros_control)
  3. ur5_controllers.yaml (the controllers of the UR5 robot for ros_control)

The part of my .launch file where I load the robot drivers looks like this:

<!-- Launch interface and controllers for real panda -->
  <group ns="panda_control">
    <rosparam command="load" file="$(find panda_ur5_moveit_config)/config/panda_controllers.yaml" />
    <node name="franka_control" pkg="franka_control" type="franka_control_node" output="screen" required="true">
      <rosparam command="load" file="$(find franka_control)/config/franka_control_node.yaml" />
      <param name="robot_ip" value="$(arg robot_ip_panda)" />
    </node>
    <node name="panda_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="panda_controller franka_state_controller"/>
  </group>




<!-- UR5 params -->
  <group ns="ur5_control">
    <rosparam command="load" file="$(find panda_ur5_moveit_config)/config/ur5_controllers.yaml" />
    [a lot of <arg name=... lines]

<!-- Launch interface and controllers for real UR5 -->
    <node name="ur_driver" pkg="ur_modern_driver" type="ur_driver" output="log" launch-prefix="$(arg launch_prefix)">
      <param name="robot_ip_address" type="str" value="$(arg robot_ip_ur5)"/>
      [a lot of <param name=... lines]
    </node>
    <node name="ur5_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="ur5_controller ur5_joint_state_controller"/>
  </group>

For whatever reason I wasn't able to rename the franka_state_controller (even if I redefined it in my own controllers file in the same way). Therefore I just used the provided one.

Also, it was very helpful to remind myself what I'm mostly doing in the launch/yaml files: I configure parameters in ROS. When ROS is running, these can always be checked by rosparam list and rosparam get [namespace/parametername].