-
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
Enable Orbit Flight Mode #10907
Enable Orbit Flight Mode #10907
Conversation
CI problems appear to be docker hub connectivity issues. Restarting individual jobs for now. @lamping7 I wonder if this is another case we can catch and retry. |
8b6af67
to
7de2615
Compare
@@ -3365,6 +3369,20 @@ set_control_mode() | |||
|
|||
break; | |||
|
|||
case vehicle_status_s::NAVIGATION_STATE_ORBIT: | |||
control_mode.flag_control_manual_enabled = false; | |||
control_mode.flag_control_auto_enabled = false; |
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.
Orbit is a good example where the flag_control_
-flags breaks
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.
Yes, I totally agree. I certainly want to iterate on this. It's not too late to change this state to the custom flight task state that covers multiple features in the classic commander structure with feedback on feasability of the tasks themselves. But as of right now I want orbit to get usable without loosing too much extra time, it's waiting for too long.
7de2615
to
5cc8505
Compare
rebased and fixed the failsafe handling more based on loiter requirements. I tested correct data link loss reaction. @dagar Could you rereview? |
Looks good. Would it be safer for now to also require manual? |
It's not required in terms of the flight mode. It will continue the orbit like before with 0 or no RC input. There's a verified timeout check in flight tasks here https://github.com/PX4/Firmware/blob/master/src/lib/FlightTasks/tasks/Manual/FlightTaskManual.cpp#L75 which means it will not apply unupdated RC values. The most important thing for safety is not RC but that the pilot can stop via switching mode. |
Actually it looks like we should be covered by the existing logic copied from loiter. RC loss is still respected if data link loss isn't configured. |
@PX4/testflights To test the orbit:
Telemetry to show the current, maybe adjusted commanded circle on the map is on its way, only command is working until now. |
@MaEtUgR |
needs to be rebased due to #10983 |
What are your thoughts on getting this in for v1.9 @MaEtUgR ? |
5cc8505
to
947844e
Compare
@santiago3dr Thanks for the hint, I rebased without conflicts. |
Tested on pixhawk 4, pixhawk 4 mini and pixracer. good flight, no issues. |
Orbit
Fly a perfect circle with a multicopter which is not achievable with waypoints. The circle can be commanded and controlled in center position size and speed using the MAVLink command also speed and size can be adjusted using the remote sticks if they are present. Maximum total acceleration is limited for feasibility resons. The vehicle currently always yaws such that the front "looks at" the center point.
History
Describe problem solved by the proposed pull request
The first try to enable orbit by at the same time relieving the commander of certain duties and growing totally uncontrolled with #10199 failed. I discussed the novel principle of hirarchical command and error handling e.g. by flight tasks handling their respective commands and reporting problems/failsafes to commander with @julianoes, @Stifael, @ChristophTobler. But #10199 was rejected
After lengthy discussions with @dagar and no follow up on my side due to time constraints I'm giving up and am just adding an orbit commander state. I'm not blaming @dagar, he might very well be right and I imagined the solution too easy. Still we should improve the commander situation, I'm happy to join the discussion again. Bottom line of this pr is: Orbit doesn't have to wait anymore for any architecture changes.
Describe your preferred solution
There is a commander main and vehicle navigation state now specifically for orbit. The command
DO_ORBIT
does just switch to the orbit main state because switching the flight task and applying the parameters was already implemented a long time ago in the flight task architecture.Test data / coverage
Windows SITL
FYI @DonLakeFlyer (asked when Firmware will finally support what the UI promises)
EDIT: CI problems seem to be unrelated...