-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plane: add Autoland mode #28771
Plane: add Autoland mode #28771
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this idea - some suggestions.
Very interesting, I would instead have a suggestion for a much more solid approach in my opinion, since yours is great for taxiing takeoffs but not for hand launches, which is often not necessarily the direction of the runway. Instead, here is what I propose, in my opinion the most logical and hyper simple: if there was the possibility in Ardupilot to fix two points on the runway, to indicate LR of the correct axis would be more than enough to tell Ardupilot to use that line to perform any kind of LAND, so something like this. In this very simple approach Ardupilot knows of the runway the direction, the center and the correct length, so he knows that that is the runway in all its useful aspects. |
@robustini many people never use MP after initial setup and arent comfortable with mission planning....I never use missions other than autotakeoff/do-land-start/landing sequence with my mission selector app to select land direction for my field based on wind direction....or my UniversalAutoLand lua when travelling to other locations this is the C++ implementation of my UniversalAutoLand lua script which I use when traveling and just stop at a location and fly...no laptop used.. |
fcf710d
to
a1b1b13
Compare
Should this be disabling fences (autoenabled, and floor) when doing a landing? |
It does a NAV_LAND....so whatever it does or does not |
b4a7cc2
to
e9b36f1
Compare
60a6dc9
to
64d7e89
Compare
dc09056
to
9cba0f3
Compare
this looks 100% correct and matches what master would do if that final waypoint and nav_land waypoint were the content of a do_land_start sequence....verified that in master in SITL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New mode needs adding to this array for the available modes message.
ardupilot/ArduPlane/GCS_Mavlink.cpp
Line 1592 in 5a8bc16
}; |
Sorry, this was added after you started your PR. I can push a commit for it if you prefer.
@IamPete1 if you could, it would help...I tried adding it and get an error message that MODE_AUTOLAND_ENABLED is not defined around the addition |
@Hwurzburg Fix here: https://github.com/IamPete1/ardupilot/tree/autoland I also rebased. |
5e8c5ff
to
bb0bceb
Compare
@IamPete1 fix added...thanks....can you approve now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@Hwurzburg I've added a base leg to the PR. This is with the base leg: |
@IamPete1 the base leg addition was to minimize the overshoot of the final approach waypoint by forcing the approach to it to be no more than 90 degs before the turn onto final....otherwise the approach to the final approach waypoint could have been from 180degs to landing direction resulting in larger overshoot and more track error to correct as it lined back up on final leg... @trdige SITL looks good....will test fly this weekend |
autotest:add test for autoland mode
this gives a cleaner landing, keeping the plane in the part of the field where the pilot is currently flying
@Hwurzburg tested on Peters plane, worked well: |
there were a few reasons it didn't do what it should do without the base leg:
A normal fixed wing landing has a base leg for all size aircraft. The only time you can really avoid it is if you happen to start the landing sequence when already lined up for the landing. We could add a special case for that if we think it is important |
During testing I found a corner case bug.....multiple mode takeoffs in a row sometimes triggers the clearing of takeoff_state structure...before I added the bearing into that structure I had accounted for this...but when we went to a substructure including the bearing, it was not included in code that prevents its clearing....fixed now....I did not squash (or Tridges commit), but I will clean the commit tree once we agree to add @tridge base leg....(which I do) |
I personally use LOITER_TO_ALT with tangent exit with great success for landing entry with great success. It handles various approach directions and provides reliable entry altitude regardless of initial altitude. I did a bit more SITL testing and it has ugly entry for approaches that are 90° to the wrong side. but it can be fixed by preceding it with LOITER_TURNS set to 0.125 (45°). Here is example waypoint list for EPWA.
|
Captures ground course when gnd speed reaches 5m/s as takeoff direction in NAV_TAKEOFF and Mode Takeoff (if a reliable way to obtain a takeoff direction in other modes is determined, this can be expanded in the future)
Currently valid only for fixed wing configuration, quadplane wont enter mode...
Upon entry creates a final approach waypoint at parameterized distance and alt from home in the opposite direction of autotakeoff direction, flies to it and does a land exactly like NAV_LAND using full landing code for aborts. (Emulates my UniversalAutoLand LUA script #28591)
If a DO_LAND_START sequence(s) exist, will jump to them insteadIf takeoff direction has not been captured then it will just not enter the mode
If not flying it will not enter the mode
Adds it as a long failsafe action (will RTL if no takeoff direction has been captured)...qplane ignores it
Includes an autotest
edit: can now be used in QPlane if fw landing option bit set and is a build option, added landing direction offset parameter for when you want the landing to be different direction than takeoff
PS: once merged I have a PR to add a mode param to allow the direction to be set on arm if a compass is in use instead of autotakeoffs, or to allow setting takeoff direction in FBWA/MANUAL/STABILIZE takeoffs in addition to autotakeoffs