Skip to content
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

Closed
wants to merge 8 commits into from

Conversation

kd0aij
Copy link
Contributor

@kd0aij kd0aij commented Jun 16, 2015

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.

@kd0aij
Copy link
Contributor Author

kd0aij commented Jun 16, 2015

Need to change the parameter default to 0.0 so that acro mode behavior is normal by default.

@LorenzMeier
Copy link
Member

This seems pretty useful when you have the param set to a default of zero. Is that coming?

@kd0aij
Copy link
Contributor Author

kd0aij commented Jun 17, 2015

last commits are bench tested, will flight test shortly

@kd0aij
Copy link
Contributor Author

kd0aij commented Jun 17, 2015

flight test of manual, stabilize and acro modes OK

@AndreasAntener
Copy link
Contributor

I've flown this today.
It worked, until I crashed my 250 quad with it ;). Couldn't do a complete flip because my rates were way to low, so I more or less rammed it into the ground.. Anyway, will try again, seems to be a cool addon :)

@kd0aij
Copy link
Contributor Author

kd0aij commented Jun 23, 2015

I increased my acro rates to 720 deg/sec. The default of 90 was unflyable
in my opinion.
Hope you didn't break anything.

On Tue, Jun 23, 2015 at 12:10 PM, Andreas Daniel Antener <
[email protected]> wrote:

I've flown this today.
It worked, until I crashed my 250 quad with it ;). Couldn't do a complete
flip because my rates were way to low, so I more or less rammed it into the
ground.. Anyway, will try again, seems to be a cool addon :)


Reply to this email directly or view it on GitHub
#2390 (comment).

Mark Whitehorn
[email protected]

@AndreasAntener
Copy link
Contributor

No worries, had soft ground ;)

@kd0aij
Copy link
Contributor Author

kd0aij commented Jun 23, 2015

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 :)

@AndreasAntener
Copy link
Contributor

Did another test with this today, very cool!
720dps and switch at 0.9 > triple flip followed by an almost nice landing ;)

I didn't notice any difference though between roll/pitch flips. Both went very good, and I had no unwanted yawing.

@kd0aij
Copy link
Contributor Author

kd0aij commented Jun 25, 2015

Triple flip 👍 Did you mean to do that?
How much altitude did you start with and did you do any throttle management?
Were you flying a QAV250? There must be something wrong with my setup, since the flips are much slower than the rolls.
@AndreasAntener I'd like to see the log for the flips, and video, of course, if you have it.

@AndreasAntener
Copy link
Contributor

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.

@AndreasAntener
Copy link
Contributor

For your amusement: https://youtu.be/n22Z4f8KvNo

@kd0aij
Copy link
Contributor Author

kd0aij commented Jun 26, 2015

Thanks, cool video. I'm guessing your pitchrate P gain is higher than the rollrate P gain?
My pitchrate gain is lower than roll. will try increasing it when I get my QAV250 back together.
This is a perfect opportunity to add more intelligence; automatic thrust management for fixed pitch, then moving on to collective pitch.

@AndreasAntener
Copy link
Contributor

Yes, I think I have about 1/3 higher pitch P than roll P.
Interesting, now that I think of it this would be a good test to see if the gains are "equal" for a non-symetric frame ;)

kd0aij added 2 commits July 3, 2015 20:52
Fixed Conflicts in:
	src/modules/mc_pos_control/mc_pos_control_main.cpp
	src/modules/mc_pos_control/mc_pos_control_params.c
@kd0aij
Copy link
Contributor Author

kd0aij commented Jul 5, 2015

Last commit removes manual mode parameters which had moved to the position controller. Test flown on QAV250.
@LorenzMeier Also demonstrated that the yaw setpoint fix #2481 works.

@kd0aij
Copy link
Contributor Author

kd0aij commented Sep 23, 2015

@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% */
Copy link
Member

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?

Copy link
Contributor Author

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.

@kd0aij kd0aij deleted the acro_stab branch November 9, 2015 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants