One of the most requested features by our boat users including my main sponsor EMES lab (previously known as eLAB) is to add Position Hold. There are multiple ways to do this including using bow or lateral thrusters but as a first step I have implemented a simpler approach that does not require any extra hardware be added to the boat. It’s inspired by Copter’s AutoTune with position hold feature.
The way it works is:
- the user switches into Loiter mode and the vehicle’s current position, velocity and maximum deceleration are used to project a reasonable stopping point.
- while the boat is within the WP_RADIUS of the target it simply drifts
- if/when the boat strays more than WP_RADIUS from the target it:
- rotates to point either directly towards the target or directly away from it (whichever results in less rotation)
- drives/floats forwards or backwards at 0.5 m/s * the distance to the edge of the circle around the target
In this first test it seems to work OK. The conditions are pretty gentle because this is a lake behind a dam so there’s almost no current so it’s mostly the wind pushing the boat around. Anyway, it’s a start and more testing and support for thrusters will come in the future.
This boat-with-loiter feature will be released with Rover-3.4 or perhaps a point release of Rover-3.3 (which is currently in beta testing).
P.S. I get funny comments when testing this boat. This time someone yelled (in all seriousness), “did someone drop their tackle box in the water?”