UniversalRobots / Universal_Robots_Client_Library

A C++ library for accessing the UR interfaces that facilitate the use of UR robotic manipulators by external applications.
Apache License 2.0
117 stars 88 forks source link

externalcontrol just stops. rt kernel needed? #148

Closed haavarpb closed 1 year ago

haavarpb commented 1 year ago

Hi, I have issues using the offline non-linux URSim and a separate VM for the UR ROS2 driver.

The externalcontrol script stops after starting without giving me a clear reason. Logs are attached for context. log_history.txt and URControl.log is copied from the URSim, and the ur_bringup.log is the output of a ros2 launch ur_bringup... command, but is included for context to see what's happening on the ROS2 driver side.

log_history.txt URControl.log ur_bringup.log

It's difficult for me to say exactly what the problem is. But an interesting find was that I can sometimes control the robot once I tried to up the CPU count for both the URSim VM and the ROS2 driver VM. Could it be that either side is missing real time deadlines? Is this a symptom of not having a RT kernel?

Host machine: Windows 11 Non-linux URSim version: 3.15.8 ROS2 Driver VM: Ubuntu 20.04, ROS2 Galactic

fmauch commented 1 year ago

Hi, thank you for your report. A couple of remarks:

  1. Using a VM to run the driver is not recommended. Yes, there are quite strict timing requirements from the driver that I don't expect to get met very well by using a 2-VM setup. However, I would expect this to at least work somehow, with regular shutdowns.
  2. In your output, I don't see Robot connected to reverse interface. Ready to receive control commands. I assume you start the driver without headless_mode:=true and never pressed "play" on the teach pendant?
  3. If you have a bad connection / timing issues (given that you actually started the driver / program on the robot) you should see Connection to reverse interface dropped. printed on the shell output. That means that the connection got cut due to missing packages. In this case, you should maybe try improving your timing capabilities by going as native as possible.
  4. This issue seems to be arising from the ROS 2 driver, so you should open an issue in the ROS 2 driver's repo. Please do so the next time.
  5. ROS 2 Galactic is no longer supported, as it is EOL (This should be unrelated to your problem, though).

Given the last two points I'll go ahead and close this hoping that I could get enough hints to get this sorted out, Otherwise, feel free to open an issue in the ROS 2 driver (using a supported ROS version, favorably using a native Linux as a driver's host)