Servers by jDrones

Boat with Loiter mode (aka Position Hold)


(rmackay9) #1

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?”

P.P.S: I think I will add support for sailboats this summer probably starting with this frame from hobbyking or this other from thunder tiger.

(ben) #2

Hi, i have implemented the boat Loiter mode in my test. when the boat strays more than WP_RADIUS,guide mode is used to make the boat stay within the WP_RADIUS.
To work efficiently , it is ok to use normal or reversed(back up) operation according the direction of current position and target.

(rmackay9) #3

Hi Ben,

Cool that you’ve worked on something similar.

In this Loiter mode it will backup if the point somehow gets behind the vehicle. This most often happens if the vehicle is backing up when the user switches to Loiter mode. Anyway, the code needs some more testing and then we will put it into master. It’s possible/likely that we could use this Loiter feature in Auto and Guided mode when the vehicle wants to wait at a waypoint (i.e. the waypoint has a delay on it).

(David Boulanger) #4

If you need a Beta tester for the sailboat version I’m available. I race a lot of different Model Yachts and have what AMYA calls an EC 12. I don’t sail it much anymore but have been holding on to it for Ardupilot. I figured it was just a matter of time. She is 4 foot long with a full keel and weighs about 22 pounds. Very solid platform. The wind indicator that would need to be used interests me greatly. Keep me posted.


(rmackay9) #5


Great stuff. I’m asking around for various companies including thundertiger to see if they’ll send me a sailboat. I hope/expect they will.

The most standard frame appears to be the Dragon Force 65 so I may try and get this one if the sponsor doesn’t care which frame is used.

(David Boulanger) #6

I have a Dragon Flight 95. You may find the DF 65 to be very narrow for housing equipment easily.

(rmackay9) #7

Ok thanks for that. we have some very small boards these days… but more space is always nice…