Dual-motor tailsitters

Yeah, that is the method i have been using, seems abit hit and miss sometimes.

I have just finished another PR:

I can compile some firmware with both fixes if you like, I only have the last stable with both fixes on, or you can have the master with one or the other. I have been unable to compile the master for pixhawk 1 for some reason though.

sorry I dont understand your last sentence. Does it means you can compile the master with a fix provided this is for another controller than the pixhawk 1. I have a pixhawk 1 and I am interested by the fix about the pid scaling. Because,as I already said, as soon as the wing produce some lift the throttle is reduce and as a matter of fact servos begin to oscillate.

Yes, I think so although I have only tried for a Pixhawk 2. When I try and compile for Pixhawk 1 i get a maximum firmware size error, must be something to do with making on windows i think, because it compiles for all on the github checks. I can compile you the latest stable + the fix for pixhawk 1 if that is any good?

Maybe the compilation problem has something to do with the 1mB flash memory bug the pixhawk 1 has. It makes sense if the code size is already close to the limit.
Yes and thank you to compile the latest + the PID throttle fix.

I made some progress.
I have cloned again master and I succeed to compile arduplane using ‘make px4-v3’ command, so for pixhawk 2. But the command ‘make px4-v2’ give again and again an error (so unable to compile for pixhawk 1). This test was done one master so, I think, without your fix.
My supposition is that there is a bug somewhere probably with the code size.

Yeah, probably a bug somewhere in the compiler or make file or something I don’t know very much about that stuff. I have compiled the latest stable with the fix for Pixhawk1. I had to change the extension from .px4 to .txt to attach it on here so you will have to change it back.

ArduPlane-v2.txt (844.8 KB)

let me know how you get on.

Peter

Note that hover throttle learning is not implemented for quadplanes. The last commit in this PR implements it (for tailsitters only) if anyone would like to test it: https://github.com/ArduPilot/ardupilot/pull/8113

@iampete, I have been able to load your fix into a pixhawk1 using mission planner and download custom firmware. I can see the new parameters. I will test as soon as possible and let you know. I am finishing a new tailsitter after a big crash (my fault, nothing wrong with the code) of the former one, so I want to be careful.

@kd0aij, to make clear, is your implementation on master ?

@losawing No, my PR isn’t “on master” it is against master, and to test it, you would check it out from my fork then build it yourself. I’m testing using the ChibiOS build: fmuv2. Let me know if you want to test it and are having problems with git.

@iampete , I have tested the fix in Q_hover and Q_loiter. I ended to set Q_tailsit_thscmx to 1. These nasty oscillations at low throttle are gone and the pumping when flying fast in q_hover is less sensitive. I have been able to set Q_angle to 60° and fly to a maximum speed of 10m/s in a very stable way.
I have not tested transitions.
There is still a problem with tilt motor oscillations on the ground, same as before. When the wing is on its belly in fbwa or manual mode, if you switch to Q_hover and raise throttle, tilt motor begin to oscillate and propellers hit the ground. I think this is an integrator which is not cleaned.
I will post a video as soon as possible. It begins to be complicate for me to fly because the small beach where I use to fly is now full of tourists and I have to fly early.

@kd0aij let me some days to try to get your code modification. This is not easy, I try to learn. I have struggled to find your fork on github, you have one repository and only one branch called master that can be cloned. It is the right file ?

good to know it works, a video would be use-full for other issue possibly you could set the I gains to zero to try and diagnose if its a pitch or yaw oscillation.

2 videos with yours fix. Around 15km/h of wind.
first one with q_tailsit_thscmx=5 . A lot of elevons and motor oscillations

second one with q_tailsit_thscmx=1. Much more stable

A third video of the issue

setting q_a_rat_yaw_I or q_a_rat_pit_I to 0 does not solution the problem. When I switch from fbwa to q_hover and raise the throttle, tilt motor begin to oscillate so I reduce throttle to avoid the propeller to hit the groud. After a variable period of time oscillations stop and I can raise throttle again without problem.

2 Likes

@marco3dr I’ve found the bug that causes zero throttle on FBWA -> QSTABILIZE transition for 2 seconds. It is actually a bug in the is_flying() code for tailsitter transition. It thought you were not flying (ie. on the ground), so set throttle to zero.
I’ve put a fix here:


I’ll include this fix in 3.8.5, which I expect to release very shortly
Sorry the fix took so long. Life has been rather hectic for me for a while.
Cheers, Tridge

2 Likes

@chasep52 You may like to set Q_M_SPIN_MIN to a larger value if you fly a lot in QSTABILIZE mode. For example, a value of 0.4 would mean the throttle will never go below 40% while flying. That will make instabilility while descending a lot less likely. Make sure that Q_M_SPIN_MIN is well below your hover throttle though, or the plane will climb forever.

I found in the fork KD0aij/arduplane a branch called styker_quad. I have cloned and compiled this branch. I hope I am right. It is already loaded in a pixhawk and I am almost ready to make flight test with a TVBS.
It seems to me there there is no new parameters. So if I understand, elevons gain (and tilt motors ?) is reduced by a factor of 4 at maximum lean angle. Any recommendation ?

@losawing Since that branch adds support for extra motors, be careful that it hasn’t broken your motor tilt functions; maybe do a bench test with props off to make sure everything responds properly in QSTABILIZE mode.
Regarding my change to the speed_scaling, all I did was force the scale to 1 with the throttle at zero (instead of 5). The max is still 5 in my branch.
The other major change on this branch is to add “hover learning” for tailsitters; if you hover in QSTABILIZE for about 10 seconds, then switch to QHOVER, you should not see any jump in altitude. Beware also, that you will be only the 2nd person to test that, so be prepared to adjust throttle or change back to QSTABILIZE if necessary.

looks like its flying very well, not too sure about the other issue. I guess its something to do with transitions, tridge’s fix may help, its in the latest release so should be easy to test.

If not I would guess there d oscillation in pitch you could confirm by setting d terms to zero for pitch. Does it do it when transitioning from FBWA or manual to Qstabalise? Have you had a look at the logs?

the feature I am interested in is the reduction of gain with the lean angle. As you don’t speak of it anymore, shall I understand it is in an other branch ?
yes I am careful, I will make test with the first TBVS I made, it is buit with unbreakable plastic.

1 Like

Intresting. I Also building tailsitter and now i have RF8 and flight axis, but if i start SITL in mission planner, my throttle goes to minimum. I try to raise it but nothing happens, and when i look my joystick in screen i also see it moes only right/left, but not up. I calibrate and did everything. still no idea. If i end Flight axis and play just for fun, then it works perfectly :slight_smile: I took random plane with fixed wing fimware.
Does everyone have this problem also?

Regards

@losawing Oh, sorry, I was a bit confused. The reduction with lean angle is in that branch too. It begins to take effect at roll > 30 degrees and pitch > transition_angle (which is one of the tailsitter parameters).

I had a successful test of that in QSTABILIZE mode with about 16kph wind last weekend, but destroyed the aircraft on the next flight due to pilot error.
The test seemed to indicate good performance when pitched forward up to 60 degrees (tailsit_angle was set to 45). But I didn’t test high speed lateral flight (roll > 30 deg); my plane had too strong a tendency to weather-vane.

1 Like