-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Stabilized mode with semi-auto "flip" capability #2390
Conversation
instead of mc_att_control
control while roll and pitch inputs are less than the MC_ACRO_STAB threshold and switches to rate control above threshold
Need to change the parameter default to 0.0 so that acro mode behavior is normal by default. |
This seems pretty useful when you have the param set to a default of zero. Is that coming? |
last commits are bench tested, will flight test shortly |
flight test of manual, stabilize and acro modes OK |
I've flown this today. |
I increased my acro rates to 720 deg/sec. The default of 90 was unflyable On Tue, Jun 23, 2015 at 12:10 PM, Andreas Daniel Antener <
Mark Whitehorn |
No worries, had soft ground ;) |
If you're flying an H quad like the QAV250, it's much easier to roll than to pitch (meaning it goes faster). Worse, when I do a backward flip with my 250, it also yaws 90 degrees, which is my excuse for hitting the tree trunk. Forward flips work OK, but take so long I lose a lot more altitude than when doing rolls. The rolls are lots of fun too, can't wait to try it with the goggles :) |
Did another test with this today, very cool! I didn't notice any difference though between roll/pitch flips. Both went very good, and I had no unwanted yawing. |
Triple flip 👍 Did you mean to do that? |
Yes, QAV250 and the triple flip was intentional ;), from about 30m I'd say. I didn't manage throttle, but I'd like to try that. Not sure how much you can do at this roll rate though (or if I get the timing right). When I look at my videos, my pitch flips are actually faster than my rolls. |
For your amusement: https://youtu.be/n22Z4f8KvNo |
Thanks, cool video. I'm guessing your pitchrate P gain is higher than the rollrate P gain? |
Yes, I think I have about 1/3 higher pitch P than roll P. |
Fixed Conflicts in: src/modules/mc_pos_control/mc_pos_control_main.cpp src/modules/mc_pos_control/mc_pos_control_params.c
Last commit removes manual mode parameters which had moved to the position controller. Test flown on QAV250. |
@LorenzMeier It looks like this is OK to merge; the default value for MC_ACRO_STAB is 0.0, so default Acro mode behavior will not change. |
@@ -810,7 +790,21 @@ MulticopterAttitudeControl::task_main() | |||
vehicle_status_poll(); | |||
vehicle_motor_limits_poll(); | |||
|
|||
// /* override ACRO mode when both roll and pitch < 70% */ |
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.
Why do we have commented code here?
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 is how I thought the code should work on first inspection, since att_control has a flag called "control_attitude_enabled". But (surprisingly) the attitude setpoint is not generated in att_control... instead it is generated and published by mc_pos_control. My understanding of this partitioning of the code is that it is the lesser of two evils, hence the comment so I don't waste time when I next work on something similar.
Should be a good way to test high angular rates and unusual attitudes without requiring too much skill from the pilot. Setting the new parameter to e.g. 0.9 results in switching from stabilized to acro mode only when roll or pitch command exceeds 90%. Just hold the stick against the stop in the direction you want to flip and let go once you get past inverted to recover to level.
Log: http://dash.oznet.ch/view/zCRt9Qby6KtG8PMooMaLzb (FMUv1 on QAV250 running Q attitude estimator)
Onboard Video: https://youtu.be/xF5vHBSV5KU
Forward flip (first one) exhibited loss of heading lock (90 degrees), second 2 (backward) held heading. Need to repeat the forward case to see if it's repeatable. Note the much larger moment of inertia about the pitch axis.