0
$\begingroup$

Rosanswers logo

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

Originally posted by yyf on ROS Answers with karma: 23 on 2017-08-17

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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 (/)).


Originally posted by gvdhoorn with karma: 86574 on 2017-08-18

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by yyf on 2017-08-18:
thanks!I have added two files : bring_up.launch and controller.yaml. I tnink the problem is in the aspect of ur_driver

Comment by Soul Goumey on 2018-09-05:
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 :)

Comment by zzz on 2018-11-05:
@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/ ?

Comment by Soul Goumey on 2018-11-05:
@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

Comment by zzz on 2018-11-05:
@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

Comment by Soul Goumey on 2018-11-05:
@zzz can you then give more details about what you are trying to do exactly( ros version, errors, Modifications you did...)

Comment by zzz on 2018-11-06:
@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

Comment by gvdhoorn on 2018-11-06:\

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.

Comment by zzz on 2018-11-06:
I set them different IPs and ports in bringup and ur_common launch file ,whether the args have been communicated into the ur_driver,I'm not sure...

Comment by gvdhoorn on 2018-11-06:
I would suggest to post a new question with all the pertinent details, as @Soul Goumey also asks.

Be sure to refer to this one and clarify that it's a follow-up.

Comment by zzz on 2018-11-06:
https://answers.ros.org/question/307770/dual-arm-ur5-real-time-interconnection/ I added my code on this page.Thank you for help! @Soul Goumey @gvdhoorn

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.