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

RTDE protocol v1 is not supported in setup outputs #113

Closed urmahp closed 1 year ago

urmahp commented 2 years ago

When trying to setup outputs in the rtde client using protocol v1 the rtde client will crash and the output when it is crashing can be seen below.

./build/examples/rtde_client_example 
WARN /src/Universal_Robots_Client_Library/include/ur_client_library/comm/pipeline.h 406: No realtime capabilities found. Consider using a realtime system for better performance 
terminate called after throwing an instance of 'urcl::UrException'
  what():  Could not parse received package. This can occur if the driver is started while the robot is booting - please restart the driver once the robot has finished booting. If the problem persists after the robot has booted, please contact the package maintainer.
Aborted (core dumped)
****

This happens because the control_package_setup_outputs class tries to parse a buffer that is longer than the received one, because the answer from the robot is different whether you use protocol v1 or v2. The error occurs in the setupOutputs function, when trying to parse the package received from the robot. I will update the client library to support protocol v1 as well, by updating the control_package_setup_outputs class to handle parsing protocol v1.

fmauch commented 1 year ago

Should be resolved by #114 -> closing