ros-industrial / ur_modern_driver

(deprecated) ROS 1 driver for CB1 and CB2 controllers with UR5 or UR10 robots from Universal Robots
Apache License 2.0
301 stars 341 forks source link

Can't connect two ur10 by ur10_ros_control.launch #347

Closed zhengmaoch closed 4 years ago

zhengmaoch commented 4 years ago

Hi, the follow is my controller file and launch file.

hnrob_left_arm_controller

# Settings for ros_control control loop
hardware_control_loop:
   loop_hz: 125

# Settings for ros_control hardware interface
hardware_interface:
   joints:
     - left_shoulder_pan_joint
     - left_shoulder_lift_joint
     - left_elbow_joint
     - left_wrist_1_joint
     - left_wrist_2_joint
     - left_wrist_3_joint

# Publish all joint states ----------------------------------
left_joint_state_controller:
   type:         joint_state_controller/JointStateController
   publish_rate: 125

# Publish wrench ----------------------------------
left_force_torque_sensor_controller:
   type:         force_torque_sensor_controller/ForceTorqueSensorController
   publish_rate: 125

# Joint Trajectory Controller - position based -------------------------------
# For detailed explanations of parameter see http://wiki.ros.org/joint_trajectory_controller
left_pos_based_pos_traj_controller:
   type: position_controllers/JointTrajectoryController
   joints:
     - left_shoulder_pan_joint
     - left_shoulder_lift_joint
     - left_elbow_joint
     - left_wrist_1_joint
     - left_wrist_2_joint
     - left_wrist_3_joint

   # state_publish_rate:  50 # Defaults to 50
   # action_monitor_rate: 20 # Defaults to 20
   #stop_trajectory_duration: 0 # Defaults to 0.0

# Joint Trajectory Controller -------------------------------
# For detailed explanations of parameter see http://wiki.ros.org/joint_trajectory_controller
left_vel_based_pos_traj_controller:
   type: velocity_controllers/JointTrajectoryController
   joints:
     - left_shoulder_pan_joint
     - left_shoulder_lift_joint
     - left_elbow_joint
     - left_wrist_1_joint
     - left_wrist_2_joint
     - left_wrist_3_joint
   gains:
      #!!These values have not been optimized!!
      left_shoulder_pan_joint:  {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}
      left_shoulder_lift_joint: {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}
      left_elbow_joint:         {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}
      left_wrist_1_joint:       {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}
      left_wrist_2_joint:       {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}
      left_wrist_3_joint:       {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}

   # Use a feedforward term to reduce the size of PID gains
   velocity_ff:
      left_shoulder_pan_joint: 1.0
      left_shoulder_lift_joint: 1.0
      left_elbow_joint: 1.0
      left_wrist_1_joint: 1.0
      left_wrist_2_joint: 1.0
      left_wrist_3_joint: 1.0

   # state_publish_rate:  50 # Defaults to 50
   # action_monitor_rate: 20 # Defaults to 20
   #stop_trajectory_duration: 0 # Defaults to 0.0

# Pass an array of joint velocities directly to the joints
left_joint_group_vel_controller:
   type: velocity_controllers/JointGroupVelocityController
   joints:
     - left_shoulder_pan_joint
     - left_shoulder_lift_joint
     - left_elbow_joint
     - left_wrist_1_joint
     - left_wrist_2_joint
     - left_wrist_3_joint

hnrob_right_arm_controller

# Settings for ros_control control loop
hardware_control_loop:
   loop_hz: 125

# Settings for ros_control hardware interface
hardware_interface:
   joints:
     - right_shoulder_pan_joint
     - right_shoulder_lift_joint
     - right_elbow_joint
     - right_wrist_1_joint
     - right_wrist_2_joint
     - right_wrist_3_joint

# Publish all joint states ----------------------------------
right_joint_state_controller:
   type:         joint_state_controller/JointStateController
   publish_rate: 125

# Publish wrench ----------------------------------
right_force_torque_sensor_controller:
   type:         force_torque_sensor_controller/ForceTorqueSensorController
   publish_rate: 125

# Joint Trajectory Controller - position based -------------------------------
# For detailed explanations of parameter see http://wiki.ros.org/joint_trajectory_controller
right_pos_based_pos_traj_controller:
   type: position_controllers/JointTrajectoryController
   joints:
     - right_shoulder_pan_joint
     - right_shoulder_lift_joint
     - right_elbow_joint
     - right_wrist_1_joint
     - right_wrist_2_joint
     - right_wrist_3_joint

# Joint Trajectory Controller -------------------------------
# For detailed explanations of parameter see http://wiki.ros.org/joint_trajectory_controller
right_vel_based_pos_traj_controller:
   type: velocity_controllers/JointTrajectoryController
   joints:
     - right_shoulder_pan_joint
     - right_shoulder_lift_joint
     - right_elbow_joint
     - right_wrist_1_joint
     - right_wrist_2_joint
     - right_wrist_3_joint
   gains:
      #!!These values have not been optimized!!
      right_shoulder_pan_joint:  {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}
      right_shoulder_lift_joint: {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}
      right_elbow_joint:         {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}
      right_wrist_1_joint:       {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}
      right_wrist_2_joint:       {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}
      right_wrist_3_joint:       {p: 5.0,  i: 0.05, d: 0.1, i_clamp: 1}

   # Use a feedforward term to reduce the size of PID gains
   velocity_ff:
      right_shoulder_pan_joint: 1.0
      right_shoulder_lift_joint: 1.0
      right_elbow_joint: 1.0
      right_wrist_1_joint: 1.0
      right_wrist_2_joint: 1.0
      right_wrist_3_joint: 1.0

   # state_publish_rate:  50 # Defaults to 50
   # action_monitor_rate: 20 # Defaults to 20
   #stop_trajectory_duration: 0 # Defaults to 0.0

# Pass an array of joint velocities directly to the joints
right_joint_group_vel_controller:
   type: velocity_controllers/JointGroupVelocityController
   joints:
     - right_shoulder_pan_joint
     - right_shoulder_lift_joint
     - right_elbow_joint
     - right_wrist_1_joint
     - right_wrist_2_joint
     - right_wrist_3_joint

hnrob_left_arm_bringup.launch

<launch>

  <!-- GDB functionality -->
  <arg name="debug" default="false" />
  <arg unless="$(arg debug)" name="launch_prefix" value="" />
  <arg     if="$(arg debug)" name="launch_prefix" value="gdb --ex run --args" />

  <arg name="robot_ip" doc="IP of the controller" default="192.168.1.101"/>
  <arg name="reverse_ip" default="" doc="IP of the computer running the driver" />
  <arg name="reverse_port" default="50001"/>
  <arg name="limited" default="false"/>
  <arg name="min_payload"  default="0.0"/>
  <arg name="max_payload"  default="3.0"/>
  <arg name="prefix" default="" />
  <arg name="max_velocity" default="10.0"/>
  <arg name="base_frame" default="$(arg prefix)base_link" />
  <arg name="tool_frame" default="$(arg prefix)tool_link" />
  <arg name="shutdown_on_disconnect" default="true" />
  <arg name="controllers" default="left_joint_state_controller left_pos_based_pos_traj_controller"/>
  <arg name="stopped_controllers" default="left_joint_group_vel_controller left_force_torque_sensor_controller left_vel_based_pos_traj_controller"/>

  <!-- robot model -->
  <param name="robot_description" textfile="$(find hnrob_description)/urdf/hnrob.urdf" />

  <!-- Load hardware interface -->
  <node name="left_arm_hardware_interface" 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)"/>
    <param name="reverse_ip_address" type="str" value="$(arg reverse_ip)" />
    <param name="reverse_port" type="int" value="$(arg reverse_port)" />
    <param name="min_payload" type="double" value="$(arg min_payload)"/>
    <param name="max_payload" type="double" value="$(arg max_payload)"/>
    <param name="max_velocity" type="double" value="$(arg max_velocity)"/>
    <param name="use_ros_control" type="bool" value="true"/>
    <param name="servoj_gain" type="double" value="750" />
    <param name="prefix" value="$(arg prefix)" />
    <param name="base_frame" type="str" value="$(arg base_frame)"/>
    <param name="tool_frame" type="str" value="$(arg tool_frame)"/>
    <param name="shutdown_on_disconnect" type="bool" value="$(arg shutdown_on_disconnect)"/>
  </node>

  <!-- Load joint controller configurations from YAML file to parameter server -->
  <rosparam file="$(find hnrob_control)/config/hnrob_left_arm_controller.yaml" command="load"/>

  <node name="left_ros_control_controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
    output="screen" args="$(arg controllers)" />

  <node name="left_ros_control_controller_manager" pkg="controller_manager" type="controller_manager" respawn="false"
    output="screen" args="load $(arg stopped_controllers)" />

  <node name="left_robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>

</launch>

hnrob_right_arm_bringup.launch

<launch>

  <!-- GDB functionality -->
  <arg name="debug" default="false" />
  <arg unless="$(arg debug)" name="launch_prefix" value="" />
  <arg     if="$(arg debug)" name="launch_prefix" value="gdb --ex run --args" />

  <arg name="robot_ip" doc="IP of the controller" default="192.168.1.102"/>
  <arg name="reverse_ip" default="" doc="IP of the computer running the driver" />
  <arg name="reverse_port" default="50002"/>
  <arg name="limited" default="false"/>
  <arg name="min_payload"  default="0.0"/>
  <arg name="max_payload"  default="3.0"/>
  <arg name="prefix" default="" />
  <arg name="max_velocity" default="10.0"/>
  <arg name="base_frame" default="$(arg prefix)base_link" />
  <arg name="tool_frame" default="$(arg prefix)tool_link" />
  <arg name="shutdown_on_disconnect" default="true" />
  <arg name="controllers" default="right_joint_state_controller right_pos_based_pos_traj_controller"/>
  <arg name="stopped_controllers" default="right_joint_group_vel_controller right_force_torque_sensor_controller right_vel_based_pos_traj_controller"/>

  <!-- robot model -->
  <param name="robot_description" textfile="$(find hnrob_description)/urdf/hnrob.urdf" />

  <!-- Load hardware interface -->
  <node name="right_arm_hardware_interface" 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)"/>
    <param name="reverse_ip_address" type="str" value="$(arg reverse_ip)" />
    <param name="reverse_port" type="int" value="$(arg reverse_port)" />
    <param name="min_payload" type="double" value="$(arg min_payload)"/>
    <param name="max_payload" type="double" value="$(arg max_payload)"/>
    <param name="max_velocity" type="double" value="$(arg max_velocity)"/>
    <param name="use_ros_control" type="bool" value="true"/>
    <param name="servoj_gain" type="double" value="750" />
    <param name="prefix" value="$(arg prefix)" />
    <param name="base_frame" type="str" value="$(arg base_frame)"/>
    <param name="tool_frame" type="str" value="$(arg tool_frame)"/>
    <param name="shutdown_on_disconnect" type="bool" value="$(arg shutdown_on_disconnect)"/>
  </node>

  <!-- Load joint controller configurations from YAML file to parameter server -->
  <rosparam file="$(find hnrob_control)/config/hnrob_right_arm_controller.yaml" command="load"/>

  <node name="right_ros_control_controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
    output="screen" args="$(arg controllers)" />

  <node name="right_ros_control_controller_manager" pkg="controller_manager" type="controller_manager" respawn="false"
    output="screen" args="load $(arg stopped_controllers)" />

  <node name="right_robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>

</launch>

terminal1

$ roslaunch hnrob_left_arm_bringup.launch
... logging to /home/fenjin/.ros/log/a877df70-d2db-11e9-86db-3c6aa740d0df/roslaunch-kinetic-5133.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/loader.py:409: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Pleas
e read https://msg.pyyaml.org/load for full details.
  data = yaml.load(text)
started roslaunch server http://kinetic:37531/

SUMMARY
========

PARAMETERS
 * /hardware_control_loop/loop_hz: 125
 * /hardware_interface/joints: ['left_shoulder_p...
 * /left_arm_hardware_interface/base_frame: base_link
 * /left_arm_hardware_interface/max_payload: 3.0
 * /left_arm_hardware_interface/max_velocity: 10.0
 * /left_arm_hardware_interface/min_payload: 0.0
 * /left_arm_hardware_interface/prefix:
 * /left_arm_hardware_interface/reverse_ip_address:
 * /left_arm_hardware_interface/reverse_port: 50001
 * /left_arm_hardware_interface/robot_ip_address: 192.168.1.101
 * /left_arm_hardware_interface/servoj_gain: 750.0
 * /left_arm_hardware_interface/shutdown_on_disconnect: True
 * /left_arm_hardware_interface/tool_frame: tool_link
 * /left_arm_hardware_interface/use_ros_control: True
 * /left_force_torque_sensor_controller/publish_rate: 125
 * /left_force_torque_sensor_controller/type: force_torque_sens...
 * /left_joint_group_vel_controller/joints: ['left_shoulder_p...
 * /left_joint_group_vel_controller/type: velocity_controll...
 * /left_joint_state_controller/publish_rate: 125
 * /left_joint_state_controller/type: joint_state_contr...
 * /left_pos_based_pos_traj_controller/joints: ['left_shoulder_p...
 * /left_pos_based_pos_traj_controller/type: position_controll...
 * /left_vel_based_pos_traj_controller/gains/left_elbow_joint/d: 0.1
 * /left_vel_based_pos_traj_controller/gains/left_elbow_joint/i: 0.05
 * /left_vel_based_pos_traj_controller/gains/left_elbow_joint/i_clamp: 1
 * /left_vel_based_pos_traj_controller/gains/left_elbow_joint/p: 5.0
 * /left_vel_based_pos_traj_controller/gains/left_shoulder_lift_joint/d: 0.1
 * /left_vel_based_pos_traj_controller/gains/left_shoulder_lift_joint/i: 0.05
 * /left_vel_based_pos_traj_controller/gains/left_shoulder_lift_joint/i_clamp: 1
 * /left_vel_based_pos_traj_controller/gains/left_shoulder_lift_joint/p: 5.0
 * /left_vel_based_pos_traj_controller/gains/left_shoulder_pan_joint/d: 0.1
 * /left_vel_based_pos_traj_controller/gains/left_shoulder_pan_joint/i: 0.05
 * /left_vel_based_pos_traj_controller/gains/left_shoulder_pan_joint/i_clamp: 1
 * /left_vel_based_pos_traj_controller/gains/left_shoulder_pan_joint/p: 5.0
 * /left_vel_based_pos_traj_controller/gains/left_wrist_1_joint/d: 0.1
 * /left_vel_based_pos_traj_controller/gains/left_wrist_1_joint/i: 0.05
 * /left_vel_based_pos_traj_controller/gains/left_wrist_1_joint/i_clamp: 1
 * /left_vel_based_pos_traj_controller/gains/left_wrist_1_joint/p: 5.0
 * /left_vel_based_pos_traj_controller/gains/left_wrist_2_joint/d: 0.1
 * /left_vel_based_pos_traj_controller/gains/left_wrist_2_joint/i: 0.05
 * /left_vel_based_pos_traj_controller/gains/left_wrist_2_joint/i_clamp: 1
 * /left_vel_based_pos_traj_controller/gains/left_wrist_2_joint/p: 5.0
 * /left_vel_based_pos_traj_controller/gains/left_wrist_3_joint/d: 0.1
 * /left_vel_based_pos_traj_controller/gains/left_wrist_3_joint/i: 0.05
 * /left_vel_based_pos_traj_controller/gains/left_wrist_3_joint/i_clamp: 1
 * /left_vel_based_pos_traj_controller/gains/left_wrist_3_joint/p: 5.0
 * /left_vel_based_pos_traj_controller/joints: ['left_shoulder_p...
 * /left_vel_based_pos_traj_controller/type: velocity_controll...
 * /left_vel_based_pos_traj_controller/velocity_ff/left_elbow_joint: 1.0
 * /left_vel_based_pos_traj_controller/velocity_ff/left_shoulder_lift_joint: 1.0
 * /left_vel_based_pos_traj_controller/velocity_ff/left_shoulder_pan_joint: 1.0
 * /left_vel_based_pos_traj_controller/velocity_ff/left_wrist_1_joint: 1.0
 * /left_vel_based_pos_traj_controller/velocity_ff/left_wrist_2_joint: 1.0
 * /left_vel_based_pos_traj_controller/velocity_ff/left_wrist_3_joint: 1.0
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    left_arm_hardware_interface (ur_modern_driver/ur_driver)
    left_robot_state_publisher (robot_state_publisher/robot_state_publisher)
    left_ros_control_controller_manager (controller_manager/controller_manager)
    left_ros_control_controller_spawner (controller_manager/spawner)

auto-starting new master
process[master]: started with pid [5143]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to a877df70-d2db-11e9-86db-3c6aa740d0df
process[rosout-1]: started with pid [5156]
started core service [/rosout]
process[left_arm_hardware_interface-2]: started with pid [5173]
process[left_ros_control_controller_spawner-3]: started with pid [5174]
process[left_ros_control_controller_manager-4]: started with pid [5176]
process[left_robot_state_publisher-5]: started with pid [5191]
[INFO] [1568017648.840611]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1568017649.144039]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1568017649.145776]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1568017649.147752]: Loading controller: left_joint_state_controller
[INFO] [1568017649.156916]: Loading controller: left_pos_based_pos_traj_controller
[INFO] [1568017649.198247]: Controller Spawner: Loaded controllers: left_joint_state_controller, left_pos_based_pos_traj_controller
[INFO] [1568017649.266817]: Started controllers: left_joint_state_controller, left_pos_based_pos_traj_controller
Loaded left_joint_group_vel_controller
Loaded left_force_torque_sensor_controller
Loaded left_vel_based_pos_traj_controller
[left_ros_control_controller_manager-4] process has finished cleanly
log file: /home/fenjin/.ros/log/a877df70-d2db-11e9-86db-3c6aa740d0df/left_ros_control_controller_manager-4*.log

terminal2

$ roslaunch hnrob_right_arm_bringup.launch
... logging to /home/fenjin/.ros/log/a877df70-d2db-11e9-86db-3c6aa740d0df/roslaunch-kinetic-5870.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/loader.py:409: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Pleas
e read https://msg.pyyaml.org/load for full details.
  data = yaml.load(text)
started roslaunch server http://kinetic:35687/

SUMMARY
========

PARAMETERS
 * /hardware_control_loop/loop_hz: 125
 * /hardware_interface/joints: ['right_shoulder_...
 * /right_arm_hardware_interface/base_frame: base_link
 * /right_arm_hardware_interface/max_payload: 3.0
 * /right_arm_hardware_interface/max_velocity: 10.0
 * /right_arm_hardware_interface/min_payload: 0.0
 * /right_arm_hardware_interface/prefix:
 * /right_arm_hardware_interface/reverse_ip_address:
 * /right_arm_hardware_interface/reverse_port: 50002
 * /right_arm_hardware_interface/robot_ip_address: 192.168.1.102
 * /right_arm_hardware_interface/servoj_gain: 750.0
 * /right_arm_hardware_interface/shutdown_on_disconnect: True
 * /right_arm_hardware_interface/tool_frame: tool_link
 * /right_arm_hardware_interface/use_ros_control: True
 * /right_force_torque_sensor_controller/publish_rate: 125
 * /right_force_torque_sensor_controller/type: force_torque_sens...
 * /right_joint_group_vel_controller/joints: ['right_shoulder_...
 * /right_joint_group_vel_controller/type: velocity_controll...
 * /right_joint_state_controller/publish_rate: 125
 * /right_joint_state_controller/type: joint_state_contr...
 * /right_pos_based_pos_traj_controller/joints: ['right_shoulder_...
 * /right_pos_based_pos_traj_controller/type: position_controll...
 * /right_vel_based_pos_traj_controller/gains/right_elbow_joint/d: 0.1
 * /right_vel_based_pos_traj_controller/gains/right_elbow_joint/i: 0.05
 * /right_vel_based_pos_traj_controller/gains/right_elbow_joint/i_clamp: 1
 * /right_vel_based_pos_traj_controller/gains/right_elbow_joint/p: 5.0
 * /right_vel_based_pos_traj_controller/gains/right_shoulder_lift_joint/d: 0.1
 * /right_vel_based_pos_traj_controller/gains/right_shoulder_lift_joint/i: 0.05
 * /right_vel_based_pos_traj_controller/gains/right_shoulder_lift_joint/i_clamp: 1
 * /right_vel_based_pos_traj_controller/gains/right_shoulder_lift_joint/p: 5.0
 * /right_vel_based_pos_traj_controller/gains/right_shoulder_pan_joint/d: 0.1
 * /right_vel_based_pos_traj_controller/gains/right_shoulder_pan_joint/i: 0.05
 * /right_vel_based_pos_traj_controller/gains/right_shoulder_pan_joint/i_clamp: 1
 * /right_vel_based_pos_traj_controller/gains/right_shoulder_pan_joint/p: 5.0
 * /right_vel_based_pos_traj_controller/gains/right_wrist_1_joint/d: 0.1
 * /right_vel_based_pos_traj_controller/gains/right_wrist_1_joint/i: 0.05
 * /right_vel_based_pos_traj_controller/gains/right_wrist_1_joint/i_clamp: 1
 * /right_vel_based_pos_traj_controller/gains/right_wrist_1_joint/p: 5.0
 * /right_vel_based_pos_traj_controller/gains/right_wrist_2_joint/d: 0.1
 * /right_vel_based_pos_traj_controller/gains/right_wrist_2_joint/i: 0.05
 * /right_vel_based_pos_traj_controller/gains/right_wrist_2_joint/i_clamp: 1
 * /right_vel_based_pos_traj_controller/gains/right_wrist_2_joint/p: 5.0
 * /right_vel_based_pos_traj_controller/gains/right_wrist_3_joint/d: 0.1
 * /right_vel_based_pos_traj_controller/gains/right_wrist_3_joint/i: 0.05
 * /right_vel_based_pos_traj_controller/gains/right_wrist_3_joint/i_clamp: 1
 * /right_vel_based_pos_traj_controller/gains/right_wrist_3_joint/p: 5.0
 * /right_vel_based_pos_traj_controller/joints: ['right_shoulder_...
 * /right_vel_based_pos_traj_controller/type: velocity_controll...
 * /right_vel_based_pos_traj_controller/velocity_ff/right_elbow_joint: 1.0
 * /right_vel_based_pos_traj_controller/velocity_ff/right_shoulder_lift_joint: 1.0
 * /right_vel_based_pos_traj_controller/velocity_ff/right_shoulder_pan_joint: 1.0
 * /right_vel_based_pos_traj_controller/velocity_ff/right_wrist_1_joint: 1.0
 * /right_vel_based_pos_traj_controller/velocity_ff/right_wrist_2_joint: 1.0
 * /right_vel_based_pos_traj_controller/velocity_ff/right_wrist_3_joint: 1.0
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    right_arm_hardware_interface (ur_modern_driver/ur_driver)
    right_robot_state_publisher (robot_state_publisher/robot_state_publisher)
    right_ros_control_controller_manager (controller_manager/controller_manager)
    right_ros_control_controller_spawner (controller_manager/spawner)

ROS_MASTER_URI=http://localhost:11311

process[right_arm_hardware_interface-1]: started with pid [5887]
process[right_ros_control_controller_spawner-2]: started with pid [5909]
process[right_ros_control_controller_manager-3]: started with pid [5910]
process[right_robot_state_publisher-4]: started with pid [5911]
Error when loading right_joint_group_vel_controller
Loaded right_force_torque_sensor_controller
Error when loading right_vel_based_pos_traj_controller
[right_ros_control_controller_manager-3] process has finished cleanly
log file: /home/fenjin/.ros/log/a877df70-d2db-11e9-86db-3c6aa740d0df/right_ros_control_controller_manager-3*.log
[INFO] [1568017712.451550]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1568017712.452922]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1568017712.454316]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1568017712.455703]: Loading controller: right_joint_state_controller
[INFO] [1568017712.462197]: Loading controller: right_pos_based_pos_traj_controller
[ERROR] [1568017713.470709]: Failed to load right_pos_based_pos_traj_controller
[INFO] [1568017713.471101]: Controller Spawner: Loaded controllers: right_joint_state_controller
[ERROR] [1568017713.472964314]: Could not start controller with name right_joint_state_controller because no controller with this name exists
[ERROR] [1568017713.473204]: Failed to start controllers: right_joint_state_controller

terminal1

[ERROR] [1568017712.299555223]: Exception thrown: Could not find resource 'right_shoulder_pan_joint' in 'VelocityInterface'.
[ERROR] [1568017712.299598315]: Failed to initialize the controller
[ERROR] [1568017712.299623155]: Initializing controller 'right_joint_group_vel_controller' failed
[ERROR] [1568017712.310559036]: Could not find joint 'right_shoulder_pan_joint' in 'hardware_interface::VelocityJointInterface'.
[ERROR] [1568017712.310614303]: Failed to initialize the controller
[ERROR] [1568017712.310631314]: Initializing controller 'right_vel_based_pos_traj_controller' failed
[ERROR] [1568017712.469722644]: Could not find joint 'right_shoulder_pan_joint' in 'hardware_interface::PositionJointInterface'.
[ERROR] [1568017712.469788770]: Failed to initialize the controller
[ERROR] [1568017712.469819240]: Initializing controller 'right_pos_based_pos_traj_controller' failed
[left_arm_hardware_interface-2] process has died [pid 5173, exit code 1, cmd /home/fenjin/hnrob_ws/devel/lib/ur_modern_driver/ur_driver __name:=left_arm_hardware_interface __log:=
/home/fenjin/.ros/log/a877df70-d2db-11e9-86db-3c6aa740d0df/left_arm_hardware_interface-2.log].
log file: /home/fenjin/.ros/log/a877df70-d2db-11e9-86db-3c6aa740d0df/left_arm_hardware_interface-2*.log
gavanderhoorn commented 4 years ago

This will only work if you also have a composite xacro that combines two instances of the ur10_robot xacro macro with the appropriate left_ and right_ prefixes.

Or two stand-alone ur10_robot instances (ie: not in the same file/model) still with the appropriate prefixes and two robot_description parameters in the appropriate namespace.

If you don't have that, that would explain why the controllers cannot find the joints (as there are no right_... and left_... joints in the default xacro macro).

gavanderhoorn commented 4 years ago

As this is a configuration issue and not an issue with the package in this repository, I'm going to close this.

If it turns out this is indeed an issue with ur_modern_driver (and not with the configuration, ros_control controllers or something else), we can re-open and investigate.

In the meantime, please feel free to keep commenting of course.

zhengmaoch commented 4 years ago

yes, I hava a composite urdf that combines two instances, follow is my urdf.

urdf ```xml transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 true true true true true true transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 transmission_interface/SimpleTransmission hardware_interface/PositionJointInterface 1 true true true true true true gazebo_ros_control/DefaultRobotHWSim true / 20 1.047198 800 600 R8G8B8 0.05 3 0.2 true 1.0 kinect_camera_ir /kinect_camera/image_raw /kinect_camera/depth/camera_info /kinect_camera/depth/image_raw /kinect_camera/depth/camera_info /kinect_camera/depth/points kinect_camera 0.5 3.0 0.00000001 0.00000001 0.00000001 0.00000001 0.00000001 0 0 0 0 0 0 0 0 0 0 0 false 40 720 1 -1.570796 1.570796 0.10 30.0 0.01 gaussian 0.0 0.01 /hnrob/laser/scan hokuyo_link ```
UmutUz commented 3 years ago

Does anyone ever solved this problem? I try practically the same thing: Have 2 robots UR10, have one xacro for each robot and call them from a third one. Problem is: When launching the bringup the joints of one robot are not found (same error as the OP). Ive wasted days trying to get the controllers work. Does anyone have an idea how to do the controller files?

gavanderhoorn commented 3 years ago

@UmutUz: can you tell us what controller you have? A CB3 or a CB2?

UmutUz commented 3 years ago

@gavanderhoorn I use a CB3. ROS Melodic Ubuntu 18.04. Tried lots of lots of stuff. Tried to replicate the controller.yaml made by the moveit setup assistant, namespaces, groups thought I would try to load 2 yamls and managed to get as far as OP but now I am stuck same error over and over. :/

UmutUz commented 3 years ago

@gavanderhoorn I used pretty much everything from the Universal_Robots_Driver git, working fine with one robot, making the urdf of 2 worked fine in rviz too (using the fake_controllers.yaml). I have tried so many things at this point I really don't know what else I could do lol.

gavanderhoorn commented 3 years ago

I use a CB3.

then please do not post here, as this driver should not be used with CB3 controllers any more.

I used pretty much everything from the Universal_Robots_Driver git,

Then please post your issue on the tracker there, instead of in a comment under an already closed issue on a tracker of a deprecated driver.

UmutUz commented 3 years ago

@gavanderhoorn alright, thanks for guiding!