TrickfireRobotics / mission-control

The mission control user interface for "Viator" for the University Rover Challenge
1 stars 2 forks source link

Make the websocket auto reconnect #24

Closed uellenberg closed 4 weeks ago

uellenberg commented 1 month ago

I haven't tested this on every kind of failure, but it should be solid enough to handle them. My main concern is that, if latency is too large, we'll get stuck in a loop of continuously reconnecting. This should be solvable by just increasing the disconnect time, maybe making it configurable somewhere on the web page just in case.

adamseth2 commented 1 month ago

Not sure why but I get the continuous reconnection loops even though I increase disconnect time (Below is what the urc repo keeps repeating):

[rosbridge_websocket-1] [INFO] [1729506972.850095159] [rosbridge_websocket]: Client disconnected. 0 clients total.
[rosbridge_websocket-1] [INFO] [1729506973.516280020] [rosbridge_websocket]: Calling services in existing thread
[rosbridge_websocket-1] [INFO] [1729506973.518389495] [rosbridge_websocket]: Client connected. 1 clients total.
uellenberg commented 1 month ago

Not sure why but I get the continuous reconnection loops even though I increase disconnect time (Below is what the urc repo keeps repeating):

[rosbridge_websocket-1] [INFO] [1729506972.850095159] [rosbridge_websocket]: Client disconnected. 0 clients total.
[rosbridge_websocket-1] [INFO] [1729506973.516280020] [rosbridge_websocket]: Calling services in existing thread
[rosbridge_websocket-1] [INFO] [1729506973.518389495] [rosbridge_websocket]: Client connected. 1 clients total.

We've confirmed this is due to older versions of rosbridge_server not supporting COBR. If anyone comes across this issue, you need to update your rosbridge_server version (ideally by rebuilding the container WITHOUT CACHE).

adamseth2 commented 4 weeks ago

Debugged problem. Once Kyler approves the PQ on the rover code, please merge.