Leak detection with ArduRover on BlueBoat

Hello folks! We’ve received some requests to support leak detection on the BlueBoat, and now have a solution!
Simply copy the leak.lua file into the directory shown in the screenshot below, with the BlueOS File Browser. Once you restart the autopilot or reboot the vehicle, you’ll be all set! The SCR_ENABLE parameter needs to be set to LuaScripts as well - this is its default value in the BlueBoat parameters.
leak.lua (199 Bytes)

If an SOS leak sensor connected to the Navigator gets wet and closes the circuit, you’ll get a warning in QGround Control or Cockpit.

We’ll be rolling this into BlueOS to make it easier to select and use in the future!

1 Like

Works charmingly! Thanks Tony!

Is the script only sending the Leak Detected event? or is it also adding any mission hold or other actions?

1 Like

The script only sends the message to the alert console. You could easily modify it to add actions! You can see some examples of how to do this in the script from this thread - loiter mode may be better than hold, as better to stay put then drift away?

For what it’s worth, there’s an open Issue about adding leak sensor failsafe support to ArduRover, which is likely the preferred solution for longer term, and can make use of the existing AP_LeakDetector library code instead of having to re-implement that as well as the failsafe behaviour in a Lua script.

Agreed that this is a valuable feature.

Eliot - bingo! Was hoping for the re-implementation…

Tony - I’ll play around and add it for Loiter (yea, they should just remove HOLD).

Haha, fair enough - I did take a look (as mentioned in the Issue comments), but it was a bit more comprehension work than I have time for at the moment. If it had been a direct transfer then I would have just made the pull request, but alas, we’ve got some structure catchups to do for Sub before such transfers are so straightforward.