BluEye-Robotics / blueye.sdk

A Python package for remote control of Blueye underwater drones.
GNU Lesser General Public License v3.0
17 stars 4 forks source link

Add observer mode #160

Closed sindrehan closed 1 month ago

sindrehan commented 7 months ago

With the new protocol there are no technical limitation to having multiple connections going at the same time, but we quickly run into some logistical issues, especially if the app is involved as well.

In https://github.com/BluEye-Robotics/ProtocolDefinitions/pull/143 a new field was added to ClientInfo message to indicate if the client is an observer or not. If the client is an observer it will not automatically be promoted to in_control if the controlling client disconnects.

follesoe commented 7 months ago

It shouldn't make a difference, as the field is is_observer, which is default set to false. So the behaviour should be the same as before, the SDK connects as in control, and will maintain it.

The drone has always accepted multiple clients/connections, and it is up to the clients to use the information and behave correctly.

The drone will happily accept user input, even if the client is not in control. So it is more of a "coordination" ID/status the clients use to know if someone else is in control.