Improve steering, if motor throttle is off

My Benchy-Boat got the rover 4.1.0 beta6 update and was doing some waypoint loops on the river nearby, which it did quite good I think.
The Benchy-Boat has a standard propeller/rudder configuration.

The “water speed” was quite high today. About 1 m/s.
The mission speed for this small boat is only 0.6 m/s, which is the optimal speed for this boat.

If the boat is swimming down the river (WP4 to WP 5) the motor throttle goes down to zero, which is OK because cruise speed is smaller than water-speed.
When reaching WP 5 the boat wants to turn. The rudder is moving, but without throttle the rudder has almost no effect.
This results in a large overshoot an the waypoint like you can see here in the picture.
grafik

So my question is:
Is there a way to setup a kind of rudder to throttle mix, to achieve a minimun throttle, if the rudder is deflecting?

I set MOT_THR_MIN to 20, which helped a bit, but only if the motor is not completely off.

For Loiter-Mode this would also be helpful, I think.

Here is an older video of the Benchy-Boat: https://www.youtube.com/watch?v=sw-9Mngs2cc

I created a Lua script which does the mixing according this logic:

if Throttle < 10% and Rudder > 20% then set Throttle to 20% of Rudder

For my Benchy-boat with a propeller/rudder setup this helped a lot especially in loiter mode.
Without the script the boat was often turning and drifting away before it tried to reach the loiter position again.
With the script the bow is more stable in the direction of water flow.

SteerThroMix.lua (1.5 KB)

The script is based on: https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_Scripting/examples/rover-motor-driver.lua

3 Likes

Nicely done.

I think if the motor could reverse it might also work OK if vectored thrust was used because as the boat is pushed above the desired WP_SPEED it would actually spin the motor backwards which would provide thrust for steering.

1 Like

Would this same concept work for a bow thruster? it uses very similar logic in that its only active at low throttle,

instead of:
if Throttle < 10% and Rudder > 20% then set Throttle to 20% of Rudder
change it to
if Throttle < 10% and Rudder > 20% then set Bowthruster to 100% of Rudder