Commit b42da6d
authored
Try catch RTDE setup (UniversalRobots#285)
In UniversalRobots#266, we improved the behavior of the urcl regarding reconnection
attempts and timeouts for sockets. However, there are still a few
problems (more to come later). I propose to fix one of them here to keep
the scope of the PRs small.
`RTDEClient::setupCommunication` is called in a while loop, and inside
`RTDEClient::setupCommunication` there is a call to
`pipeline_->init(...)` which in turn calls
`producer_.setupProducer(...)`. `setupProducer` (see
[here](https://github.com/UniversalRobots/Universal_Robots_Client_Library/blob/62d34dff101bc460a4d36692405fd076974b8791/include/ur_client_library/comm/producer.h#L67))
throws if the connection of the `stream_` (which is just a tcp socket in
my understanding) fails. Hence, if the RTDE sockets are not available,
this causes the initialization sequence to terminate immediately and not
retry for the desired `max_initialization_attempts`.
Now that I have a deeper understanding of the URCL after digging deeper
a bit (sorry that I didn't bring that up earlier), I don't fully agree
with the `rtde_initialization_attempts` and
`rtde_initialization_timeout` anymore since the RTDE sockets are just
usual tcp sockets that are already subject to
`socket_reconnect_attempts` and `socket_reconnection_timeout`. This
means that currently it's just a while loop of connecting tcp sockets in
a while loop for the RTDE connection setup which is maybe not really
necessary and just creates a lot of delays. But it's also possible that
I miss an important detail about RTDE comm so maybe my feeling is wrong
here.1 parent 9d01f09 commit b42da6d
2 files changed
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
96 | 104 | | |
| 105 | + | |
97 | 106 | | |
98 | | - | |
| 107 | + | |
99 | 108 | | |
100 | 109 | | |
101 | 110 | | |
102 | 111 | | |
103 | 112 | | |
104 | 113 | | |
105 | | - | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| |||
709 | 717 | | |
710 | 718 | | |
711 | 719 | | |
712 | | - | |
| 720 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
| 366 | + | |
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
| 372 | + | |
| 373 | + | |
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
| |||
426 | 427 | | |
427 | 428 | | |
428 | 429 | | |
429 | | - | |
| 430 | + | |
0 commit comments