New copter flight mode

Hi Pete, Happy Sunday! I spent days and days trying to get the quad plane hover to work out but it just would not work out. For now the copter hovers better than anything else on the market as far as I’m concerned. And seems best at recovering.

I’m trying to wrap my head around duplicating the sticks like you suggest. So while hovering in stabilize inputs are as normal. Then I flick a switch which tilts rotors, changes flight mode to acro so no stabilization. That same switch must also lock out Ele, ail, rud so only the throttle will work. But then it will lock out those three controls for the other flight controller. I’m trying to understand how I can still have those sticks work for the other flight controller for flight surfaces…

Just use the open tx mixer to output ele ail and rudder on two channels each, then set one lot of them to be disabled for the quad controller and set the plane controller to uses other channel numbers for ele ail and rudder, you can do this in ardupilot by setting the RCMAP_PITCH, RCMAP_ROLL and RCMAP_YAW parameters.

So you could duplicate the roll pitch and yaw on channels 14,15 and 16 then set those as the inputs using the RCMAP paramiters

acro still has stabilization is just based on rates not angles, you will find the quad fights the plane if you try and change directions, the Quadplane code is defiantly the way to do this properly. What sort of airframe is it? There are loads of different things running the code successfully.

Hi Pete, ok gotcha on the rc map stuff. I can make that work. So acro with trainer turned off will still attempt to stabilize? Hmm… you are right about the quadplane thing but I went down that road for a while and I am closer now. How big of a deal is it to make a new flight mode? or even a parameter for acro called “RC pass through” that would allow the motors to only be controlled by the throttle stick with zero stabilization? Is it a big job for someone who knows what they’re doing to make that change in the code? I really think that’s my best path forward right now…

it would be straight forward for someone to make a custom fork with just straight pass through, you could probably do it yourself by copying how the esc calibration code does straight pass through and just over righting that to another mode

are you interested in doing that for me? Or anyone else following along? A flight mode with pass through on all outputs and an option to disable stick inputs. I would be willing to Donate to the cause or send some free stuff… or a gift certificate to someone’s favourite drone store… something like that. I’ll bet that flight mode would open the door to other innovative ideas as well

I could possibly make it work in a bodge way, probably better to find someone who knows what there doing, I can’t see it being merged as a copter flight mode, its too specific. There would be much more interest in making the Quadplane code work better for your setup.

I’m ok with bodge… just let me know what I can do for you in exchange.

So what do you think? Are you interested? Or do you know anyone who may be interested?

I have had a quick look, i think you could do this quite easy by either adding a new mode or replacing a existing mode, the key line to add is set_throttle_out_unstabilized(float throttle_in, bool reset_attitude_control, float filter_cutoff) line 150 libraries/AC_AttitudeControl/AC_AttitudeControl.cpp

for example you can replace lines 40 to 50 in mode_acro.cpp with the above line, and it should work

Instructions to compile and add new modes are on the developer wiki, once you have it compiled you can upload using mission planner upload custom firmware button, then trying out with no props on.

Hi Pete, Thanks for your reply and I’ll bet I could figure it out but I’m going to leave it to someone who has done this before. Can you point me in the direction of someone who may want to do it? Like I said I’d be willing to compensate. Thanks

OK let’s let the bidding start at $100 Any takers? If it’s that easy it must be worth it for someone. All I want is another flight mode that’s a copy and paste of stabilized but with zero stabilization. Only throttle would control what happens to the motors nothing else. This new flight mode must have options to have stick inputs disabled and also the option of disabling outputs. Needs to work with both h&x quads and octos. Anyone interested?

i’ll have a go, but it will probably be a fair bit of trial and error, I will over write a mode you wont need such as drift or sport, what hardware are you running and what firmware version? I will use that as a starting point rather than master.

Awesome! Thanks Pete! I can send you an E transfer or PayPal or whatever you want just send me your email address. The flight controller we are using is a pixhawk 2.4.8. I’m fairly sure it is a clone. We have a bunch of that exact flight controller so that’s the only one we plan to use. The firmware I’m not sure but I just updated it last week so it must be current. I can check as soon as I get home. We rotate between H and X copter depending on which tests were doing. Lately it has been mostly H.

If it has to be just one type let’s do H quad but if it can work for H quad X quad and Octo that would be best. if it’s a lot of work just H is fine.

I have added the none stabilized output under sport mode, tested on my quad. Seems to work fine but be careful when your first try it as it could do unexpected things. I have changed the file extension to .txt to uploaded it here, you will have to change it back to .px4 then you can upload using the load custom firmware button in mission planner.

arducopter.txt (865.4 KB)

If it works as expected I can provide you with the code and put the changes into a custom mode.

Wow! That’s the best news I’ve heard all week! I’m going to test out tonight as soon as I get home!

Well it seems to do exactly what I wanted. I just tried it on a small quad with the props off and I like it. I’m going to do some more thorough testing and report back. But so far so good!!!

So I burned through 4 batteries on a small regular quad with 10” props and did some aggressive testing. Man it’s amazing how good that Pixhawk coupled with the amazing Arducopter software can recover. When I flip into this new mode “ i’m calling it Pete mode” the quad just flops over and starts flailing around. Flip that switch back to stabilize and she instantly recovers. So I’m quite happy with the results. The only other thing I could ask for if it would be easy Enough is the ability to turn off outputs somehow in the software. This would be for while in forward flight we may want to shut down some of the motors. I have no idea if it’s possible. Again we can’t just do it with the taranus because we have other flight controllers bound. If not I’m thinking another option is to find some sort of small relay that can open up the Control circuit going to the ESC’s or something like that. Thanks Pete I really appreciate it!!!

you could set up a motor emergency stop switch on a aux Chanel, this will kill all the motors. Also throttling back should work if you two channels for the throttle on the taranis. The only trouble is that currently Arducopter will disarm if the motor emergency stop is left on for too long.