-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Feature: have the Mission Feasibility Checker check for a takeoff waypoint #11531
Feature: have the Mission Feasibility Checker check for a takeoff waypoint #11531
Conversation
…on mission on specific conditions
…not the first item but the previous items are not waypoints
…n there's a takeoff item but it's not the first waypoint
2c8ede3
to
919a097
Compare
Thanks @TSC21 ! Not only is this a helpful reminder for users, this is an important SAFETY feature too. Requiring the user to upload a mission with a properly ordered Takeoff waypoint help mitigate the following scenario: Our vehicle is a typical hand-launched fixed wing. We use Launch Detection to protect the motor from spooling up at unexpected times during ground handling. Too often our users will plan a mission using only a Survey Pattern and a Landing Pattern (Landing Pattern use is required since we use RTL_TYPE=1), forgetting they must place a Takeoff Waypoint at the start of the mission. This leads to an unsafe condition where using "Start Mission" in QGC switches to Mission mode and Arms the vehicle and LaunchDetection is by-passed. In this unsafe state LandDetector can easily switch to Flying by wind on the pitot tube or the user handling the vehicle on the ground. This causes the motor to spool up unexpectedly (dangerously) and even if the user manages to hand launch the vehicle, the fixed-wing takeoff logic isn't used, often resulting in a crash. This PR is an important component to improving safety and ease of use for the above common scenario. |
Also, I have tested extensively in SITL based on our specific use case and everything seems to be working properly from the user perspective. |
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.
This looks correct but what I don't understand is if there is actually a difference between the the multicopter and fixedwing case. If not, then that's a lot of duplicated code and should probably go in a separate function.
@julianoes that's actually a fair point and I don't see a real difference here between them. Maybe we can set a common function for them? |
@julianoes I did a minor cleanup and addressed your concern regarding the repeated code. I think the feasibility checker still needs a major restructure, as some of the logic seems to be repeated and in some cases redundant, but I think we can bring that in a next PR. |
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.
I ran SITL on today's commit and everything checks out.
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.
One change needed, then this is good to go.
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.
Ok, this can go in!
I'm ignoring the "Hardware Test" CI, not sure what is wrong with it. |
Thanks @julianoes! |
Test data / coverage
make px4_sitl_default gazebo_plane
Describe problem solved by the proposed pull request
This PR addresses #10657.
Describe your preferred solution
MIS_TAKEOFF_REQ
, which allows to verify if there's a takeoff waypoint on the loaded mission;Describe possible alternatives
#10657 contains other approaches that may complement this solution.
@Antiheavy, here it goes.