Open geofrancis opened 3 years ago
@geofrancis,
It's certainly possible and during my boat mapping last week I was thinking it would be very reassuring to have at least reporting of leaks (using the AP_LeakDetector feature).
I strongly suspect that we will add this eventually it just depends upon finding a dev to take on the effort.
The 2 ideas I was looking at was using an esp32 companion that will be on the boat to manage the bilge and alerts for it plan B is to trigger a gpio button on the pixhawk to set the flight mode to something like RTL along with triggering a relay for a pump, that way if it clears the water it should switch back out of rtl and into whatever mode it was in. but if it can't it will continue RTL. its a hack but it should work until AP_LeakDetector is implemented.
@geofrancis, Lua scripts might also be able to do some of what you're suggesting without the need for a companion esp32.. but whatever works ..
@rmackay9 the esp32 will be on the boat anyway for managing a bunch of water and air sensors and any other stuff that ends up on it and sending the data over the internet so it wouldnt have taken much to add another sensor, but it would still need to interface with ardupilot to failsafe so its probably better interfacing the sensor to ardupilot directly.
@rmackay9 do you think this is best done in lua and I should close this or is it still something you would want to integrate into the firmware?
Agreed that this is a valuable feature, possibly even for ground-based rovers in case they get caught in heavy rain or something.
There's some additional discussion in this forum thread about a current Lua script approach for the BlueBoat, although the implementation there is just an alert at this stage, and only works for the Navigator flight controller board.
do you think this is best done in lua and I should close this or is it still something you would want to integrate into the firmware?
The AP_LeakDetector
library has been extended since this Issue was first raised, and it seems worth making use of rather than replicating in a Lua script.
I had a brief look at the code, and it doesn't look like it'll be overly difficult to include (just a bunch of small things in several files), but the Rover codebase is ahead of the Sub codebase by enough that there are some structure and feature changes that should be factored in as part of a port, so it's not quite a copy-paste operation.
Unfortunately I don't feel up to implementing it at the moment, but (assuming nobody hops in to do it in the meantime) I'll see if I can get this added to the Blue Robotics software goals within the next few quarters, since this seems like a feature we should care about for BlueBoat, and given we sell leak sensors/probes there's some extra motivation.
can the leak failsafe from ardusub be added to the regular rover firmware so it can be used on boats? Another idea would be to have it in 2 stages, 1st stage triggers alarm and bilge pump, second stage would be RTL if it can't clear the leak after a set time. this is an essential feature for any boat that's going to be in the water for extended periods of time.
workaround https://discuss.ardupilot.org/t/automatic-bilge-pump-control/78490/2