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

Dual arm UR5 connection with universal robot stack

asked 2017-08-17 21:20:44 -0500

yyf gravatar image

updated 2017-08-18 04:32:03 -0500

gvdhoorn gravatar image

I want to setup a connection between PC and two UR5 arms , but the topic "follow joint tracjetory" cannot be created.The error displayed is "Action client not connected:left_arm_controller/follow_joint_trajectory" and "Action client not connected:right_arm_controller/follow_joint_trajectory" . PS:I use the package "ur_modern_driver" and my ur5 version is CB3.0.

launch file in the "ur_bringup" package:

<launch>

 <group ns="left">
   <arg name="limited" default="false"/>
   <arg name="robot_ip" default="192.168.0.108"/>
   <arg name="reverse_port" default="50001"/>
   <arg name="min_payload"  default="0.0"/>
   <arg name="max_payload"  default="5.0"/>
   <arg name="prefix" default="left_" />
  <include file="$(find ur_bringup)/launch/ur5_left_bringup.launch">
   <arg name="limited" value="$(arg limited)"/>
   <arg name="robot_ip" value="$(arg robot_ip)"/>
   <arg name="reverse_port" value="$(arg reverse_port)"/>
   <arg name="min_payload"  value="$(arg min_payload)"/>
   <arg name="max_payload"  value="$(arg max_payload)"/>
   <arg name="prefix" value="$(arg prefix)"/>
  </include>
 </group>

 <group ns="right">
   <arg name="limited" default="false"/>
   <arg name="robot_ip" default="192.168.0.109"/>
   <arg name="reverse_port" default="50002"/>
   <arg name="min_payload"  default="0.0"/>
   <arg name="max_payload"  default="5.0"/>
   <arg name="prefix" default="right_" />
  <include file="$(find ur_bringup)/launch/ur5_right_bringup.launch">
   <arg name="limited" value="$(arg limited)"/>
   <arg name="robot_ip" value="$(arg robot_ip)"/>
   <arg name="reverse_port" value="$(arg reverse_port)"/>
   <arg name="min_payload"  value="$(arg min_payload)"/>
   <arg name="max_payload"  value="$(arg max_payload)"/>
   <arg name="prefix" value="$(arg prefix)"/>
  </include>
 </group>

</launch>

controllers.yaml:

controller_list:
  - name: right_arm_controller
    action_ns: right_follow_joint_trajectory
    type: FollowJointTrajectory
    joints:
      - right_shoulder_pan_joint
      - right_shoulder_lift_joint
      - right_elbow_joint
      - right_wrist_1_joint
      - right_wrist_2_joint
      - right_wrist_3_joint

  - name: left_arm_controller
    action_ns: left_follow_joint_trajectory
    type: FollowJointTrajectory
    joints:
      - left_shoulder_pan_joint
      - left_shoulder_lift_joint
      - left_elbow_joint
      - left_wrist_1_joint
      - left_wrist_2_joint
      - left_wrist_3_joint
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2017-08-18 01:31:13 -0500

gvdhoorn gravatar image

updated 2017-08-18 04:40:50 -0500

In essence the "dual arm" aspect here is not important.

From the ROS perspective you're basically starting two instances of the same node, and need to use namespacing to avoid collisions.

From the 'error' you include it's not clear to me whether you have the namespacing configured correctly on the driver side, but if you did, then you would have to make sure that the action client config (probably MoveIt?) is aware of the namespaces / the correct topics.

You'll have to tell us more about your exact setup and configuration to be able to help you.


Edit:

PS:I use the package "ur_modern_driver" and my ur5 version is CB3.0

and:

launch file in the "ur_bringup" package:

...

  <include file="$(find ur_bringup)/launch/ur5_left_bringup.launch">

Two things here:

  1. if you're really using the ur_bringup package, then you're not using ur_modern_driver, but the old one ur_driver. You cannot use ur_bringup with ur_modern_driver.

    Use the launch files in ur_modern_driver/launch.

  2. what is in the ur5_left_bringup.launch and ur5_right_bringup.launch exactly? There should be no a need for custom launch files other than the one that includes the regular launch file twice, but in separate ns.

As to your controllers.yaml: the two instances of the driver are started in a right and a left namespace. I don't see that namespace anywhere in your controllers.yaml. The action_ns key should probably be something like right/follow_joint_trajectory (note the forward slash (/)).

edit flag offensive delete link more

Comments

thanks!I have added two files : bring_up.launch and controller.yaml. I tnink the problem is in the aspect of ur_driver

yyf gravatar image yyf  ( 2017-08-18 04:18:07 -0500 )edit

I solved the problem and now everything work as aspected. The problem was in my controllers.yaml because i didn't include the namespace name in the action_key. so i only added ur5/follow_joint_trajectory. thank you :)

Soul Goumey gravatar image Soul Goumey  ( 2018-09-05 04:17:59 -0500 )edit

@Soul Goumey Hello! I have the same problem. I wonder to know how to add the "action_key"? Did you modify the file "ur_ros_wrapper.cpp" in /ur_modern_driver/src/ ?

zzz gravatar image zzz  ( 2018-11-05 07:55:58 -0500 )edit

@zzz hello, you have the action key in urX_moveit_config/config/controllers.yaml You don’t have to modify the ur-driver.cpp and the ros-wrapper

Soul Goumey gravatar image Soul Goumey  ( 2018-11-05 09:59:31 -0500 )edit

@Soul Goumey Thank you for your reply! Before this,I have tried modified the file “controllers.yaml” ,in which I added like this:

  • name: "right_arm_controller" action_ns: ur5/follow_joint_trajectory

  • name: "right_arm_controller" action_ns: right/follow_joint_trajectory

But,it failed

zzz gravatar image zzz  ( 2018-11-05 19:49:27 -0500 )edit

@zzz can you then give more details about what you are trying to do exactly( ros version, errors, Modifications you did...)

Soul Goumey gravatar image Soul Goumey  ( 2018-11-05 22:07:26 -0500 )edit

@Soul Goumey I can't paste my code here for the limit of a comment.I did the just the same code above like the questioner @yyf.Do you have meet the binding error ever before when using urX_bringup.launch for dual arms?When I cancel the section of the binding code, it's the action sever and ompl eror

zzz gravatar image zzz  ( 2018-11-06 05:54:17 -0500 )edit

Do you have meet the binding error ever before when using urX_bringup.launch for dual arms?

you need to make sure to set different values for the reverse_port arg of the two instances of the driver. Two processes cannot bind to the same TCP port.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-06 05:56:33 -0500 )edit
0

answered 2017-08-18 02:33:36 -0500

I think,even though you have made changes to the action client(moveit), you need to make the same changes to https://github.com/ThomasTimm/ur_mode... line number.87 , and then start both the instances,this should solve the problem.

edit flag offensive delete link more

Comments

No, changing the source code is not necessary. See ns in wiki/roslaunch/XML/node - Attributes for example. The same can be used with include and group.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-18 02:42:22 -0500 )edit

Agreed..!! This seems like a better way to do it.

Anirudh_s gravatar image Anirudh_s  ( 2017-08-18 02:44:46 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2017-08-17 21:20:44 -0500

Seen: 1,185 times

Last updated: Aug 18 '17