UniversalRobots / Universal_Robots_ExternalControl_URCap

CB3 and E-Series URCap for the ROS and ROS2 drivers
Apache License 2.0
65 stars 16 forks source link

not able to open socket reverse_socket to host 172. ... at port 50001 in WSL2 #24

Closed NebuDa closed 2 years ago

NebuDa commented 3 years ago

First my setup: ROS2 Foxy Ubuntu 20.04 in WSL2 (Windows Subsystem for Linux) MoveIt! ROS UR Driver Notebook (192.168.1.102) network connection to Robot WSL2 has IP with 172.19.x.x but I use a port forwarding script that works great in other context.

Starting ROS UR Driver and RViz with following commands:

ros2 launch ur_bringup ur_control.launch.py ur_type:=ur10e robot_ip:=192.168.1.101 launch_rviz:=false
ros2 launch avoid_obstacle_scene my_ur_moveit.launch.py ur_type:=ur10e robot_ip:=192.168.1.101 launch_rviz:=true

(similar to ur_bringup ur_moveit.launch.py)

The Problem is now, that the RemoteControl URCap tries to access the wrong IP Address although the 192.168.1.102 is configured in the URCap installation.

Network connection works also, I can Ping the Robot from WSL2 and see Jointangles in RViz.

The only issue is that the UR Cap tries to open a socket at the wrong IP Address.

urrsk commented 2 years ago

@NebuDa Let me guess, it tries to connect to 172.19.x.x? If that is the case, you need to define the reverse ip when launching the driver; please see the arguments to the launch script: https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/launch/ur10_bringup.launch

External control is pretty dum. It just inject the script code it receives from the driver, including the IP. By default the IP address detected automatically, but it needs help if it is behind a gateway.

urrsk commented 2 years ago

I believe that this issue is more related to the driver. Suggest that the conversion continues on https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/issues/486

NebuDa commented 2 years ago

Thanks a Lot! Thats it, maybe it can be noted in the Network configuration part of the readme?!

urrsk commented 2 years ago

@NebuDa maybe a separate WSL2 tutorial

MiroslavKohut commented 2 years ago

Hi @NebuDa please did you solve you issue. Could you run the UR through the WSL2 ?

Thank you

NebuDa commented 2 years ago

Yes it works, but I changed the System to a native Ubuntu installation due to other reason.