UniversalRobots / Universal_Robots_ROS_as_a_Service_URCap

This URCap makes a universal robot part of a ROS system by making ROS calls available inside Polyscope through the rosbridge.
Apache License 2.0
12 stars 3 forks source link

ROS2 Compatibility? #45

Open danzimmerman opened 2 years ago

danzimmerman commented 2 years ago

Hi, just wondering if this should work with rosbridge_server in ROS2 (I'm running Galactic)

Per the instructions, I need to launch roslaunch rosbridge_server rosbridge_tcp.launch, but there's no equivalent in Galactic, only a websocket server available, rosbridge_websocket_launch.xml.

It seems like the raw TCP and UDP have been removed from the ROS2 version of rosbridge_server:

https://github.com/RobotWebTools/rosbridge_suite/issues/639 https://github.com/RobotWebTools/rosbridge_suite/pull/685

I installed the URCap in URSim and it hangs when I try to connect to a running Rosbridge Websocket server on Galactic, so I'm assuming this is what's going on, but wanted to verify.

danzimmerman commented 2 years ago

I tried this with Robostack ROS Noetic on Windows and the basic tutorial seems to work fine with URSim (though there seems to be a different issue with connection persistence there)

image

(Details of errors in the console below)

``` [INFO] [1655131498.286917]: [Client 482] connected. 483 client total. [ERROR] [1655131498.316416]: Exception calling subscribe callback: [WinError 10053] An established connection was aborted by the software in your host machine [INFO] [1655131503.414354]: [Client 483] connected. 484 client total. [ERROR] [1655131503.426487]: Exception calling subscribe callback: [WinError 10053] An established connection was aborted by the software in your host machine [ERROR] [1655131503.667800]: Exception calling subscribe callback: [WinError 10053] An established connection was aborted by the software in your host machine [INFO] [1655131503.675140]: [Client 484] connected. 485 client total. [INFO] [1655131508.795067]: [Client 485] connected. 486 client total. [ERROR] [1655131508.802921]: Exception calling subscribe callback: [WinError 10053] An established connection was aborted by the software in your host machine [INFO] [1655131509.006211]: [Client 486] connected. 487 client total. [ERROR] [1655131509.030915]: Exception calling subscribe callback: [WinError 10053] An established connection was aborted by the software in your host machine [INFO] [1655131514.120963]: [Client 487] connected. 488 client total. ```

At the moment, I don't have ROS Noetic on Linux, so I can't try there.

fmauch commented 2 years ago

It seems like the raw TCP and UDP have been removed from the ROS2 version of rosbridge_server:

This should not be a problem, since the node opens a TCP port on 9090.

I've tried running it with the ROS2 galactic and for me polyscope freezes when accessing the topic list, so this needs further investigation.

gavanderhoorn commented 2 years ago

This should not be a problem, since the node opens a TCP port on 9090.

isn't that the websocket port rosbridge opens?

That's not a plain TCP port.

danzimmerman commented 2 years ago

I've tried running it with the ROS2 galactic and for me polyscope freezes when accessing the topic list

Same for me. I haven't tried it on hardware yet, but in URSim Polyscope hangs indefinitely.

isn't that the websocket port rosbridge opens?

In Noetic, rosbridge_server opens port 9090 for either the plain TCP server or the Websocket server.

If I launch the Noetic Rosbridge Websocket server (roslaunch rosbridge_server rosbridge_websocket.launch), it times out with an informative error.

2022-06-13 11:53:54-0400 [-] dropping connection to peer tcp4:192.168.1.92:38013 with abort=True: WebSocket opening handshake timeout (peer did not finish the opening handshake in time)
fmauch commented 2 years ago

I see, misconception on my side... Yes, that could definitively be the issue that we built this upon the plain TCP port rather than websocket communication.