Servers by jDrones

APM:Plane 3.0.2 released


(tridge) #1

The ardupilot development team is proud to announce the release of version 3.0.2 of APM:Plane. This release combines some important bug fixes with some new features.

[color=#0000FF]I2C bug fix[/color]

The most important change for this release is a bug fix for an I2C bug in the NuttX I2C driver code that would (under some rare circumstances) cause a Pixhawk to crash. This bug fix is the primary reason for doing a new release now.

This bug was able to be reproduced by creating a 1.3m GPS cable carrying both the I2C signals for a magnetometer and the UART signals for the GPS. Interference between these two signals could cause the I2C controller to give spurious data to the I2C driver. The I2C driver did not have sufficient protection against these errors and could crash the board.

While we have not been able to reproduce this error with the normal cables that come with a Pixhawk we cannot rule out the bug triggering with shorter cables, so we are doing a fast release to fix the bug.

[color=#0000FF]Autotune[/color]

This release also includes an important new feature - automatic roll/pitch tuning. While this feature is still considered experimental we have had very positive feedback from beta testers and have decided
to include it in the release.

Full documentation for how to use automatic tuning is available here:

http://plane.ardupilot.com/wiki/automatic-tuning-with-autotune/

we hope that the automatic tuning will help users who have had difficulty with the standard APM:Plane manual tuning procedure. We plan on extending autotune to other aspects of fixed wing tuning in future releases.

[color=#0000FF]Other changes[/color]

[ul]fixed a glide slope calculation error when very close to waypoints
fixed a bug when swithing to another auto-throttle mode during auto takeoff (thanks to Marco for finding this bug!)
added MIS_AUTORESET parameter (thanks to Andrew Chapman)
support compassmot calibration by supplying current measurments to the compass driver (thanks to Jon Challinger)
fixed a GPS driver bug that could cause GPS lag in case of lost GPS samples (thanks to Jon Challinger)
fixed a LOITER_TURNS bug in missions for counter-clockwise loiter (thanks to Iskess for finding this bug)
added support for OBC termination requirements to PX4IO
added support for pressure altitude termination to OBC module
fixed EKF wind estimation with no airspeed sensor (thanks to Paul Riseborough)
improved tuning of EKF for fixed wing aircraft (thanks to Paul Riseborough)
Converted rally point code to library AP_Rally (thanks to Andrew Chapman)
added SITL checking for numerical errors[/ul]

[color=#0000FF]Thanks to testers![/color]

Many thanks to everyone who tested the beta versions of this release!
Special thanks to Marco, Paul, Jon, Iam, JNJO, sonicdahousecat and
Keeyen for providing testing of both existing features and the new
autotune code.

Happy flying!


(Marco Robustini) #2

Thanks Tridge for all your work, is a pleasure to fly with this release, brings security and stability.

Marco


(JNJO01) #3

Yep, thanks Tridge. :slight_smile:
Just had a few flights with 3.0.2.
It’s like on rails, even with my incomplete tuning.


(tridge) #4

Thanks Marco!
btw, do you think it would be possible to make a reasonable video demonstration of autotune? I think some users won’t understand just how much you have to “roller coaster” the plane to get the pitch tuning right and maybe a video would help.
I could do a recording of a SITL flight, but if you think a real flight video would be workable then would you be interested in trying that? We’d link to it on the autotune docs page.
The part I’m not sure will work is seeing the movement of the plane closely enough to understand what the pilot is doing. That is where a SITL flight would work well (can be zoomed right in) if a real flight isn’t clear enough.
Cheers, Tridge


(JNJO01) #5

Not sure if it’s of any use, but I had a camera onboard during an Autotune flight
1.35-ish to 4.30 is Autotuning.
youtube.com/watch?v=R2DlX0RqlJs


(tridge) #6

[quote=“JNJO01”]Not sure if it’s of any use, but I had a camera onboard during an Autotune flight
1.35-ish to 4.30 is Autotuning.
youtube.com/watch?v=R2DlX0RqlJs[/quote]
thanks.
I think it show how difficult it will be to do a good video showing how to autotune effectively. Planes are much harder to do good demo videos of than copters I think, because of the range they operate at. On-board video gives a different perspective, but I don’t think it would really help someone to understand.
Maybe a SITL video would be best?
Cheers, Tridge


(eaglei) #7

A question about airleron differential,

If I setup software differential on my radio so I have the correct throws in manual, this would mean that if I do radio calibration APM will see limited range for one side.

Does this mean that aileron differential can only be operated in stabilise and the other auto flight modes and not in manual, ie by not setting any software differential in radio?

Thanks


(zhoter) #8

compassmot command isn’t recognized on my terminal. I wonder what’s wrong.


(Icarus) #9

I tried the autotune today and it appeared to work great. The downside was the tune was pretty mild. I had it set to 5. I will try again tomorrow with a 6.
Question, each time one uses autotune, does it overwrite the old autotune?
What parameters does autotune affect or change, just PID or more?
Thanks,
Steven


(Icarus) #10

[quote=“Icarus”]I tried the autotune today and it appeared to work great. The downside was the tune was pretty mild. I had it set to 5. I will try again tomorrow with a 6.
Question, each time one uses autotune, does it overwrite the old autotune?
What parameters does autotune affect or change, just PID or more?
Thanks,
Steven[/quote]

Tried the level 6 Autotune and still too mild for me. Tomorrow will try the level 7. I can say for the average flyer or someone inexperienced, the Autotune will work excellent for you.

I still have the question of which para. the Autotune affects or changes and does each Autotune session overwrite the last one as long as the 10 second memory save is achieved?


(JNJO01) #11

These parameters were changed after one of my Autotune flights with an APM2.5:
PTCH2SRV_P
PTCH2SRV_I
PTCH2SRV_D
PTCH2SRV_RMAX_DN
PTCH2SRV_RMAX_UP
PTCH2SRV_TCONST

RLL2SRV_P
RLL2SRV_I
RLL2SRV_D
RLL2SRV_RMAX
RLL2SRV_TCONST

They are overwritten by each new Autotune flight.
Each Autotune starts with the values that are stored in the APM/Pixhawk


(Icarus) #12

[quote=“JNJO01”]These parameters were changed after one of my Autotune flights with an APM2.5:
PTCH2SRV_P
PTCH2SRV_I
PTCH2SRV_D
PTCH2SRV_RMAX_DN
PTCH2SRV_RMAX_UP
PTCH2SRV_TCONST

RLL2SRV_P
RLL2SRV_I
RLL2SRV_D
RLL2SRV_RMAX
RLL2SRV_TCONST

They are overwritten by each new Autotune flight.
Each Autotune starts with the values that are stored in the APM/Pixhawk[/quote]

Thank you. I observed the same, just wanted to be sure. I did a save of my para. before Autotune and compare after. I also noticed my compass offsets and gyro cal had changed. That may be because I have compass auto learn enabled??? I found the Autotune at level 6 was way less aggressive than my manual tune. I’ll try level 7 tomorrow and see how that goes.


(DriesR) #13

Today I also tried the autotune function on my X8 wing, but as Icarus I also was not completely satisfied with the result and found it to be too mild. I started with my good-old P-values (P_Roll=0.6; P_Pitch=0.7) as starting values, and set the ID values to 0.

The first run of ± 7min as on level 5, I did notice significant changes of PID during the flight. When checking the PIDs on the ground, both I and D did change significantly, but the P values stayed ± constant.

I was happy that the autotune function found results for the P value close to what I have been flying for a year now, but also was surprised it didn’t shift that much either. To check the algorithm, I did a second run on level 5, now with P_Roll =0.5 and P_Pitch=0.5, hoping the values would convolve into simular results as the first run. But they didn’t. Again, big change for the I-D values, but P values stayed close to 0.5.

Third run was on level 6, with simular results as the second run.
I do have to say I did had bad compass health, probably because I installed the GPS/compass to close to the motor (side-effect of moving the compass outside of the APM2.6)

Any suggestions on improving these test-flights? Would be happy to redo the autotune!

cheers
Dries

ps… good work guys on adding these and other functionalities which makes the autopilot even more performant!


(Thomas J Coyle III) #14

@DriesR,
Providing tlogs and or data flash logs might help to improve the chances of helping you to better tune your X8.
Regards,
TCIII GM


(Icarus) #15

[quote=“DriesR”]Today I also tried the autotune function on my X8 wing, but as Icarus I also was not completely satisfied with the result and found it to be too mild. I started with my good-old P-values (P_Roll=0.6; P_Pitch=0.7) as starting values, and set the ID values to 0.

The first run of ± 7min as on level 5, I did notice significant changes of PID during the flight. When checking the PIDs on the ground, both I and D did change significantly, but the P values stayed ± constant.

I was happy that the autotune function found results for the P value close to what I have been flying for a year now, but also was surprised it didn’t shift that much either. To check the algorithm, I did a second run on level 5, now with P_Roll =0.5 and P_Pitch=0.5, hoping the values would convolve into simular results as the first run. But they didn’t. Again, big change for the I-D values, but P values stayed close to 0.5.

Third run was on level 6, with simular results as the second run.
I do have to say I did had bad compass health, probably because I installed the GPS/compass to close to the motor (side-effect of moving the compass outside of the APM2.6)

Any suggestions on improving these test-flights? Would be happy to redo the autotune!

cheers
Dries

ps… good work guys on adding these and other functionalities which makes the autopilot even more performant![/quote]
To be honest, I think they pretty much cover what you are asking in the Autotune instruction. I think the Autotune feature is great for beginners that haven’t a clue or don’t want to read much. On the other hand, it was not aggressive enough for me. I have yet to try level 7 due to distractions. I think I will leave the I,D where the autotune suggests and tweak the P’s a little higher.


(Staywan02) #16

I’m having a problem where I can’t see the AUTOTUNE flight mode in the Flight Modes drop down list.

I’m using Mission Planner 1.3.1, and Arduplane V3.0.2.

Do I have to build the code from source and manually enable Autotune?

I have not seen this problem anywhere on the forums yet, so I’m either missing something obvious, or I’m really unlucky.


(Icarus) #17

[quote=“Staywan02”]I’m having a problem where I can’t see the AUTOTUNE flight mode in the Flight Modes drop down list.

I’m using Mission Planner 1.3.1, and Arduplane V3.0.2.

Do I have to build the code from source and manually enable Autotune?

I have not seen this problem anywhere on the forums yet, so I’m either missing something obvious, or I’m really unlucky.[/quote]
It is in a drop down list in the radio modes tab. Try a reinstall of MP


(JNJO01) #18

[quote=“Staywan02”]I’m having a problem where I can’t see the AUTOTUNE flight mode in the Flight Modes drop down list.

I’m using Mission Planner 1.3.1, and Arduplane V3.0.2.

Do I have to build the code from source and manually enable Autotune?

I have not seen this problem anywhere on the forums yet, so I’m either missing something obvious, or I’m really unlucky.[/quote]

Connect Mission Planner to the APM/Pixhawk.
In Mission Planner - press “CTRL-F”, you get a new window, press button “Param Gen”. It takes a little while, then Autotune will be available in the flight mode list.


(osmunda) #19

Hi Tridge,

First of all, thanks again for all your support.

Please, find here-attached the log and tlog files of my crash with ArduPlane 3.0.2, as I told you in Diydrones forum (diydrones.com/profiles/blogs/apm … 3-released).

Resuming what I already posted there, I don’t really know why my plane became to pitch down while I was flying in FBWA until it crashed. I didn’t notice that odd behaviour until it was too late so I could not react so quickly to change it to Manual mode to save my air plane.

Checking my log I can see that there is a problem with Alt_error. I took off in FBWA without problems. Then I changed to RTL and changed Alt from 100 to 300 m AGL while I put my FPV googles. After that I changed again to FBWA and then my plane started to lose altitude, first in an smooth way but finally very steeply (that was when I worried and the crash happened).

The fact is that when it started to go down I had no response trying to pitch up the plane with or without throttle (in the contrary it went down and down). Mechanical failure? I don’t think so because elevator works after the crash although now I can notice a great reduction in pitch response from MANUAL to FBWA (but I only can test it on ground with the airplane seriously damaged).

Two days before a performed some tuning in the plane and I was flying without problems (and a fairly good pitch response, although more fine tuning was required) and I think I didn’t change anything before the last flight. Comparing with parameters of the previous flights few things have changed but compass_offset is the most different. In fact, Log Analysis give me the following results:

Log File //Tablet-pc/c/Program Files/Mission Planner/logs/2014-05-18 00-04-36 6_crash.log
Size (kb) 2942.3544921875
No of lines 48194
Duration 0:00:00
Vehicletype ArduPlane
Firmware Version V3.0.2
Firmware Hash f233f957
Hardware Type APM 2
Free Mem 1342
Skipped Lines 0

Test: Brownout = PASS -
[color=#FF0000]Test: Compass = FAIL - Large compass off params (X:68.25, Y:176.92, Z:177.69)[/color]
No MAG data, unable to test mag_field interference

Test: Dupe Log Data = PASS -
Test: Empty = PASS -
Test: Event/Failsafe = PASS -
Test: GPS = UNKNOWN - No GPS log data
Test: Parameters = PASS -
Test: PM = NA -
Test: Pitch/Roll = NA -
Test: Underpowered = NA -
[color=#FF0000]Test: VCC = WARN - VCC min/max diff 0.335v, should be <0.3v[/color]

Could compass offset affect flight control?


(CarlD) #20

[quote=“JNJO01”]
Connect Mission Planner to the APM/Pixhawk.
In Mission Planner - press “CTRL-F”, you get a new window, press button “Param Gen”. It takes a little while, then Autotune will be available in the flight mode list.[/quote]

Is autotune available on APM Planner 2.0.9? I cannot seem to figure out how to follow the instructions you provided. Mission Planner 1.3.1 is only available for Windows and I am on a Mac.