Developer

ArduPlane 2.72 released

I'm delighted to announce the release of ArduPlane 2.72 for your flying pleasure.

The big news in this release is the addition of the new L1 navigation controller. The work on the L1 controller library was started by Brandon Jones, and his initial github pull request is a great please to look to understand the new code. As is so often the case with ArduPlane, the documentation still hasn't caught up with the code (though I hope it soon will!).

After Brandon’s initial work Paul Riseborough did a lot of work to add more robustness to the algorithm. The base L1 algorithm suffered from from instability in "path capture", which is how it handles navigation when you are a long way off course (for example, when you enter auto after having flown manually). Paul made some fantastic improvements which have been extensively flight tested by Brandon, Paul, Jon and myself.

I did a final test flight of it this morning in a Bixler2, and it flew very nicely. I found a setting of NAVL1_PERIOD=20 suited the Bixler2 very well. It produced great path tracking, and very nice circles in loiter, despite high wind.

Paul is not finished yet though! He's been working on re-working the APM_Control library started by Jon Challinger, and is getting fantastic results with roll and pitch control, greatly reducing the altitude loss in turns. That isn't in the 2.72 release though as I want to do a bit more testing and tweaking of the code, but I expect to get Paul’s new controllers in the next release.

Before I go into detail on how to tune the new L1 controller, I better list some of the other changes in this release:

  • avoid doing auto radio trim if the resulting trim leaves less than 20% of travel between the trim value and the MAX and MIN for the aileron, elevator or rudder. This prevents auto-trim leaving you with very bad trim if you do it while your transmitter is off
  • removed HIL_MODE_ATTITUDE, we always now use SENSORS HIL, which is much more accurate, and is needed for correct operation of the L1 controller
  • added new LEVEL_ROLL_LIMIT parameter. This replaces both the TKOFF_HEAD_HOLD and RUDDER_STEER options, and instead allows you to specify a roll limit in degrees for auto land and takeoff. The default is 5 degrees, which should be small enough to prevent wings scraping on the runway in most planes.
  • Removed the AHRS_BARO_USE option, as it caused trouble for too many users
  • allow the WP_LOITER_RAD loiter radius to be set negative to mean that a counter clockwise loiter should be performed by default
  • fixed the handling of the LOITER_TURNS and LOITER_TIME commands
  • added new dataflash logging system, with self-describing logging format. See notes below for more info.
  • on auto-takeoff, if we have an airspeed sensor then keep throttle suppressed until we have both 5m/s ground speed and 5m/s airspeed
  • added support for 12 output PWM channels on PX4
  • enable relay in camera library for all APM boards (thanks to SSzilard)
  • cleanup use of const in libraries (thanks to Tobias)
  • lowered default AHRS roll-pitch correction gains from 0.4 to 0.3
  • changed AHRS to lower roll-pitch gains by another 50% when a high X acceleration is detected for a catapult launch, to prevent nose down on fast launch due to GPS velocity lag
  • fixed RC throttle failsafe handling on PX4
  • fixed a bug in returning airspeed estimate from DCM if an airspeed sensor is available (thanks to Jon Challinger for finding this important bug)

As you can see, the dev team has been busy!

A few special notes about the DataFlash logging changes. This is the first release to support 'dataflash' logging on the PX4, and it implements it by writing binary log files to the SD card in an APM/logs sub-directory. Those log files are self-describing, which means the format of the logs is contained in the headers of the log. This makes it possible to add new log messages without having to change MissionPlanner. It also means you can now get logs into MissionPlanner by pulling the SD card out of the PX4 and plugging them into your PC, which is much faster than using the CLI. The new log format is also used for APM1 and APM2, which will mean we no longer have to align the version of MissionPlanner with the ArduPlane log version when analyzing dataflash logs.

Now on to the main thing in this release - the new L1 navigation controller.

The new controller makes a huge difference to navigation in ArduPlane in the following ways:

  • tuning is now much simpler - the only navigation parameter you really have to change is NAVL1_PERIOD
  • much better path tracking, even in high wind
  • loiter now produces a very nice circle even in high wind
  • much less servo flapping! If you tried to tune the old controller for very good path tracking it would end up changing servo position very rapidly, wearing out the servos and drawing more current than it should. The new controller has much smoother servo movement.

The default NAVL1_PERIOD is 25, which should give quite gentle navigation on most airframes. A smaller number means more aggressive navigation (tighter turns). Adjust it by around 5 at a time until you are happy with the performance. Most small RC planes will need a value of between 15 and 20. I need a value of 15 on my Phoenix Tiger60 low wing nitro sports plane, and 20 for my Bixler2. The default is 25 to ensure that we get gentle navigation by default - if the value is too small the plane can snake rapidly, and roll too rapidly, possibly leading to a stall if the aircraft is heavily loaded.

I hope you all enjoy flying this release as much as I do. Happy flying!

Cheers, Tridge

(PDF tuning guide)

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hi to everyone...i tested the 2.72 and found two anomalies...attached airspeed sensor and realice pre-flight calibration in mission planner...put the plane in flight and the pitot up the measure to 80km/h and ground speed is 20km/h...wind is 20 km/h landing the plane and the airspeed fix in 80 km/h ,no 0 have in startup, new pre-flight calibration and works fine...in tree flights the same issue appear...another fail found, i program mission with 4 wp in square pattern an fake wp for infinite do jump...before flight some minutes put the plane in loiter...read the wp in mission planner...the plane still in the air and loiter mode..modified the point for more distances...an write wpoints...after thid procedures the plane travel long away and no still in loiter...put the plane in manual...read the paramaters list and found a wpradius now is 216 meter...i program 40 meter in initial setup...and the mission planner automated modified this parameter after write mission...this behaviour appear tree times in my tested...
  • 100KM

    Just had another successfull flight with the X8 today.  This time fully loaded with 4x5000mah 3S lipo's, kodak ZX1 camera and 5.8Ghz videotransmitter.

    There was quite a strong and gutsy wind (4-5 beaufort), enough to keep a few clubmembers on the ground, but the X8 handled it fairly well.

    I also tested failsafe today.  first by setting throttle to 900 with a switch.  After that was successfull I turned of my tx in flight and the X8 nicely made a circle and after 20s orso it switched to RTL and came back home where it loitered until I turned my tx back on and switch flight mode to stabilise.

  • Hi,

    I did tests with X-Plane ,  Arduplane 2.7.2     (apm2-hilsensors  ver.  from  04-May-2013 06:24)    and have a problem.    When the plane is with heading 90 the GPS vector is pointed 360 degrees. The wind is 0m/s.  

    Tridge , do you have some ideas ?

    Best,

    Evgeni3692706228?profile=original

    3692706095?profile=original

  • Moderator

    Greetings,

    I upgraded from 2.69 to 2.72 this evening and I am hoping to go test it tomorrow, however I am having a slight problem. I am using an APM 2.5 with an AttoPilot 90A Voltage/Current sensor, and I can't get it working with 2.72. If I configure it in the MP to read Voltage and Current, AttoPilot 90A and tell in that I have an APM 2.5 non 3DR (not sure what is meant by non 3DR, are they talking about the sensor or the board?) nothing is shown for voltage or current. If I change the last item to APM 2.5: 3DR Power Module I get a voltage and current however the voltage is a bit low around 12.2 when in should be around 12.5, and the no load current reads 21A. It worked fine under 2.69 any ideas what I might be doing wrong? I feel like the first setup with APM 2.5 non-3DR is the correct setting but alas nothing is working.

    Regards,

    Nathaniel ~KD2DEY

  • Hi,

    I am a totally new member of this blog.

    I have an interest in drones and my professional background is in computer science. Particularly I have conducted research work related to use of L1-norm in other contexts.

    I would love reading any academic reference related to the recent developments of L1 navigation. If the core of the algorithm is based on some publication, is it possible to have a reference ?

    Thanks so much for your attention, and kudos for the great work !

    Andrea

  • installing mission planner 1.2.4.8 and try to update the firmware, but it took too long to connect, and when upgrading firmware it takes 10 minute to check the apm version and always failed... anyone having the same problem ?

  • Moderator

    @ Tridge

    Hi Tridge

    I just loaded 2.72 into my APM2.0 everything seems Ok except this, -  On the Ardu plane Pid page in configuration I see 2 sections "Greyed out" they are Nav Roll Pids and Xtrack Pids, they all show zero and I cannot change them, I have competed the download twice and reset the APM and PC several times but the greyed out sections are still there. Is this correct and the result of the L1 changes or have I missed something??

    Your advice will be appreciated.

     

    ps MP is 1.2.48

     

     

  • Hi guys!

    Thank you for your excellent work!

    I managed to fly many kilometers with this new controller, the plane follows the track very well.

    I found only one strange thing: around the middle of every turn the plane gets back to horizontal position for a second then turn again. This strange behavior cause some undershoot in every turns, see the attached picture. I have tried many NAVL1_PERIOD between 25-19 but the results are similar. What parameters should I tune? Should I try out a lower NAVL1_PERIOD?

    Cheers,

    Szilard

    3692703807?profile=original

  • 100KM

    Just back from a testflight with my X8 and 2.72.  Flew for 1u12min and the plane covered 72km during that time.  It repeated it's mission 3 times and was loitering at the endpoint for most of the other time.

    Loiter flies near perfect circles now, instead of big rectangles with 2.71

    Used the default of 25 for L1 period.  I'm very pleased with the performance !

  • Hello,

    Today I tried the new firmware 2.7.2, the flight okay stabilize the plane (Easy Star) was well balanced and leveled then I moved here FWB has behaved in a strange way, with tight turns have passed in first stabilize and then in the manual but the aircraft no longer met the comadi and fell.
    Fortunately did not break anything but the behavior was bizarre and unpredictable.
    I tried to interpret the log, but I could not figure out where there was the question of whether it is power, electromagnetic or radio frequency interference, a blackout dell'APM2.
    my hardware is:
    APM2, GPS MT3329 fw 1.6, 3DR Radio telemetry, speed sensor MPXV7002DP.

    I attach log.

    thanks for your attention

    logs.rar

This reply was deleted.

Activity