ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

externalcontrol URCap from ur_robot_driver cannot establish connection with host pc

asked 2020-01-09 06:42:14 -0500

krablander gravatar image

updated 2020-01-09 08:11:02 -0500

I am trying to run the externalcontrol node on the UR5 robot, but I get the following message:

"The connection to the remote PC could not be established"

Things to note:

  • I calibrated my robot before starting ur_robot_driver on my PC
  • After starting ur_robot_driver (and MoveIt) I see the correct state of the physical robot in Rviz
  • I doublechecked the IP-address of my ROS PC in externalcontrol under the installation tab on the tablet

Robot specifications:

  • UR5
  • CB3.0 controller
  • PolyScope 3.9.1
  • External Control URcap version 1.0.1

ROS PC specifications:

  • Ubuntu 16.04 Xenial
  • ROS Kinetic
  • ur_robot_driver version 0.0.3

What did I wrong? The ROS driver is running on the pc and the host IP address is correct.

EDIT: ip_addr_show outputs this:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 60:f6:77:99:da:e5 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic wlp3s0
       valid_lft 10244sec preferred_lft 10244sec
    inet6 fe80::ba57:b562:9c11:3b9b/64 scope link 
       valid_lft forever preferred_lft forever
3: enx3c18a078b201: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 3c:18:a0:78:b2:01 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic enx3c18a078b201
       valid_lft 86378sec preferred_lft 86378sec
    inet6 fe80::13f6:65f:11df:fc3e/64 scope link 
       valid_lft forever preferred_lft forever
edit retag flag offensive close merge delete


Could you tell us whether you have a firewall enabled? And whether you are running Ubuntu natively, or in a VM?

I doublechecked the IP-address of my ROS PC in externalcontrol

probably, but please show us the IPs and network settings of the hosts involved.

gvdhoorn gravatar image gvdhoorn  ( 2020-01-09 06:45:57 -0500 )edit

The firewall is disabled. I am running Ubuntu natively on the PC (dualboot with windows).

  • IP-address of the host pc: (DHCP, found by command hostname -I)
  • IP-address of the robot: (static)
krablander gravatar image krablander  ( 2020-01-09 07:02:00 -0500 )edit

DHCP, found by command hostname -I

please note that for multi-homed hosts this may not return the correct IP.

Could you show the output of ip addr show?

And UniversalRobots/Universal_Robots_ROS_Driver#74 is a recent thread with a similar issue. See some of the later comments with steps to diagnose connection issues.

gvdhoorn gravatar image gvdhoorn  ( 2020-01-09 07:03:05 -0500 )edit

Given this: I'm curious how you can access Is there a (NAT) router between you and the robot? Can you show the output of: tracepath

gvdhoorn gravatar image gvdhoorn  ( 2020-01-09 08:23:19 -0500 )edit

There is a router between the ROS PC and the robot. tracepath outputs this:

1?: [LOCALHOST]                                         pmtu 1500
1:                                         3.091ms reached
1:                                         1.933ms reached
Resume: pmtu 1500 hops 1 back 1
krablander gravatar image krablander  ( 2020-01-09 09:23:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-01-09 10:12:29 -0500

gvdhoorn gravatar image

updated 2020-01-10 06:37:05 -0500

What sort of router? Do you mean a switch? Because from the tracepath output it doesn't look like there is a router. I would've expected to see a hop between you and the robot in that case with a different IP address.

Could you tell us what sort of computers are involved? A laptop? A desktop PC? Is there a wireless link involved?

Could you also login to the robot (using SSH, user: root, pass: easybot) and try to ping Also try: nc 50002 when you have the driver running on the ROS side. If that doesn't connect or time-out (it can take a while, up to 2.5 minutes), it would indicate something is blocking connections between the robot controller and the ROS PC.

Right now I believe you're using the wrong IP address for the reverse connection (ie: the one from the robot controller to the PC).

edit flag offensive delete link more


I am using a linksys e1200 router. I am using a laptop with a USB-C -> ethernet adapter. There are no wireless links involved.

Laptop -> UTP cable -> router -> UTP cable -> UR5 robot

I pinged and nc'd from the robot side, this gave me a time-out. However, after trying to ping another IP address, it was connecting.

So I changed the IP address from to in externalcontrol, the driver was running with no problems. I think the issue has been resolved. Thank you for your assistance.

krablander gravatar image krablander  ( 2020-01-10 04:50:55 -0500 )edit

I am having exactly the same problem. Also, when I run nc 50002 (my host IP address is, I get following error (UNKNOWN) [] 50002 (?) : Connection refused. Any suggestion please?

Abdul Mannan gravatar image Abdul Mannan  ( 2020-12-28 19:39:51 -0500 )edit

I have the same problem. Connection refused. Did you find a solution?

AlexandrosNic gravatar image AlexandrosNic  ( 2022-06-01 10:40:09 -0500 )edit

Question Tools

1 follower


Asked: 2020-01-09 06:42:14 -0500

Seen: 1,906 times

Last updated: Jan 10 '20