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
Replies
hi, I've just installed this in to a bilxar v1 and i am having problems with altitude readings, at start up i get 0m but after a sec or 2 it then jumps to 70 meters, every think looks ok, i did install the multicopter f.w to test board and that read fine so i reinstalled latest ardupilot and have the same problem back, i can seem to find any think about this problem any help is much appreciated
al.
I flew a total of 18.3km today with about 7km in Auto, my two test waypoints are 300m apart and I use a DO_JUMP command to repeat the mission 25 times.
The problem is that, I was very used to the way v2.71 navigated as it suited the field at which I fly regularly (short distances between waypoints) and the also way I "expected" it to navigate.
With v2.71 I had cross track gain to zero so after exiting the turn at waypoint 1 there was no over-shoot and the plane flew STRAIGHT to waypoint 2. So when trying v2.72 my first impression was that I don't like it mostly because it was so different. Because of my fairly small flying area it tries to get back on track after a turn and so the flight paths have bulges at the end with a "dogbone" shaped flight path.
Navigation WAS good but there is no way now to turn off cross track gain, so don't take this as criticism but for me personally I think v2.71 "navigates" better (at least for short distances).
v2.72: The purple track was actually in Auto but after turning at waypoint 2 the plane strangely started going off on it's own so I hit RTL(pink) and then Auto again which produced the red track.
Last week's flight with v2.71 (in pink) compared with v2.72, same waypoints. (The pink path offset at the top was when waypoint 1 was closer and off to one side)
Will try it this weekend. Having some big problems tuning the navigation on my Penguin on 2.70 so I will update it and see how I go.
BTW it is just an update with Mission Planner using the latest software? This replaces the old firmware?
Does any have 2.72 HIL working with X-Plane? I am having issues getting my X-Plane HIL to work and it worked with 2.71.
Are the X-Plane Settings for Data for HIL located here still correct for this version of the firmware? I ask because when I switch to stabilized flight my airplane slowly banks left and descends and eventually crashes. The RTL mode just weaves back and forth or it will bank hard while descending and crash. I have done an erase, reset and flashed the 2.72 HIL firmware. Any ideas?
Excellent work again !
Tridge, have you tried 2.72 on your X8 yet ? If so, what would you advise for L1 period ?
Oh, and with the parameter changes, is it necessary to do a eeprom erase ?
I had with my new PX4 lost com port syndrome, I can update Firmwares, but initializing sequence drops out com port after few seconds.
Also I have old and reliable (?) APM 1.0, in FPV twin raptor which I can try new version when weather permits.
But keep up good promising work ;-)
I am looking forward to trying this out.
Any dates on the nav solution for altitude release?
Thanks for all the hard work.
Wow, looking forward to trying this out on my new plane! Thanks
Hi Andrew.
This looks great, Someone needs to make this a sticky!!
How does this impact on the total tuning process for a new plane?
Is this correct:-
load 2.72 from mission planner
Calibrate Tx radio for inputs
Level aircraft
Adjust PID gains to stabilize aircraft, in FBW A , and manual control
then adjust NAVL1_PERIOD until Auto is smooth and follows waypoints
Thats it? or have I missed something. !!
many thanks for a great system.
AWESOME! great work!