UniversalRobots / Universal_Robots_ROS_Driver

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

Failed connection between pc and ur3 robot #673

Closed MagicBY closed 2 months ago

MagicBY commented 10 months ago

Affected ROS Driver version(s)

Universal_ROS_driver

Used ROS distribution.

Noetic

Which combination of platform is the ROS driver running on.

Linux

How is the UR ROS Driver installed.

Build both the ROS driver and UR Client Library from source

Which robot platform is the driver connected to.

UR CB3 robot

Robot SW / URSim version(s)

URSoftware 3.9.0.64176(Mar 01 2019)

How is the ROS driver used.

Through the robot teach pendant using External Control URCap

Issue details

Summary

Failed to connect the pc and the CB3 robot via external control urcap

Current status

Hi, I am connecting the pc and CB3 robot using a WAN cable. The robot's IP address is set as [192.168.1.10]. And I could ping the robot from the pc, the response is as follows. "$ ping 192.168.1.10 PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data. 64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=0.858 ms 64 bytes from 192.168.1.10: icmp_seq=2 ttl=64 time=1.69 ms 64 bytes from 192.168.1.10: icmp_seq=3 ttl=64 time=0.983 ms ^C --- 192.168.1.10 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2025ms rtt min/avg/max/mdev = 0.858/1.175/1.685/0.363 ms

$ nmap -p29999-50004 192.168.1.10 Starting Nmap 7.80 ( https://nmap.org ) at 2023-11-20 14:43 GMT Nmap scan report for 192.168.1.10 Host is up (0.000080s latency). Not shown: 19997 closed ports PORT STATE SERVICE 29999/tcp open bingbang 30001/tcp open pago-services1 30002/tcp open pago-services2 30003/tcp open amicon-fpsu-ra 30004/tcp open amicon-fpsu-s 30011/tcp open unknown 30012/tcp open unknown 30013/tcp open unknown 33195/tcp open unknown

Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds" .It means the robot and the robot is connected.

Setup

On the robot side, it installed three URCaps file: External control; Robotiq_Copilot; Robotiq_Grippers.

On my pc side, I am using Ubuntu 20.04 ROS Noetic.

Issue details

I first execute the command and here is the response. "boyu@boyu-Lenovo-Legion-Y7000P2020H:~/urrobot_ws$ roslaunch ur_robot_driver ur3_bringup.launch robot_ip:=192.168.1.10 kinematics_config:=/home/boyu/catkin_ws/src/UR3_resources/ur3_calibration_lab.yaml ... logging to /home/boyu/.ros/log/84bc5c78-87b3-11ee-89f6-0592585a227c/roslaunch-boyu-Lenovo-Legion-Y7000P2020H-24382.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.

Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead. Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead. Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead. Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead. started roslaunch server http://boyu-Lenovo-Legion-Y7000P2020H:40669/

SUMMARY

PARAMETERS

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 [24422] ROS_MASTER_URI=http://localhost:11311

setting /run_id to 84bc5c78-87b3-11ee-89f6-0592585a227c process[rosout-1]: started with pid [24447] started core service [/rosout] process[robot_state_publisher-2]: started with pid [24454] process[ur_hardware_interface-3]: started with pid [24455] process[ros_control_controller_spawner-4]: started with pid [24456] process[ros_control_stopped_spawner-5]: started with pid [24457] process[controller_stopper-6]: started with pid [24458] process[ur_hardware_interface/ur_robot_state_helper-7]: started with pid [24464] [ INFO] [1700491559.900305759]: Initializing dashboard client [ INFO] [1700491559.902617061]: Waiting for controller manager service to come up on /controller_manager/switch_controller [ INFO] [1700491559.903464865]: waitForService: Service [/controller_manager/switch_controller] has not been advertised, waiting... [ INFO] [1700491559.903579096]: Connected: Universal Robots Dashboard Server

[ INFO] [1700491559.912112019]: Initializing urdriver [ WARN] [1700491559.913235216]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details. [ INFO] [1700491560.003947387]: Negotiated RTDE protocol version to 2. [ INFO] [1700491560.004558458]: Setting up RTDE communication with frequency 125.000000 [INFO] [1700491560.235671]: Controller Spawner: Waiting for service controller_manager/load_controller [INFO] [1700491560.242942]: Controller Spawner: Waiting for service controller_manager/load_controller [ INFO] [1700491561.045311602]: Checking if calibration data matches connected robot. [ INFO] [1700491562.057782477]: Calibration checked successfully. [ WARN] [1700491562.065864358]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details. [ INFO] [1700491562.066029820]: Loaded ur_robot_driver hardware_interface [ INFO] [1700491562.098881722]: waitForService: Service [/controller_manager/switch_controller] is now available. [ INFO] [1700491562.098926800]: Service available. [ INFO] [1700491562.098937361]: Waiting for controller list service to come up on /controller_manager/list_controllers [ INFO] [1700491562.099268824]: Service available. [ INFO] [1700491562.291488001]: Robot mode is now RUNNING [ INFO] [1700491562.292227038]: Robot's safety mode is now NORMAL [INFO] [1700491562.357829]: Controller Spawner: Waiting for service controller_manager/switch_controller [INFO] [1700491562.359383]: Controller Spawner: Waiting for service controller_manager/unload_controller [INFO] [1700491562.360684]: Loading controller: cartesian_velocity_controller --------------------> name_space: /cartesian_velocity_controller [INFO] [1700491562.364409]: Controller Spawner: Waiting for service controller_manager/switch_controller [ INFO] [1700491562.365550571]: Successfully parsed urdf file [ INFO] [1700491562.365655724]: tip_name: wrist_3_link [ INFO] [1700491562.365689626]: root_name: base_link [ INFO] [1700491562.365720728]: Number of segments: 6 [ INFO] [1700491562.365728172]: Number of joints in chain: 6 [ INFO] [1700491562.365738509]: segment(0): shoulder_link [ INFO] [1700491562.365745962]: segment(1): upper_arm_link [ INFO] [1700491562.365753299]: segment(2): forearm_link [ INFO] [1700491562.365759463]: segment(3): wrist_1_link [ INFO] [1700491562.365782595]: segment(4): wrist_2_link [ INFO] [1700491562.365789058]: segment(5): wrist_3_link [ INFO] [1700491562.365823567]: Getting limits for joint: wrist_3_joint [ INFO] [1700491562.365832219]: Getting limits for joint: wrist_2_joint [ INFO] [1700491562.365839268]: Getting limits for joint: wrist_1_joint [ INFO] [1700491562.365847155]: Getting limits for joint: elbow_joint [ INFO] [1700491562.365854244]: Getting limits for joint: shoulder_lift_joint [ INFO] [1700491562.365861076]: Getting limits for joint: shoulder_pan_joint [ INFO] [1700491562.365868614]: Getting joint handles [ INFO] [1700491562.365876772]: shoulder_pan_joint type: RotAxis [ INFO] [1700491562.365904491]: shoulder_lift_joint type: RotAxis [ INFO] [1700491562.365933398]: elbow_joint type: RotAxis [ INFO] [1700491562.365940549]: wrist_1_joint type: RotAxis [ INFO] [1700491562.365947707]: wrist_2_joint type: RotAxis [ INFO] [1700491562.365954668]: wrist_3_joint type: RotAxis [ INFO] [1700491562.365962001]: Number of joints in handle = 6 [ INFO] [1700491562.365969505]: kdl_chain.getNrOfJoints: 6 [ INFO] [1700491562.365976088]: Finished Kinematic Base init [INFO] [1700491562.366206]: Controller Spawner: Waiting for service controller_manager/unload_controller [INFO] [1700491562.368021]: Loading controller: pos_joint_traj_controller [INFO] [1700491562.372001]: Loading controller: joint_state_controller [INFO] [1700491562.388183]: Loading controller: joint_group_vel_controller [INFO] [1700491562.396067]: Loading controller: force_torque_sensor_controller [INFO] [1700491562.403948]: Controller Spawner: Loaded controllers: pos_joint_traj_controller, joint_group_vel_controller [INFO] [1700491562.412083]: Controller Spawner: Loaded controllers: cartesian_velocity_controller, joint_state_controller, force_torque_sensor_controller [INFO] [1700491562.419992]: Started controllers: cartesian_velocity_controller, joint_state_controller, force_torque_sensor_controller "

Then I start the remoteROScontrol.urcap program from the teaching pandent. Here is the error:

Error message

"robotiq copilot: RTDE interface cannot initialize. Make sure that Ethernet/IP adapter and profinet are disabled, and that no other URCaps use the RTDE interface." And I cannot skip this problem therefore the external control is not established.

How may I solve this problem? Your advice is greatly appreciated.

Regards, Boyu

Relevant log output

No response

Accept Public visibility

urrsk commented 9 months ago

Hi @MagicBY It seems that there is at least one conflicting RTDE input subscription between the ROS driver and the Robotiq Copilot URCap. Only one RTDE connection can control an input register at a time. You can see which RTDE input subscriptions the ROS driver depending on here: https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/resources/rtde_input_recipe.txt

The same will be the case if you have enabled Ethernet/IP or Profinet fieldbus feature.

Hope this help

MagicBY commented 8 months ago

Hi @urrsk, Thanks for your reply. I couldn't find a way to diagnose this RTDE confliction both on my pc and ur3 robot teaching pendant. I reinstalled the ubuntu system and ROS. Now I still came across with the issue of connection between pc and robot. Here is a more detailed error message.

From my pc command window, it seems mostly fine. boyu@boyu:~/catkin_ws$ roslaunch ur_robot_driver ur3_bringup.launch robot_ip:=192.168.1.10 kinematics_config:=/home/boyu/catkin_ws/src/UR3_resources/ur3_calibration_lab.yaml ... logging to /home/boyu/.ros/log/986a2046-b541-11ee-a103-1d9f8af5ffd7/roslaunch-boyu-20898.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.

Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead. Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead. Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead. Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead. started roslaunch server http://boyu:43253/

SUMMARY

PARAMETERS

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 [20909] ROS_MASTER_URI=http://localhost:11311

setting /run_id to 986a2046-b541-11ee-a103-1d9f8af5ffd7 process[rosout-1]: started with pid [20919] started core service [/rosout] process[robot_state_publisher-2]: started with pid [20926] process[ur_hardware_interface-3]: started with pid [20927] process[ros_control_controller_spawner-4]: started with pid [20928] process[ros_control_stopped_spawner-5]: started with pid [20929] process[controller_stopper-6]: started with pid [20930] process[ur_hardware_interface/ur_robot_state_helper-7]: started with pid [20940] [ INFO] [1705500383.708751576]: Initializing dashboard client [ INFO] [1705500383.711136561]: Waiting for controller manager service to come up on /controller_manager/switch_controller [ INFO] [1705500383.711543451]: Connected: Universal Robots Dashboard Server

[ INFO] [1705500383.711754486]: waitForService: Service [/controller_manager/switch_controller] has not been advertised, waiting... [ INFO] [1705500383.720178504]: Initializing urdriver [ WARN] [1705500383.721597865]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details. [INFO] [1705500383.865192]: Controller Spawner: Waiting for service controller_manager/load_controller [ INFO] [1705500383.963253002]: Negotiated RTDE protocol version to 2. [ INFO] [1705500383.964066054]: Setting up RTDE communication with frequency 125.000000 [INFO] [1705500383.977334]: Controller Spawner: Waiting for service controller_manager/load_controller [ INFO] [1705500384.999151329]: Checking if calibration data matches connected robot. [ INFO] [1705500386.095446072]: Calibration checked successfully. [ WARN] [1705500386.117677757]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details. [ INFO] [1705500386.117857204]: Loaded ur_robot_driver hardware_interface [ INFO] [1705500386.156346908]: waitForService: Service [/controller_manager/switch_controller] is now available. [ INFO] [1705500386.156364395]: Service available. [ INFO] [1705500386.156373282]: Waiting for controller list service to come up on /controller_manager/list_controllers [ INFO] [1705500386.156795790]: Service available. [INFO] [1705500386.284543]: Controller Spawner: Waiting for service controller_manager/switch_controller [INFO] [1705500386.285994]: Controller Spawner: Waiting for service controller_manager/unload_controller [INFO] [1705500386.287278]: Loading controller: pos_joint_traj_controller [INFO] [1705500386.309851]: Loading controller: joint_group_vel_controller [INFO] [1705500386.317823]: Controller Spawner: Loaded controllers: pos_joint_traj_controller, joint_group_vel_controller [ INFO] [1705500386.368584280]: Robot mode is now RUNNING [ INFO] [1705500386.369191069]: Robot's safety mode is now NORMAL [INFO] [1705500386.403471]: Controller Spawner: Waiting for service controller_manager/switch_controller [INFO] [1705500386.405073]: Controller Spawner: Waiting for service controller_manager/unload_controller [INFO] [1705500386.406506]: Loading controller: cartesian_velocity_controller --------------------> name_space: /cartesian_velocity_controller [ INFO] [1705500386.410337735]: Successfully parsed urdf file [ INFO] [1705500386.410464902]: tip_name: wrist_3_link [ INFO] [1705500386.410492706]: root_name: base_link [ INFO] [1705500386.410521676]: Number of segments: 6 [ INFO] [1705500386.410550703]: Number of joints in chain: 6 [ INFO] [1705500386.410561646]: segment(0): shoulder_link [ INFO] [1705500386.410569123]: segment(1): upper_arm_link [ INFO] [1705500386.410580072]: segment(2): forearm_link [ INFO] [1705500386.410591962]: segment(3): wrist_1_link [ INFO] [1705500386.410603545]: segment(4): wrist_2_link [ INFO] [1705500386.410616096]: segment(5): wrist_3_link [ INFO] [1705500386.410632839]: Getting limits for joint: wrist_3_joint [ INFO] [1705500386.410647538]: Getting limits for joint: wrist_2_joint [ INFO] [1705500386.410657484]: Getting limits for joint: wrist_1_joint [ INFO] [1705500386.410669049]: Getting limits for joint: elbow_joint [ INFO] [1705500386.410715862]: Getting limits for joint: shoulder_lift_joint [ INFO] [1705500386.410726855]: Getting limits for joint: shoulder_pan_joint [ INFO] [1705500386.410740150]: Getting joint handles [ INFO] [1705500386.410756451]: shoulder_pan_joint type: RotAxis [ INFO] [1705500386.410775793]: shoulder_lift_joint type: RotAxis [ INFO] [1705500386.410826328]: elbow_joint type: RotAxis [ INFO] [1705500386.410838974]: wrist_1_joint type: RotAxis [ INFO] [1705500386.410852020]: wrist_2_joint type: RotAxis [ INFO] [1705500386.410865316]: wrist_3_joint type: RotAxis [ INFO] [1705500386.410880050]: Number of joints in handle = 6 [ INFO] [1705500386.410891178]: kdl_chain.getNrOfJoints: 6 [ INFO] [1705500386.410898961]: Finished Kinematic Base init [INFO] [1705500386.413713]: Loading controller: joint_state_controller [INFO] [1705500386.421755]: Loading controller: force_torque_sensor_controller [INFO] [1705500386.429760]: Controller Spawner: Loaded controllers: cartesian_velocity_controller, joint_state_controller, force_torque_sensor_controller [INFO] [1705500386.437635]: Started controllers: cartesian_velocity_controller, joint_state_controller, force_torque_sensor_controller [ INFO] [1705500390.611482761]: Robot requested program [ INFO] [1705500390.611539799]: Sent program to robot

However, when I run the remoteROScontrol.urcap file on the teaching pendant, after I press the play button, here is the error message. Please see the "play.jpg". If I press the fast forward key, the error message is shown in the "fast_forward_key.jpg".

I checked every files relate to the ur3_bringup.launch, but couldn't find the "tool_contact" variables. I am looking for advice on how to diagnose this problem and how to solve them. Thanks a lot.

Kind regards, Boyu play fast_forward_key

urrsk commented 6 months ago

@MagicBY what software version is installed on your robot. You need to use at least SW version 3.14.3 for CB3

fmauch commented 2 months ago

Closing due to inactivity. Please feel free to comment / reopen.