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 86 forks source link

Add support for setting socket max num tries and reconnect timeout #172

Closed fmauch closed 11 months ago

fmauch commented 1 year ago

This continues #141 and fixes #140.

ToDo:

codecov[bot] commented 12 months ago

Codecov Report

Patch coverage is 90.00% of modified lines.

Files Changed Coverage
include/ur_client_library/comm/tcp_socket.h ø
include/ur_client_library/rtde/rtde_client.h ø
include/ur_client_library/ur/dashboard_client.h ø
include/ur_client_library/comm/producer.h 50.00%
src/ur/dashboard_client.cpp 50.00%
include/ur_client_library/comm/pipeline.h 66.66%
include/ur_client_library/comm/stream.h 100.00%
src/comm/tcp_socket.cpp 100.00%
src/rtde/rtde_client.cpp 100.00%

:loudspeaker: Thoughts on this report? Let us know!.

fmauch commented 12 months ago

Going back to draft because of failing tests

fmauch commented 11 months ago

@urmahp I found one more flaw when passing reconnection time to the socket. The tests were succeeding but taking too long, since the default timeout is 10 seconds. I added a limit of 1.5 seconds (since the connection should take 2*500ms+overhead). This way we can make sure that the set timeout is actually being used.


Edit: Seeing that two tests now fail because of taking too long. Going to continue on this tomorrow.

fmauch commented 11 months ago

@urmahp If you could give it one more review, that would be great. I didn't clean up the commits since this seems to confuse coverage.io quite a lot. I'll do that right before merging.