I’m trying to connect my pc to ur5 with an ethernet cable. When I tried to run a program from the pendant, a popup shows “The connection to the remote PC at 172.22.22.1:50002 could not be established. Reason: Connection refused.”
I checked the firewall. The status is disabled.
Even, pinging the IP addresses is also working. Not sure, why the error says connection refused.
More information is needed about your setup to help you here as there are many ways that a PC can interact with a UR robot. Are you talking about a ROS connection here?
Error:
[ INFO] [1635804505.717563440]: Waiting for controller manager service to come up on /controller_manager/switch_controller
[ INFO] [1635804505.721090337]: Initializing dashboard client
[ INFO] [1635804505.722433840]: waitForService: Service [/controller_manager/switch_controller] has not been advertised, waiting…
[ INFO] [1635804505.724842974]: Connected: Universal Robots Dashboard Server.
[ INFO] [1635804505.736611855]: waitForService: Service [/ur_hardware_interface/dashboard/play] has not been advertised, waiting…
[ INFO] [1635804505.748223083]: Initializing urdriver
[ WARN] [1635804505.749180976]: No realtime capabilities found. Consider using a realtime system for better performance
[ INFO] [1635804505.759193665]: waitForService: Service [/ur_hardware_interface/dashboard/play] is now available.
[INFO] [1635804506.051336]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1635804506.089773]: Controller Spawner: Waiting for service controller_manager/load_controller
[ INFO] [1635804506.197248908]: Negotiated RTDE protocol version to 2.
[ INFO] [1635804506.197940857]: Setting up RTDE communication with frequency 125.000000
[ INFO] [1635804507.221189952]: Checking if calibration data matches connected robot.
[ WARN] [1635804507.221904867]: No realtime capabilities found. Consider using a realtime system for better performance
[ INFO] [1635804508.317021240]: Calibration checked successfully.
[ WARN] [1635804508.344000205]: No realtime capabilities found. Consider using a realtime system for better performance
[ INFO] [1635804508.344302293]: Loaded ur_robot_driver hardware_interface
terminate called after throwing an instance of ‘std::runtime_error’
what(): Did not find ‘target_q’ in data sent from robot. This should not happen!
[ INFO] [1635804508.386043241]: waitForService: Service [/controller_manager/switch_controller] is now available.
[ INFO] [1635804508.386066908]: Service available.
[ INFO] [1635804508.386077734]: Waiting for controller list service to come up on /controller_manager/list_controllers
[ INFO] [1635804508.386746135]: Service available.
[WARN] [1635804508.478895]: wait_for_service(/controller_manager/load_controller): failed to contact, will keep trying
[WARN] [1635804508.519313]: wait_for_service(/controller_manager/load_controller): failed to contact, will keep trying
REQUIRED process [ur_hardware_interface-3] has died!
process has died [pid 15343, exit code -6, cmd /home/dinesh/mr_ws/devel_isolated/ur_robot_driver/lib/ur_robot_driver/ur_robot_driver_node __name:=ur_hardware_interface __log:=/home/dinesh/.ros/log/3ba61f5c-3b60-11ec-b81c-3c2c30f01a2e/ur_hardware_interface-3.log].
log file: /home/dinesh/.ros/log/3ba61f5c-3b60-11ec-b81c-3c2c30f01a2e/ur_hardware_interface-3*.log
Initiating shutdown!
If you haven’t already, I’d recommend looking through previously addressed issues on the driver github repository to see if anything matches your problem. If you can’t find anything then raising the issue there would make sense.
Hey, thanks for replying and sorry for not elaborating.
I am working on ROS2 Foxy, my network setup is UR3e (192.168.0.4) > router > PC (Ubuntu with IP 192.168.0.2 and another network for docker with IP 172.17.0.1) > ROS2 (through docker with IP 172.17.0.2)
I set up host IP on the robot 192.168.0.2, and robot’s IP 192.168.0.4
I installed the external control urcap
I tried with both enable/disable remote control, and with both local/remote control on teach pendant
If you run the driver inside your docker container you’ll have to make sure that the robot can reach it either by adding some routing schemes or by using port forwarding when starting your docker container.
For example, the robot will try to connect to port 50002. The ROS driver will open this port inside the docker container, but this will not be visible for machines outside of the docker network.
From my experience with docker the most straight-forward solution would be to forward ports 50001, 50002 and 50003 from the host to the docker machine (add -p 50001-50003:50001-50003 to your docker startup command)
The robot should not by default start in a colliding state. However, you could try moving the robot to a different configuration and try again. If that doesn’t help, I guess we would need more info of how it is colliding (screenshot, output…) But yes, I think this is better suitable for a new post
Good morning, i have the same problem but with a different configuration and i wonder if the problem could be solved in the same way.
I have an UR3 (CB series) on top of a MIR (mobile robot), and i want to connect them both on ROS, so i have the ethernet cable that goes from the UR to the MIR, so they are connected, and then i connect the computer to the MIR Wi-Fi, so the IP of the MIR is 192.168.12.20, the IP of the robot if 192.168.12.2 and the IP of the host computer is 192.168.12.192. In the teach pendant, i wrote in the Host IP of the URcap the Host computer’s IP, but the problem is that after i launch the command ‘roslaunch ur_robot_driver ur3_bringup.launch robot_ip:=192.168.12.2 kinematics_config:=$(rospack find ur_calibration)/ur3_robot_calibration.yaml’ (that runs correctly), if i then try to run the URcap program on the teach pendant it tells me ‘the connection to the remote PC at 192.168.12.192:50002 could not be established. reason:connect timed out’. If i ping the UR’IP from ROS i can see it, but the UR does not see the computer.
EDIT: i found out that i had an active firewall, so i disabled it, and now i have this new error:
[ INFO] [1721124400.383903627]: Robot connected to reverse interface. Ready to receive control commands.
[ INFO] [1721124400.603082789]: Connection to reverse interface dropped.
[ERROR] [1721124400.603212743]: Sending data through socket failed.
[ INFO] [1721124400.612000570]: Robot connected to reverse interface. Ready to receive control commands.
[ INFO] [1721124400.898997001]: Connection to reverse interface dropped.
[ INFO] [1721124400.904126649]: Robot connected to reverse interface. Ready to receive control commands.
[ INFO] [1721124403.044618221]: Connection to reverse interface dropped.
[ERROR] [1721124403.044718419]: Sending data through socket failed.
So i guess is one of the other two problems that mauch pointed, what i have to do in order so solve them? thank you in advance