-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
base: master
Are you sure you want to change the base?
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
@peterbarker need the bin log of your tests |
Log from testing on crnch: https://drive.google.com/file/d/1Hwq9iGn1AlVooi7GgTMGQud1k-Sf-NF-/view?usp=sharing |
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.
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 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 |
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