Help: Run Aground Avoidance

Hello! I previously had a number of boats running prior versions of Ardurover that could use the sonar as a range finder to avoid running aground as described here:

However, 4.0 doesn’t seem to support this; I’ve tried bendy ruler but cannot seem to get it to work with a downward facing sonar. It does not react to shallower depths. Does anyone have any input? Is this possible or perhaps am I making a configuration mistake somewhere?

Perhaps I can change the orientation to forward instead of down?

I’ll go try this and report back.

1 Like

That didn’t work. I can’t seem to get any effect from the rangefinder on navigation. I’ve read and reread the docs at Object Avoidance — Rover documentation (

I have an echosounder reporting range in NMEA sentences to the autopilot; I can see the readings as shown below; they are correct. It used to work on 3.5; I’ve tried a lot of settings combinations, but currently have it setup as follows: (4.5 KB)

Any help or input would be greatly appreciated. Is there is a bug or perhaps there some some “enable” box I forgot to check, maybe something else? I’m normally pretty good at sorting this stuff out but this one has me stumped.

I am having the same issue with a boat running ArduRover 4.0. Were you ever able to get this working?

If you want to help out, here is the place
That one is currently only for sub, copter and plane, but if you help it can be extended to boat as well.

edit: I have corrected the link above now. It is all about avoidance!!!
And no, older versions did not have that feature.

Thanks for the invitation, I would be happy to help, but this all seems to involve fence capabilities and this thread is about object avoidance. The issue is that we would like to be able to use the sonar (water depth) on a boat to avoid areas that are too shallow for the boat. If we already knew the water depth then we could set up a fence but the water depth is what we are typically trying to map. Let me know if I misunderstood something.

Maybe I will have to dive into the code. It seems to me it would be best if for each rangefinder there was the ability to set a minimum threshold before a behavior is invoked (i.e. stop or slide). I think a lot of this functionally was or is already implemented. It seems like this was working in a previous version of Rover but I might be mistaken, I am rather new to all this.

I corrected the link above

What would it take to get this officially added to Ardurover? Is there a bounty system in place or how might that work?

My thinking is that when the water gets too shallow, the boat will make a turn to the right or left for a specific period of time. (Like the old simple avoidance). The depth/range, turn angle and time would be params which can be adjusted. With the only simple avoidance, I used to use 1m range, a 45 degree right turn which is always towards the center of the lake as I ran shorelines in a clockwise pattern, for 5 seconds. That would avoid shallows 90% of the time, after which it would return to the mission, and repeat as needed to keep from running aground. I would be very happy with even this capability on the new firmware.

I created a script to stop the boat running aground in auto mode, it basically just checks if its in auto mode and the downwards facing rangefinder is above a set limit, if it gets to shallow it will switch to loiter mode to stop it getting further into trouble but it could be modified to have more complex behaviour such as head to a waypoint in the centre of the pond until the depth is above its limit before heading to the next waypoint.

1 Like