-
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
[WIP] Intuitive manual position control by mapping stick input to acceleration #12072
Conversation
Awesome! |
This is just Position mode MC? When this goes in, can you remind me that we will need to update https://docs.px4.io/master/en/flight_modes/position_mc.html (and a few other pages) |
bae9428
to
43ec3a5
Compare
This sounds good! But on the other hand we need a good estimation of the acceleration. I can try to help with this! |
Looking forward to its merger, in fact many customers want this feature...Better control feel, better PX4 😃 |
a859733
to
9697af2
Compare
3448d87
to
8953724
Compare
@hamishwillee Yes, it's thought as a replacement option for the current implementation of the manual position mode. At first it will for sure not be default. I will inform you about the behavior and configuration options. Thanks for thinking ahead 👍
@Pedro-Roque Certainly would be good to have a useful acceleration estimate but this pr produces acceleration setpoints to be used in a feed-forward manner for the attitude setpoint generation and is not dependent on a good acceleration estimate.
@xdwgood Exactly what I've seen as well. Thanks for the confirmation from your side. |
5518761
to
b7d2b21
Compare
Right, I understood now how you do it after going a bit through the code. Sounds good! Will keep an eye on it |
11c670b
to
93a2bdf
Compare
c359999
to
a4162e3
Compare
f594580
to
966f0cb
Compare
4191cab
to
6d98f4c
Compare
After rebasing unsuccessfully and realizing that it will probably not be mergeable anytime soon because of risk I'm breaking this down into small pieces. Sorry @Stifael for not listening in the first place (#12072 (comment)). |
This issue was found by @khabir and reported over slack. It resulted from the split up of the big pr #12072 into #13262. I took over the interface while the internal states still stayed the hard to understand internal ones. One of the follow up refactors will fix this completely and the entire legacy setpoint restore block can be removed.
…13557) This issue was found by @khabir and reported over slack. It resulted from the split up of the big pr #12072 into #13262. I took over the interface while the internal states still stayed the hard to understand internal ones. One of the follow up refactors will fix this completely and the entire legacy setpoint restore block can be removed.
7811355
to
331ce88
Compare
When the acceleration setpoint went to more than on g downwards the horizontal thrust setpoint generation was screwed up.
I'm closing this. |
Describe problem solved by the proposed pull request
This is a first draft for a more intuitive manual position controlled flight by stick. Mapping the stick input to velocity generally results in a too agressive flight behavior so often tight acceleration limits have to be applied which result in a too long braking distance and a percieved delay in executing stick inputs.
Describe your preferred solution
Mapping the stick inputs to an acceleration looks promising to solve a big part of the listed problems. It feels more intuitive and guarantees gentle vehicle behavior when being gentle on the sticks while allowing to brake hard in emergency cases by pulling the stick all the way to the oposite side of flight direction.
This task requires changes to the position controller to track an
acceleration setpoint which me and @bresch are working on.
Test data / coverage
This is a draft and not yet ready to fly on a real vehicle. I'm currently testing in SITL with a joystick to see what changes to the position controller make sense to execute these setpoints.
Additional context
resolves #12999