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

`sendRobotProgram()` doesn't always work on the first try #123

Open RobertWilbrandt opened 1 year ago

RobertWilbrandt commented 1 year ago

While working on the ROS2 driver integration tests i realized that resending the robot program in headless mode does not work completely reliably right now. The first scenario for this is:

This behavior also happens if i pause the program through the teach pendant and then resend the program. While i have only tried this through the ROS2 driver, i am pretty certain that the issue is in the client library as not even an error is returned in this case.

fmauch commented 1 year ago

I'm able to reproduce this with URSim. Note that the two cases seem to be equivalent: When have a booted (but not yet started - in terms of brake_release) robot, the program state also seems to be paused. Therefore, another way to reproduce is:

That this behavior is the same when having a freshly booted robot could be a URSim issue (e.g. you'll get joint states for URSim before initializing it, which you won't with a real robot), but resending while being in paused state definitely seems like something that would be present on a real robot, as well. However, since local and remote mode are rather different in URSim this could also only be a URSim problem after all. I'll check in my next lab session.

Edit: Same behavior on a CB3 URSim btw.