Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Rover: give sailboat motor sailing capability #11423
This is quite a big change to sailboat, it gives functionality to use both sail and motor. This gives the sailboat functionality to act as a sailboat only or as traditional rover. This requires the addition of some new parameters that were previously shared.
This adds two new aux functions, one to select the motoring state:
The second is a aux throttle, this is used in manual mode so 'main' throttle can be used for sail and the 'aux' throttle for motor. Or the other way with a options parameter. The aux throttle can also be used to limit the maximum auxiliary throttle.
Requires #11408 to test in SITL.
On Sun, 2 Jun 2019, Randy Mackay wrote: So, I have to wonder if we should perhaps move the throttle control back to channel 3 (input and output) and use a new input for the mainsail.
Probably should be using RCMAP? Even better, my eliminate-rcmap PR and channel options :-/
This has now been tested, and seems to be working as expected. It also adds some sailboat navigation updates. A buffer angle has been added to so the heading controller is used for the 10deg bellow the no go angle, this results in much nice behaviour when the target heading is just on the no go angle, this happens on the last tack to a waypoint. A dead zone has been added for deciding which tack we are sailing on.
Bug fixed for acro tacking and auto mode tack time outs.
I think the only remaining thing is to work out how to best handle the control of sail and motor in manual mode, this uses a aux channel but there may be a better way. Also it would be nice to add a waypoint type to change the motoring state, ie use only the sail for waypoint A then use the motor for waypoint B
I have removed a the complicated throttle stuff, this now has a aux option that can be used to control the only sail in only manual mode, if it is not set then it will be on the throttle as usual. This removes the need for the complicated arming checks. I have also added a fix for the PID issue that is on master following the recent changes.
2 times, most recently
Jul 30, 2019
I've created a simplified version of the main motor assistance feature of this PR in this branch: https://github.com/rmackay9/rmackay9-ardupilot/commits/iampete1-motor-sail3
I'm sure it won't cause huge joy that it's so chopped down but I wanted to reduce it to a smaller set of changes so that it's easier to review, test and merge. Other changes can go in later as smaller PRs.
I haven't tested this in SITL yet but I hope to tomorrow
I hope you don't mind too much that I reworked it a bit. Most of the changes I made were non-functional changes (i.e. renamed variables and methods and moved things around) but I think I may have also fixed an issue with how tacking was enabled - for this I split the "throttle_assist" function into two functions one for assist-during-tacking the other assist-during-low-wind.
Anyway, please tell me if you see any issues with the new PR. We can work on getting the other bits like changes to the tacking logic in as a follow-up. txs!