UniversalRobots / Universal_Robots_ROS_Driver

Universal Robots ROS driver supporting CB3 and e-Series
Apache License 2.0
767 stars 405 forks source link

Connection to robot drops after starting the program in the robot #312

Closed failiz closed 3 years ago

failiz commented 3 years ago

Summary

I did not manage to make the robot move. The driver connects to the robot after the program is run, but disconnects a few milliseconds later.

Versions

Impact

I cannot move the robot

Issue details

  1. I launch the driver.
  2. After that, I run the program in the robot.
  3. When I launch the "rosrun rqt_joint_trajectory_controller rqt_joint_trajectory_controller" sometimes the controller does not show up. When I can select the controller "scaled_pos_joint_traj_controller", the sliders apper but moving them does not move the robot

I have tried to:

  1. I launch the driver.
  2. Run the program in the robot with: rosservice call /ur_hardware_interface/dashboard/play
  3. And again, does not move with "rosrun rqt_joint_trajectory_controller rqt_joint_trajectory_controller"
roslaunch ur_robot_driver ur5_bringup.launch robot_ip:=192.168.56.10 kinematics_config:=/mnt/c/fai/documents/git/ROS_UR_driver/my_robot_calibration.yaml
... logging to /home/fai/.ros/log/a0cdd1b2-5bf1-11eb-9ca9-00090ffe0001/roslaunch-PC622106-31973.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://PC622106:52046/

SUMMARY
========

PARAMETERS
 * /controller_stopper/consistent_controllers: ['joint_state_con...
 * /force_torque_sensor_controller/publish_rate: 125
 * /force_torque_sensor_controller/type: force_torque_sens...
 * /hardware_control_loop/loop_hz: 125
 * /joint_group_vel_controller/joints: ['shoulder_pan_jo...
 * /joint_group_vel_controller/type: velocity_controll...
 * /joint_state_controller/publish_rate: 125
 * /joint_state_controller/type: joint_state_contr...
 * /pos_joint_traj_controller/action_monitor_rate: 20
 * /pos_joint_traj_controller/constraints/elbow_joint/goal: 0.1
 * /pos_joint_traj_controller/constraints/elbow_joint/trajectory: 0.2
 * /pos_joint_traj_controller/constraints/goal_time: 0.6
 * /pos_joint_traj_controller/constraints/shoulder_lift_joint/goal: 0.1
 * /pos_joint_traj_controller/constraints/shoulder_lift_joint/trajectory: 0.2
 * /pos_joint_traj_controller/constraints/shoulder_pan_joint/goal: 0.1
 * /pos_joint_traj_controller/constraints/shoulder_pan_joint/trajectory: 0.2
 * /pos_joint_traj_controller/constraints/stopped_velocity_tolerance: 0.05
 * /pos_joint_traj_controller/constraints/wrist_1_joint/goal: 0.1
 * /pos_joint_traj_controller/constraints/wrist_1_joint/trajectory: 0.2
 * /pos_joint_traj_controller/constraints/wrist_2_joint/goal: 0.1
 * /pos_joint_traj_controller/constraints/wrist_2_joint/trajectory: 0.2
 * /pos_joint_traj_controller/constraints/wrist_3_joint/goal: 0.1
 * /pos_joint_traj_controller/constraints/wrist_3_joint/trajectory: 0.2
 * /pos_joint_traj_controller/joints: ['shoulder_pan_jo...
 * /pos_joint_traj_controller/state_publish_rate: 125
 * /pos_joint_traj_controller/stop_trajectory_duration: 0.5
 * /pos_joint_traj_controller/type: position_controll...
 * /robot_description: <?xml version="1....
 * /robot_status_controller/handle_name: industrial_robot_...
 * /robot_status_controller/publish_rate: 10
 * /robot_status_controller/type: industrial_robot_...
 * /rosdistro: melodic
 * /rosversion: 1.14.10
 * /scaled_pos_joint_traj_controller/action_monitor_rate: 20
 * /scaled_pos_joint_traj_controller/constraints/elbow_joint/goal: 0.1
 * /scaled_pos_joint_traj_controller/constraints/elbow_joint/trajectory: 0.2
 * /scaled_pos_joint_traj_controller/constraints/goal_time: 0.6
 * /scaled_pos_joint_traj_controller/constraints/shoulder_lift_joint/goal: 0.1
 * /scaled_pos_joint_traj_controller/constraints/shoulder_lift_joint/trajectory: 0.2
 * /scaled_pos_joint_traj_controller/constraints/shoulder_pan_joint/goal: 0.1
 * /scaled_pos_joint_traj_controller/constraints/shoulder_pan_joint/trajectory: 0.2
 * /scaled_pos_joint_traj_controller/constraints/stopped_velocity_tolerance: 0.05
 * /scaled_pos_joint_traj_controller/constraints/wrist_1_joint/goal: 0.1
 * /scaled_pos_joint_traj_controller/constraints/wrist_1_joint/trajectory: 0.2
 * /scaled_pos_joint_traj_controller/constraints/wrist_2_joint/goal: 0.1
 * /scaled_pos_joint_traj_controller/constraints/wrist_2_joint/trajectory: 0.2
 * /scaled_pos_joint_traj_controller/constraints/wrist_3_joint/goal: 0.1
 * /scaled_pos_joint_traj_controller/constraints/wrist_3_joint/trajectory: 0.2
 * /scaled_pos_joint_traj_controller/joints: ['shoulder_pan_jo...
 * /scaled_pos_joint_traj_controller/state_publish_rate: 125
 * /scaled_pos_joint_traj_controller/stop_trajectory_duration: 0.5
 * /scaled_pos_joint_traj_controller/type: position_controll...
 * /scaled_vel_joint_traj_controller/action_monitor_rate: 20
 * /scaled_vel_joint_traj_controller/constraints/elbow_joint/goal: 0.1
 * /scaled_vel_joint_traj_controller/constraints/elbow_joint/trajectory: 0.1
 * /scaled_vel_joint_traj_controller/constraints/goal_time: 0.6
 * /scaled_vel_joint_traj_controller/constraints/shoulder_lift_joint/goal: 0.1
 * /scaled_vel_joint_traj_controller/constraints/shoulder_lift_joint/trajectory: 0.1
 * /scaled_vel_joint_traj_controller/constraints/shoulder_pan_joint/goal: 0.1
 * /scaled_vel_joint_traj_controller/constraints/shoulder_pan_joint/trajectory: 0.1
 * /scaled_vel_joint_traj_controller/constraints/stopped_velocity_tolerance: 0.05
 * /scaled_vel_joint_traj_controller/constraints/wrist_1_joint/goal: 0.1
 * /scaled_vel_joint_traj_controller/constraints/wrist_1_joint/trajectory: 0.1
 * /scaled_vel_joint_traj_controller/constraints/wrist_2_joint/goal: 0.1
 * /scaled_vel_joint_traj_controller/constraints/wrist_2_joint/trajectory: 0.1
 * /scaled_vel_joint_traj_controller/constraints/wrist_3_joint/goal: 0.1
 * /scaled_vel_joint_traj_controller/constraints/wrist_3_joint/trajectory: 0.1
 * /scaled_vel_joint_traj_controller/gains/elbow_joint/d: 0.1
 * /scaled_vel_joint_traj_controller/gains/elbow_joint/i: 0.05
 * /scaled_vel_joint_traj_controller/gains/elbow_joint/i_clamp: 1
 * /scaled_vel_joint_traj_controller/gains/elbow_joint/p: 5.0
 * /scaled_vel_joint_traj_controller/gains/shoulder_lift_joint/d: 0.1
 * /scaled_vel_joint_traj_controller/gains/shoulder_lift_joint/i: 0.05
 * /scaled_vel_joint_traj_controller/gains/shoulder_lift_joint/i_clamp: 1
 * /scaled_vel_joint_traj_controller/gains/shoulder_lift_joint/p: 5.0
 * /scaled_vel_joint_traj_controller/gains/shoulder_pan_joint/d: 0.1
 * /scaled_vel_joint_traj_controller/gains/shoulder_pan_joint/i: 0.05
 * /scaled_vel_joint_traj_controller/gains/shoulder_pan_joint/i_clamp: 1
 * /scaled_vel_joint_traj_controller/gains/shoulder_pan_joint/p: 5.0
 * /scaled_vel_joint_traj_controller/gains/wrist_1_joint/d: 0.1
 * /scaled_vel_joint_traj_controller/gains/wrist_1_joint/i: 0.05
 * /scaled_vel_joint_traj_controller/gains/wrist_1_joint/i_clamp: 1
 * /scaled_vel_joint_traj_controller/gains/wrist_1_joint/p: 5.0
 * /scaled_vel_joint_traj_controller/gains/wrist_2_joint/d: 0.1
 * /scaled_vel_joint_traj_controller/gains/wrist_2_joint/i: 0.05
 * /scaled_vel_joint_traj_controller/gains/wrist_2_joint/i_clamp: 1
 * /scaled_vel_joint_traj_controller/gains/wrist_2_joint/p: 5.0
 * /scaled_vel_joint_traj_controller/gains/wrist_3_joint/d: 0.1
 * /scaled_vel_joint_traj_controller/gains/wrist_3_joint/i: 0.05
 * /scaled_vel_joint_traj_controller/gains/wrist_3_joint/i_clamp: 1
 * /scaled_vel_joint_traj_controller/gains/wrist_3_joint/p: 5.0
 * /scaled_vel_joint_traj_controller/joints: ['shoulder_pan_jo...
 * /scaled_vel_joint_traj_controller/state_publish_rate: 125
 * /scaled_vel_joint_traj_controller/stop_trajectory_duration: 0.5
 * /scaled_vel_joint_traj_controller/type: velocity_controll...
 * /scaled_vel_joint_traj_controller/velocity_ff/elbow_joint: 1.0
 * /scaled_vel_joint_traj_controller/velocity_ff/shoulder_lift_joint: 1.0
 * /scaled_vel_joint_traj_controller/velocity_ff/shoulder_pan_joint: 1.0
 * /scaled_vel_joint_traj_controller/velocity_ff/wrist_1_joint: 1.0
 * /scaled_vel_joint_traj_controller/velocity_ff/wrist_2_joint: 1.0
 * /scaled_vel_joint_traj_controller/velocity_ff/wrist_3_joint: 1.0
 * /speed_scaling_state_controller/publish_rate: 125
 * /speed_scaling_state_controller/type: ur_controllers/Sp...
 * /ur_hardware_interface/headless_mode: False
 * /ur_hardware_interface/input_recipe_file: /mnt/c/fai/docume...
 * /ur_hardware_interface/joints: ['shoulder_pan_jo...
 * /ur_hardware_interface/kinematics/forearm/pitch: 0.000913438307257
 * /ur_hardware_interface/kinematics/forearm/roll: 0.00204400811051
 * /ur_hardware_interface/kinematics/forearm/x: -0.425308491312
 * /ur_hardware_interface/kinematics/forearm/y: 0
 * /ur_hardware_interface/kinematics/forearm/yaw: -2.02647984047e-06
 * /ur_hardware_interface/kinematics/forearm/z: 0
 * /ur_hardware_interface/kinematics/hash: calib_57478989539...
 * /ur_hardware_interface/kinematics/shoulder/pitch: 0
 * /ur_hardware_interface/kinematics/shoulder/roll: 0
 * /ur_hardware_interface/kinematics/shoulder/x: 0
 * /ur_hardware_interface/kinematics/shoulder/y: 0
 * /ur_hardware_interface/kinematics/shoulder/yaw: 3.59506555207e-06
 * /ur_hardware_interface/kinematics/shoulder/z: 0.0893067786108
 * /ur_hardware_interface/kinematics/upper_arm/pitch: 0
 * /ur_hardware_interface/kinematics/upper_arm/roll: 1.57067458308
 * /ur_hardware_interface/kinematics/upper_arm/x: 0.000138505292856
 * /ur_hardware_interface/kinematics/upper_arm/y: 0
 * /ur_hardware_interface/kinematics/upper_arm/yaw: 3.10622299367e-05
 * /ur_hardware_interface/kinematics/upper_arm/z: 0
 * /ur_hardware_interface/kinematics/wrist_1/pitch: -3.1394548385
 * /ur_hardware_interface/kinematics/wrist_1/roll: 3.14060066041
 * /ur_hardware_interface/kinematics/wrist_1/x: -0.392736934631
 * /ur_hardware_interface/kinematics/wrist_1/y: 0.00010938829151
 * /ur_hardware_interface/kinematics/wrist_1/yaw: -3.14158309713
 * /ur_hardware_interface/kinematics/wrist_1/z: 0.110271177297
 * /ur_hardware_interface/kinematics/wrist_2/pitch: 0
 * /ur_hardware_interface/kinematics/wrist_2/roll: 1.5706591699
 * /ur_hardware_interface/kinematics/wrist_2/x: 4.56019352817e-05
 * /ur_hardware_interface/kinematics/wrist_2/y: -0.0951258409547
 * /ur_hardware_interface/kinematics/wrist_2/yaw: 2.99583758528e-05
 * /ur_hardware_interface/kinematics/wrist_2/z: 1.30471647326e-05
 * /ur_hardware_interface/kinematics/wrist_3/pitch: 3.14159265359
 * /ur_hardware_interface/kinematics/wrist_3/roll: 1.57135758392
 * /ur_hardware_interface/kinematics/wrist_3/x: 7.49375767521e-05
 * /ur_hardware_interface/kinematics/wrist_3/y: 0.0824851589181
 * /ur_hardware_interface/kinematics/wrist_3/yaw: 3.1415703894
 * /ur_hardware_interface/kinematics/wrist_3/z: 4.62953879282e-05
 * /ur_hardware_interface/output_recipe_file: /mnt/c/fai/docume...
 * /ur_hardware_interface/reverse_port: 50001
 * /ur_hardware_interface/robot_ip: 192.168.56.10
 * /ur_hardware_interface/script_file: /mnt/c/fai/docume...
 * /ur_hardware_interface/script_sender_port: 50002
 * /ur_hardware_interface/tf_prefix:
 * /ur_hardware_interface/tool_baud_rate: 115200
 * /ur_hardware_interface/tool_parity: 0
 * /ur_hardware_interface/tool_rx_idle_chars: 1.5
 * /ur_hardware_interface/tool_stop_bits: 1
 * /ur_hardware_interface/tool_tx_idle_chars: 3.5
 * /ur_hardware_interface/tool_voltage: 0
 * /ur_hardware_interface/use_tool_communication: False
 * /vel_joint_traj_controller/action_monitor_rate: 20
 * /vel_joint_traj_controller/constraints/elbow_joint/goal: 0.1
 * /vel_joint_traj_controller/constraints/elbow_joint/trajectory: 0.1
 * /vel_joint_traj_controller/constraints/goal_time: 0.6
 * /vel_joint_traj_controller/constraints/shoulder_lift_joint/goal: 0.1
 * /vel_joint_traj_controller/constraints/shoulder_lift_joint/trajectory: 0.1
 * /vel_joint_traj_controller/constraints/shoulder_pan_joint/goal: 0.1
 * /vel_joint_traj_controller/constraints/shoulder_pan_joint/trajectory: 0.1
 * /vel_joint_traj_controller/constraints/stopped_velocity_tolerance: 0.05
 * /vel_joint_traj_controller/constraints/wrist_1_joint/goal: 0.1
 * /vel_joint_traj_controller/constraints/wrist_1_joint/trajectory: 0.1
 * /vel_joint_traj_controller/constraints/wrist_2_joint/goal: 0.1
 * /vel_joint_traj_controller/constraints/wrist_2_joint/trajectory: 0.1
 * /vel_joint_traj_controller/constraints/wrist_3_joint/goal: 0.1
 * /vel_joint_traj_controller/constraints/wrist_3_joint/trajectory: 0.1
 * /vel_joint_traj_controller/gains/elbow_joint/d: 0.1
 * /vel_joint_traj_controller/gains/elbow_joint/i: 0.05
 * /vel_joint_traj_controller/gains/elbow_joint/i_clamp: 1
 * /vel_joint_traj_controller/gains/elbow_joint/p: 5.0
 * /vel_joint_traj_controller/gains/shoulder_lift_joint/d: 0.1
 * /vel_joint_traj_controller/gains/shoulder_lift_joint/i: 0.05
 * /vel_joint_traj_controller/gains/shoulder_lift_joint/i_clamp: 1
 * /vel_joint_traj_controller/gains/shoulder_lift_joint/p: 5.0
 * /vel_joint_traj_controller/gains/shoulder_pan_joint/d: 0.1
 * /vel_joint_traj_controller/gains/shoulder_pan_joint/i: 0.05
 * /vel_joint_traj_controller/gains/shoulder_pan_joint/i_clamp: 1
 * /vel_joint_traj_controller/gains/shoulder_pan_joint/p: 5.0
 * /vel_joint_traj_controller/gains/wrist_1_joint/d: 0.1
 * /vel_joint_traj_controller/gains/wrist_1_joint/i: 0.05
 * /vel_joint_traj_controller/gains/wrist_1_joint/i_clamp: 1
 * /vel_joint_traj_controller/gains/wrist_1_joint/p: 5.0
 * /vel_joint_traj_controller/gains/wrist_2_joint/d: 0.1
 * /vel_joint_traj_controller/gains/wrist_2_joint/i: 0.05
 * /vel_joint_traj_controller/gains/wrist_2_joint/i_clamp: 1
 * /vel_joint_traj_controller/gains/wrist_2_joint/p: 5.0
 * /vel_joint_traj_controller/gains/wrist_3_joint/d: 0.1
 * /vel_joint_traj_controller/gains/wrist_3_joint/i: 0.05
 * /vel_joint_traj_controller/gains/wrist_3_joint/i_clamp: 1
 * /vel_joint_traj_controller/gains/wrist_3_joint/p: 5.0
 * /vel_joint_traj_controller/joints: ['shoulder_pan_jo...
 * /vel_joint_traj_controller/state_publish_rate: 125
 * /vel_joint_traj_controller/stop_trajectory_duration: 0.5
 * /vel_joint_traj_controller/type: velocity_controll...
 * /vel_joint_traj_controller/velocity_ff/elbow_joint: 1.0
 * /vel_joint_traj_controller/velocity_ff/shoulder_lift_joint: 1.0
 * /vel_joint_traj_controller/velocity_ff/shoulder_pan_joint: 1.0
 * /vel_joint_traj_controller/velocity_ff/wrist_1_joint: 1.0
 * /vel_joint_traj_controller/velocity_ff/wrist_2_joint: 1.0
 * /vel_joint_traj_controller/velocity_ff/wrist_3_joint: 1.0

NODES
  /
    controller_stopper (controller_stopper/node)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    ros_control_controller_spawner (controller_manager/spawner)
    ros_control_stopped_spawner (controller_manager/spawner)
    ur_hardware_interface (ur_robot_driver/ur_robot_driver_node)
  /ur_hardware_interface/
    ur_robot_state_helper (ur_robot_driver/robot_state_helper)

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

setting /run_id to a0cdd1b2-5bf1-11eb-9ca9-00090ffe0001
process[rosout-1]: started with pid [31997]
started core service [/rosout]
process[robot_state_publisher-2]: started with pid [32004]
process[ur_hardware_interface-3]: started with pid [32005]
process[ros_control_controller_spawner-4]: started with pid [32011]
process[ros_control_stopped_spawner-5]: started with pid [32013]
[ INFO] [1611237894.301124100]: Initializing dashboard client
process[controller_stopper-6]: started with pid [32021]
[ INFO] [1611237894.330778000]: Initializing urdriver
Warning: No realtime capabilities found. Consider using a realtime system for better performance
         at line 396 in /tmp/binarydeb/ros-melodic-ur-client-library-0.1.1/include/ur_client_library/comm/pipeline.h
[ INFO] [1611237894.353200100]: Waiting for controller manager service to come up on /controller_manager/switch_controller
[ INFO] [1611237894.356764100]: waitForService: Service [/controller_manager/switch_controller] has not been advertised, waiting...
process[ur_hardware_interface/ur_robot_state_helper-7]: started with pid [32029]
[INFO] [1611237895.081589]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1611237895.083712]: Controller Spawner: Waiting for service controller_manager/load_controller
Warning: No realtime capabilities found. Consider using a realtime system for better performance
         at line 396 in /tmp/binarydeb/ros-melodic-ur-client-library-0.1.1/include/ur_client_library/comm/pipeline.h
Warning: No realtime capabilities found. Consider using a realtime system for better performance
         at line 396 in /tmp/binarydeb/ros-melodic-ur-client-library-0.1.1/include/ur_client_library/comm/pipeline.h
[ INFO] [1611237896.882812700]: Loaded ur_robot_driver hardware_interface
[ INFO] [1611237897.029649700]: waitForService: Service [/controller_manager/switch_controller] is now available.
[ INFO] [1611237897.029942900]: Service available.
[ INFO] [1611237897.030148500]: Waiting for controller list service to come up on /controller_manager/list_controllers
[ INFO] [1611237897.077712100]: Service available.
[INFO] [1611237897.297604]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1611237897.309604]: Controller Spawner: Waiting for service controller_manager/switch_controller
[ERROR] [1611237897.488163500]: Could not get fresh data package from robot
[INFO] [1611237897.558113]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1611237897.687349]: Controller Spawner: Waiting for service controller_manager/unload_controller
[ INFO] [1611237897.687654500]: Robot mode is now RUNNING
[INFO] [1611237897.782074]: Loading controller: joint_state_controller
[INFO] [1611237897.945307]: Loading controller: pos_joint_traj_controller
[ INFO] [1611237898.157194200]: Robot's safety mode is now NORMAL
[INFO] [1611237898.389667]: Loading controller: scaled_pos_joint_traj_controller
[INFO] [1611237898.617880]: Loading controller: joint_group_vel_controller
[INFO] [1611237898.667377]: Loading controller: speed_scaling_state_controller
[INFO] [1611237898.819480]: Controller Spawner: Loaded controllers: pos_joint_traj_controller, joint_group_vel_controller
[INFO] [1611237898.887216]: Loading controller: force_torque_sensor_controller
[INFO] [1611237899.002197]: Controller Spawner: Loaded controllers: joint_state_controller, scaled_pos_joint_traj_controller, speed_scaling_state_controller, force_torque_sensor_controller
[INFO] [1611237899.103373]: Started controllers: joint_state_controller, scaled_pos_joint_traj_controller, speed_scaling_state_controller, force_torque_sensor_controller
[ INFO] [1611237912.553321300]: Robot requested program
[ INFO] [1611237912.553631200]: Sent program to robot
[ INFO] [1611237912.612828300]: Robot ready to receive control commands.
[ INFO] [1611237912.663855800]: Connection to robot dropped, waiting for new connection.
[ERROR] [1611237912.767024500]: Could not stop requested controllers

The log in the robot can be seen here.

Project status at point of discovered

When did you first observe the issue? When trying to setup the ROS driver.

Expected Behavior

Robot moving

Actual Behavior

Robot does not move. There are errors in the driver output. "[ERROR] [1611237897.488163500]: Could not get fresh data package from robot" appears sometimes. Even if they do not appear, I cannot move the robot.

"[ERROR] [1611237912.767024500]: Could not stop requested controllers" appears sometimes too. Even if they do not appear, I cannot move the robot.

fmauch commented 3 years ago

What is your connection between your ROS pc and your robot? This looks like there's an unreliable connection like a WIFI connection active.

failiz commented 3 years ago

I am using an Ethernet cable but with an USB-C to Ethernet adaptor. I will try with another computer with an integrated Ethernet card. Have you seen that these adaptors cause issues before?

gavanderhoorn commented 3 years ago

There are reports of connection issues by users who use USB adapters, yes.

See #182.

That hasn't been completely resolved though, so whether it's the cause is unknown at this point.

stefanscherzinger commented 3 years ago

@failiz Any updates on this?

failiz commented 3 years ago

Hi, Sorry for the delayed response, I had limited access to the robot. I managed to install it and move the robot in a computer with an integrated Ethernet card (not using the USB-C to Ethernet adapter). So, I guess we can close the issue. Thanks for the support!