Servers by jDrones

Boat with Loiter mode (aka Position Hold)

ardurover
loiter
rover
arduboat
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

algo

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.

David


(rmackay9) #5

David,

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…


(Krasimir) #8

Greetings. I’m interested in the topic “Boat with Loiter mode (aka Position Hold)”. I have a question? Is there an available test version available? I use PX4 / FMU 2.4.8; Mission Planner 1.3.56 / win 10. Load firmware AR / v 3.2.1; v 3.3.0; v 3.4.0 and no successful test. There is no Loiter mode in the Flight Modes (Mission Planner) position. The Full Parameter Tree in MNT (MODE1-6) also does not have Mode Loiter. In app (Android 9.0) QGroundControl also does not exist Mode Loiter. With App (Android) Andropilot AR v3.2.1. defines Mode - (Auto, Manual, Hold, Guided,…. unknown). Mode Loiter is gone. With AR v3.3.0 and v3.4.0 there is only Mode (unknown). Where am I wrong? Can you help me?


(David Boulanger) #9

Currently I think there is a form of Loiter if it is in a mission. Also, maybe, Mission Planner doesn’t have Loiter showing in it for a surface vessel yet. Not familiar with v 3.4 though. I thought we were still 3.3.


(rmackay9) #10

Krasimir,

Yes, @David_Boulanger is right that this new mode hasn’t been released yet, it will go out with Rover-3.4. This is pretty normal, we work on features and do blog posts and then we enter a beta testing period where we ask any one who is interested to try them out and report back on issues and once those issues are resolved we do an official release.

So if you’re really keen to give it a try, the only way is to use “latest” which is our “bleeding edge” version primarily for developers. This can be downloaded by going to the Mission Planner’s Install firmware screen and press Ctrl-Q. The name under the Rover icon should change to “ArduRover-3.4.0-dev”. Once loaded you’ll need to set one of the MODEx parameters to “5”. The ground stations will probably show the mode as “Unknown” because they use info from the stable release.

Just be careful with these developer versions because occasionally they have bugs because they haven’t gone through much testing.


(Krasimir) #11

Hello! I changed MODE_6 parameter “5” “ArduRover-3.4.0-dev (7b720aae)”. The mode remained “Unknown” for ground stations. Loiter Radius in Flight Plan remained inactive (45m). It is very large and I can not set 2m as recommended. What is the forecast for introducing beta testing?


(David Boulanger) #12

I’m curious. Can you post your full parameter list for 3.4.0 dev?


(Krasimir) #13

Full Parameter List.param (11.7 KB)


(rmackay9) #14

Krasimir,

I think we will start the beta testing of Rover-3.4 this week… i’ll try and write up a wiki page to go with it as well to clarify the setup. Really there shouldn’t be any need to change any parameters though… just switch into the mode and it should work.