UniversalRobots / Universal_Robots_ExternalControl_URCap

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

UR20 support? #29

Closed pclay614 closed 11 months ago

pclay614 commented 11 months ago

I am attempting to run the ur_robot_driver on the remote PC. However, the scaled_pos_joint_trajectory_controller is loading, but not starting. After starting the program on the controller (w/ the External Control URCAP, set to my computer IP:50002), when I use the controller manager to switch to the scaled pos joint controller, I get the following error

[ERROR] [1695674733.591331013]: Robot control is currently inactive. Starting controllers that claim resources is currently not possible. Not starting controller 'scaled_pos_joint_traj_controller'
[ERROR] [1695674733.591480061]: Could not switch controllers. The hardware interface combination for the requested controllers is unfeasible.

If I ssh into the controller, and nc <ip> 50001, then I get the Robot connected to reverse interface. Ready to receive control commands. and the controller shows as running. Is there a reason why the URCAP is not able to send data (i presume) to my remote computer? The port is open as I can nc it.

I am using version 1.0.5 of the URCAP. Universal Robots Software: 5.14.2.

pclay614 commented 11 months ago

More simply, I try running the example server on my remote PC and it locks up the pendant (cannot stop the running program) and it does not show a popup. I am using WSL; however, i can use tcpdump on WSL and see that communication is being sent (Windows OS opens a port to forward the data)

python3 ./simple_external_control_server.py hello_world.script --port 50002
The Simple External Control server is running on port 50002
Connected: ('172.23.0.1', 52134) on Thread-1

def test_func():
  textmsg("test function")
end

# NODE_CONTROL_LOOP_BEGINS

test_func()

# NODE_CONTROL_LOOP_ENDS

Closed: ('172.23.0.1', 52134) on Thread-1

I get similar behaviour when running directly in Windows as well.

C:\Python38\python.exe .\simple_external_control_server.py .\hello_world.script
The Simple External Control server is running on port 50002
Connected: ('127.0.0.1', 6131) on Thread-1

def test_func():
  textmsg("test function")
end

# NODE_CONTROL_LOOP_BEGINS

test_func()

# NODE_CONTROL_LOOP_ENDS

Closed: ('127.0.0.1', 6131) on Thread-1
fmauch commented 11 months ago

Hi, thank you for reporting this. I don't think that this has anything to do with the UR20. I'll have to look into this a bit more...

pclay614 commented 11 months ago

Note, I switched to a Linux box and I am able to get the connection working (can verify with tcpdump that it is working).

I was able to also get it working with WSL with help from this post I think the main issue I had was the driver's reverse_ip was not set properly (as it autodetects the WSL address when it must be the Windows IP.)

You can close this Issue as it's working for my use case now.

fmauch commented 11 months ago

Thank you for coming back on this.