Servers by jDrones

Tiltrotor support for plane


(tridge) #1

Hi Mike and Trevor,

I’ve put in a PR for tiltrotor support for plane here:
https://github.com/ArduPilot/ardupilot/pull/4021

This successfully flies both a FiireFlyY6 model and a tilt tricopter quadplane model in SITL with support
for automatic transitions, auto takeoff, auto landing, RTL, hover, loiter etc.

I haven’t flown it on a real tiltrotor yet but hope to soon. I bought one of these:

http://www.hobbyking.com/hobbyking/store/_85127__Canadair_CL_84_Dynavert_Tilt_Wing_VTOL_PNF_AU_Warehouse.html

and hope to fly it later this week. It is a tiltwing rather than a tiltrotor but I think the same code will fly it (with different parameters).

Would you be interested in trying the new code on a real FireFly6?

I have a PR for it here:

https://github.com/ArduPilot/ardupilot/pull/4021

To fly it in SITL checkout that branch and then use:

cd ArduPlane
sim_vehicle.sh -j4 -D -f firefly --console --map

that will start it up with appropriate parameters for the fireflyy6 model.

The default outputs are:

  • chan1: elevon1
  • chan2: elevon2
  • chan3: unused
  • chan4: unused
  • chan5: front right ccw motor (tiltable)
  • chan6: front left cw motor (tiltable)
  • chan7: front left ccw motor (tiltable)
  • chan8: rear mid cw motor
  • chan9: front right cw motor (tiltable)
  • chan10: read mid ccw motor
  • chan13: motor tilt servo

The SITL firefly model will automatically setup the right parameters. If doing it on a real board then you will need to set something like this:

Q_ENABLE=1
Q_ASSIST_SPEED =10
Q_FRAME_CLASS=4
Q_TILT_MASK=23
Q_TILT_MAX=60
Q_RTL_MODE=1
Q_VFWD_GAIN=0.1
Q_WVANE_GAIN=0.3
RC13_FUNCTION=41

you will also need to set ELEVON_OUTPUT appropriate for the elevons, and set RC13_MIN, RC13_MAX and RC13_REV suitable for the tilt servo.

Cheers, Tridge


QuadPlane help for code
Tilt Rotor TriPlane
ArduPilot flying on the CL84 TiltWing VTOL Aircraft
Quad plane question
E-flight Convergence demo in Hokkaido
(Greg Covey) #2

Hi Tridge,

Great work here! I’ll link our conversation on DIY Drones below about the CL-84.

I have a spare Pixhawk that I can start mounting in my CL-84 this weekend. The default outputs mentioned above seem to reference a wing setup with elevons like the FireFLY6. Would channel 1-4 be normal plane outputs for the CL-84?

Let me know when you have a build for the CL-84 testing and some output documentation if it is different than the normal plane configuration. In the mean time, I could load copter on it and play with modes like Stabilize, Alt. Hold, and Loiter. Just adding a Pixhawk with BARO and GPS to the CL-84 will be fun!

[URL=“http://diydrones.com/forum/topics/px4-pixhawk-flight-core-controlling-firefly6-vtol?commentId=705844%3AComment%3A2247971”]PX4/Pixhawk Flight Core Controlling FireFLY6 VTOL[/URL]


(Paul Meier) #3

Hello Tridge, first and foremost thanks alot for all your developement.
I have a problem, was trying to fly it in SILT but got following error:
ardupilot/libraries/AP_HAL_SITL/SITL_cmdline.cpp:69:12: error: reference to ‘MultiCopter’ is ambiguous
{ “+”, MultiCopter::create },
^
compilation terminated due to -Wfatal-errors.


(Paul Meier) #4

Sorry Tridge, did not copy paste well, please disregard above.
Thanks again for all your developement


(tridge) #5

Hi Greg,
This is a followup to your comment here:
http://diydrones.com/xn/detail/705844:Comment:2253858
The tiltrotor/tiltwing support for quadplanes in ArduPilot is now in master thanks to some review by Randy and Leonard.
The key missing piece to get this flying on the CL-84 is to support tiltwings where the wing rotation rate is fixed (ie. a retract servo instead of a normal servo). Then we need to measure the time it takes to do the tilt and check that it takes the same amount of time to tilt up and tilt down. Then I need to add a parameter that tells the flight code that it is a fixed tilt rate.
We also need to get a good tune on the multicopter rate controllers. We have a new tuning method here that could help:
http://ardupilot.org/plane/docs/common-transmitter-tuning.html
Are you comfortable with building your own firmware? If not then I could build it for you. At the moment we don’t autobuild firmware for tricopter quadplanes.
Cheers, Tridge


(tridge) #6

Another experiment we need to run is what happens to the tilt servo if you switch it back while it is in the process of tilting. So if you are in tricopter mode, then you start tilting towards fixed wing mode and half way there you switch back to tricopter mode so the servo is told to go up to vertical again. Does it immediately change direction?
We need this as the code needs to know what the wing tilt is at any moment in the flight so it can apply the right compensations.


(Greg Covey) #7

Tridge,
I haven’t built APM code so if you could provide a build that would be great! Once I test the CL-84 using the stock controller with my new SimonK firmware ESCs, I’ll be ready to drop in a Pixhawk and M8N module. After a simple hover test in my backyard, I suspect that the “drunken sailor” effect is gone from using the stock ESCs.

My understanding of my FireFLY6 transition is that during the transition, the command is locked out from reversing until the transition has completed. In this manner, you never change modes in mid-transition. However, it seems that the CL-84 could only provide this lockout if we ran the servo control through the Pixhawk. Let me know your thoughts on this technique versus the current setup. I will test the CL-84 transition control on the bench tomorrow.


(tridge) #8

I was definitely planning on running the tilt servo control through the pixhawk. We have to do that for fully autonomous takeoff.
I’ll build a fw for you once I’ve got the option of supporting the retract-style servos. Should be in the next few days.
Cheers, Tridge


(Greg Covey) #9

Tridge,

Sounds good, thanks!

This first test flight in my backyard simply shows that the the new SimonK ESCs work just fine using the stock CL-84 controller. The lean to the right wing was the CL-84 compensating for a slight breeze. I broke my stock tail prop putting it back on so I replaced it with a much stronger Aero-naut 6.5x4 carbon electric prop. No drilling required. Also, a good replacement for the stock main props is the APC Multi-Rotor Bundle 10x4.5 four prop set (LP 10045MR-B4). I bought a set but haven’t broken a main prop yet.

After a flight test, I’ll replace the stock controller with a Pixhawk and M8N module. Just adding a BARO will provide a great improvement over the stock performance. Adding VTOL control from APM: Plane will make the CL-84 and awesome entry level VTOL!


(Greg Covey) #10

Tridge,

I tested the transition control on the CL-84. It takes about 7 seconds to complete a transition from hover to forward flight. Same time for the other direction. The stock transition control allows it to change directions at any time during the transition. I think we want to disable that through the Pixhawk.


(tridge) #11

@GregCovey,
is the 7 seconds for full transition, or just the time it takes the wing to rotate? I didn’t measure mine accurately (just counted "ONE…TWO…THREE…FOUR), but I thought it was about 4 seconds.
What we need for ArduPilot is the time it takes the servo to move through its full range when its triggered.


(Greg Covey) #12

I was using the transition servo noise from start to finish for my 7 second count, not just the wing travel.


Quad-Plane tilt rotor idea
(Greg Covey) #13

Hi Tridge,

I see that Arduplane v3.6.0 Beta 1 is out from looking at the [URL=“https://github.com/ArduPilot/ardupilot/blob/master/ArduPlane/release-notes.txt”]Release Notes[/URL]. Does this contain your build changes for the retract-style transition servo?

My Pixhawk v2.4.8 clone from [URL=“http://www.ebay.com/itm/like/391430066517?lpid=82&chn=ps&ul_noapp=true”]eBay[/URL] arrived. It’s a great deal for only $65 shipped.

I made a quick flight test video to show the improvement in the CL-84 transitions when using ESCs with SimonK firmware. The clouds created some auto-focus issues with the Panasonic GH4 camera, and, the zoom amplified the camera shaking, but you can still see the relatively smooth transitions. The SimonK ESCs also eliminated the audible whine of the stock ESCs.


(tridge) #14

Hi Greg,
I haven’t implemented the code for retract type servos yet. I did start modelling it in a flight simulator with ArduPilot in control and it was really unstable during transition. I need to look into why it is so unstable and fix it.
Sorry it is taking so long. My priority right now is the 3.6.0beta2 release and I probably won’t get to the CL-84 servo code for a few days more at least.
Cheers, Tridge


(Greg Covey) #15

Tridge,
Thanks for the update. No problem on the delay. Our summer is just beginning here so we have a good five months of flying weather ahead. After our Memorial Day weekend is over, I can start mounting the Pixhawk, GPS, and Power Module. I added a steerable nose wheel to mine so I could even try to fly it normal using Arduplane.


(Graham D) #16

Will a “Tailsitter” type plane (elevons only, single motor) be supported anytime in the future (or now)?

It is mechanically and electronically the most simple of the potential VTOL’s but would it be a challenge in getting it to work properly?


(Greg Covey) #17

This is my last test of the CL-84 before changing the stock controller to a Pixhawk loaded with new Tiltrotor firmware for APM:Plane. The stock ESCs were replaced with faster SimonK ESCs which made the transitions more stable and predictable. There was a fair amount of wind during this test which shows that the CL-84 can hover with control in breezes up to 10mph.

What a fun design!

Edit: Apparently, new users are limited to only 4 replies in a topic so I am forced to edit my 4th reply to add information.

I started my conversion to APM on the CL-84 by removing the stock flight controller and mounting the Pixhawk, GPS, PM, and support parts. I connected my Pixhawk to the FrSky X8R via a single SBUS connection.

I realized that we still need a connection diagram for the following outputs.

  • Left main motor CCW
  • Right main motor CW
  • Tail motor CCW
  • Tail motor tilt servo (Yaw)
  • Hover/Forward Flight mode servo
  • Ailerons
  • Elevator

Edit #2: This forum is pretty lame. How do you become something other than a new user if you can’t have more than 4 posts?

I hovered my CL-84 in the backyard using APM:Copter v3.3.3 firmware. It needs some pitch tuning because It’s not a normal tricopter with 3 equal motors but it works first try! What a hoot!

Edit #3: Hover testing with APM:Copter

I loaded copter v3.3.3 on my Pixhawk just to play around with how it might Loiter better than the stock controller. I’ve changed some PIDs and got it to work in Stabilize and Alt. Hold modes in light wind. Loiter will be next.

In addition to PID changes, I got a tip that these settings are needed for manual yaw control. Unlike the original controller, the manual yaw control is not active until the motors are running.

RATE_YAW_FILT = 20
ATC_SLEW_YAW = 18000
ATC_ACCEL_Y_MAX = 100000

Edit #4: Pixhawk Installation in CL-84

Edit #5: ARMing LED Indication

Tridge,
There doesn’t seem to be a way to drive the ARMing LED in Pixhawk like in APM 2.x. Maybe you can add an AUX output to drive the ARMing LED of the CL-84.

Edit #6: Initial Testing with Copter v3.3.3

While waiting for the APM Plane tiltrotor code to be enhanced for the CL-84 retract-style transition servo, I decided to play around with APM Copter v3.3.3 on my newly installed Pixhawk. Photos at the beginning of the video show component placement and you can see my telemetry unit is mounted underneath the fuselage.
My current PID settings allow it to work in calm conditions but it doesn’t like much wind so I will continue to investigate. It may be good enough to try an Auto-Tune at this point but first I want to check the Throttle-Mid and Vibration readings. Fun stuff!

Edit #7: Test #2 with Copter v3.3.3

I have my PIDs tuned better for wind now. I’ll wait for the new APM Plane code to be ready for the CL-84.


(Greg Covey) #18

Testing my new posting capability, thanks to Jani.

Hi Tridge,

My CL-84 is in a holding pattern ready for new firmware. Even if you don’t have the transition working perfectly, if you could make a build that would allow me to test the proper connections and setup for a tricopter, it would be a great start. I could simply play with hover setups and verify (on the ground) that forward flight mode is set up properly.


(tridge) #19

Hi Greg,
I’ve now implemented support for tiltrotors with “binary” servos (ie. retract servos). It has only had very basic testing in simulation, so I don’t suggest you fly it yet, but it would be great if you could start doing ground tests with props off.
The code is here:
https://github.com/tridge/ardupilot/tree/cl84-wip
and I have put a build for Pixhawk here:
http://uav.tridgell.net/CL84/
Here is a quick guide to the setup:
connect channels as follows:

  • chan1: aileron
  • chan2: elevator
  • chan5: front right motor
  • chan6: front left motor
  • chan8: rear motor
  • chan11: rear motor tilt servo
  • chan12: front motors tilt servo

set the following parameters:

  • Q_ENABLE=1
  • Q_TILT_MASK=3
  • Q_TILT_RATE=22.5
  • Q_TILT_TYPE=1
  • RC12_FUNCTION=41

Setup the Q_A_* params to match the ArduCopter parms for master tricopter ATC_*

The Q_TILT_RATE of 22.5 assumes that the tilt servo takes 4 seconds to go from all the way up to all the way forward. Please time that carefully by flicking between QSTABILIZE and FBWA and seeing exactly how much time it takes for the servo to rotate fully. The 22.5 value is 90/4 (so 90 degrees in 4 seconds).

For ground testing, see how the motors react as you move from QSTABILIZE, QHOVER and FBWA modes.

Cheers, Tridge


(Greg Covey) #20

Tridge,

Thanks for the code and setup information. I loaded it up and have some initial observations below. My biggest surprise is the automatic transitions based on flight mode. This feature is a shift in convention from my Taranis slider control used on the FireFLY6 and stock CL-84. I need to think about it some more since the QuadPlane implementation has specific flights modes for copter and plane. Fun stuff!

Here is the good stuff:

  1. Aileron and Elevator control properly with R/C sticks
  2. Aileron and Elevator compensate properly with plane movements
  3. Wing servo transitions properly between flight modes

Here is the odd stuff:

  1. Why is Flight Mode on Ch.5 for Copter and Ch.8 for Plane?
  2. Transitions take 6 seconds, not 4 seconds
  3. I lost my Copter v3.3.3 calibrations and now get Bad AHRS messages
  4. ACC Calibrations fail but were fine on Copter v3.3.3
  5. Can not ARM motors in Q modes due to errors above
  6. Motors don’t shut off in FBWA mode