Is AutoTrim in Arducopter Still Necessary?

463 views
Skip to first unread message

Robert Lefebvre

unread,
Mar 17, 2015, 4:21:29 PM3/17/15
to drones-discuss
It was brought up in the dev call last night, the possibility of deprecating the AutoTrim flight mode from Arducopter.

To be clear, this is the mode where you fly and "nudge" the sticks around, and each time you nudge, it integrates a small angle correction.  I never use this mode, as I find it dangerous.  You have to keep "poking" the the copter to offset drift, but at the same time, every poke integrates correction.  I almost crashed 2 years ago, or so, because I had forgotten I left AutoTrim on a switch, I thought it was Simple mode.  When I engaged the switch in flight, my stick inputs became permanent trim offsets, and I was basically chasing the copter around the sky.  It was a miracle I saved it.

Arducopter would still retain the function "Save Trim".  This is the mode where you use the transmitter trim buttons, to get the angle correction desired, then you land , and after landing, you flick the switch and it saves the settings.  Then you re-center your trims, and are done.  I much prefer this one as the trim buttons are precise, you can still nudge the copter to stop a drift, and there's lesser chance of improper operation because the save trim only happens once, while on the ground.

Does anybody have any opinion on this?  There's an issue about AutoTrim not working properly, but I'd rather just deprecate it than fix it.  Not out of laziness, but because I think it's not a good option anyway.

Rob

Robert Lefebvre

unread,
Mar 17, 2015, 4:23:05 PM3/17/15
to drones-discuss
This is the issue here:

This highlights another failure mode of Autotrim. 


Some users may accidentally kick off autotrim while the vehicle is landed by holding throttle down and yaw right for 10 seconds after arming. Their roll and pitch inputs will update the trims of the vehicle whether it's flying or not. This can lead to users messing up the trim values and their copters will not fly straight.

It's probably best to avoid this by:
1. only updating the trims if the vehicle is flying
2. improve communication with the user by sending text messages to the ground station (or add special autotrim status message) and adding some tone-alarm sounds (pixhawk only) as the process starts and finishes.



Jonathan Challinger

unread,
Mar 18, 2015, 3:03:56 AM3/18/15
to drones-...@googlegroups.com

It is a bit silly. We could have an auto-level part of autotune that holds position and slowly rotates 360deg maybe 5-10 times, and averages the target tilt over that period.

We can do it at the same time we add station-keeping to autotune! Its like a unicorn!

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marco Robustini

unread,
Mar 18, 2015, 4:09:09 AM3/18/15
to drones-...@googlegroups.com
Hi Rob, imho AutoTrim is a great feature, absolutely necessary.
I also believe that the procedure is correct, and of course as many others do not allow errors, is normal.

Marco

Holger Steinhaus

unread,
Mar 18, 2015, 5:12:12 AM3/18/15
to drones-...@googlegroups.com
I think the approach of in flight trimming by judging the position holding behavior in Stabilize/AltHold  (without yawing constantly as mentioned by Jonathan) is broken by design. Even 1 m/s of wind has 10 times more effect on position than lets say a trim deviation caused be an Pixhawk mounted 1° off from horizontal. And how many days do you have with less than 1m/s (I would estimate 10 per year here)? Even when yawing automatically while trimming I would expect that turbulence would lead to a rather random result when not averaging over at least a few minutes.

My trimming procedure currently is the following: place the copter on a table, align it perfectly level (I this nice device: http://www.hangar-9.com/Products/Default.aspx?ProdID=HAN192 , but a conventional bubble level will certainly do). Then, after some good time for IMU warmup, I manually adjust the AHRS_TRIM_ params, until the horizon is exactly zero on average. The result is nearly perfect for one of these rare days with zero wind (or when flying indoors) - never felt the urge to change a trim that I got in the described way. 

For my feeling, auto-trimming could be safely removed. 

Holger

Leonard Hall

unread,
Mar 18, 2015, 5:32:44 AM3/18/15
to drones-...@googlegroups.com
This is the only method I use to trim the copter and strongly disagree that it should be removed (Marco and I both argued strongly to get it put back in last time this part of the code was updated). While there maybe some features that might make it safer for people that somehow enter it accidentally, I think it is a very valuable feature.

I use the yaw to the right for about 15 seconds after arming with the throttle at minimum. I use this because I don't have to specially set up a ch 7/8 switch before I do it. This means that I can get a reasonable level from the normal accel calibration routine then, when I find myself in some dead air, I can fine tune it to perfection.

Dead air is very regularly found early in the morning or in the evening in Australia and based on my interaction with RC and full sized glider pilots around the world, this isn't unusual.



Jonathan Challinger

unread,
Mar 18, 2015, 5:43:32 AM3/18/15
to drones-...@googlegroups.com

All pretty moot before we have temperature stabilized IMUs, anyway. A 0.2 m/s/s change in bias error due to temperature will result in about 1 degree of trim error, causing your copter to fly away at about 20 cm/s/s. So, ignoring drag (which tends to be small at these kinds of speeds)
Second 1: 10 cm, 20 cm/s
Second 2: 40 cm, 40 cm/s
Second 3: 90 cm, 60 cm/s
Second 4: 1.6 m, 80 cm/s
Second 5: 2.5 m, 1 m/s

This, of course, increases if you get more temp drift than 0.2m/s/s

--

David Price

unread,
Mar 18, 2015, 5:59:50 AM3/18/15
to drones-...@googlegroups.com
If it's a poll then I use the feature and feel it is very useful,. I've used it to set level quite a few times in the field

the problem about some people could put in this mode and cause themselves issue is the same argument for not having acro mode or a host of other things,. I think there must be some assumptions made that sometimes people will cause themselves issues and that will be part of their learning experience

JOEL L SILVERMAN

unread,
Mar 18, 2015, 7:16:42 AM3/18/15
to drones-...@googlegroups.com
The Save Trim feature works well, and AutoTrim just seems to violate the KIS principle. I'd say go ahead and deprecate it.

Joel

Josh Welsh

unread,
Mar 18, 2015, 1:04:33 PM3/18/15
to drones-...@googlegroups.com

Ever since I was introduced to this feature, I’ve used it religiously when setting up new copters as well as after making any changes to a copter.  Good on those folks who don’t feel its useful, there’s nothing saying anyone HAS to use it, but to remove it simply because some folks don’t use it doesn’t seem to bring any value.

 

I’m in favor of some kind of is_flying() check but the feature, especially as Leonard described with activating it, should not be deprecated.  If temp compensation goes in or there is a future change to Autotune that allows for station keeping as Jon described, then great, but for now the feature works quite well as-is.  Just because some folks don’t use it doesn’t mean it should be removed from the ones that do!  And I think the use-case Rob described is due to not using it properly, not with a defect in the option itself.  Could be wrong though!

--

Robert Lefebvre

unread,
Mar 18, 2015, 1:21:30 PM3/18/15
to drones-discuss
Hey guys, calm down. ;)  Message received.  We honestly did not know if anybody was using it.  So I just asked the question.

I would like suggestions from the users about how to solve the issue here then.  One of the big problems really is that people who don't intend to user the feature, may accidentally get it, simply by a stick combination.  You know, I'm actually a pretty heavy user of the system, and I did not know that stick combination would enable it, until this issue was assigned to me!  So how many users really do?  I would like to make it so it can only be enabled by Aux Channel Function, but I can already tell Leonard won't like that.

So what is the solution?  We can't assume users have read the manual, fully, every single page.  And we can't assume they have a GCS connected.  If they can enable a feature by using a stick combination that is not unlike the normal arming procedure... it just seems a bit dangerous?  In the past, when users make mistakes with settings because they haven't read the manual, we use that as defence.  But this isn't the case of using a feature without reading it's instructions.  It's accidental usage of a function, because the setting is invoked with a normal stick combination.  This is a big part of the issue.  We can't say "you should read the instructions of the feature you are going to use", we would somehow need to force them to read the AutoTune page whether they want to or not.  At the very least, this needs a big red warning somewhere prominent in the wiki, on the same page we tell them how to arm.

And simply waiting until it's airborne doesn't solve the problem of accidental feature usage.  It just delays it.  It would help intentional users though, to not make a mistake on the ground.


Leonard Hall

unread,
Mar 18, 2015, 3:57:29 PM3/18/15
to drones-...@googlegroups.com
This feature already requires the user to hold the yaw stick over for 15 seconds. Just make sure it really is 15 seconds, add a reversing beep sound to it, and call it done.

The user already has to hold the yaw stick over for 15 seconds with the throttle down, I don't have any idea why someone would do this.

To be honest I think this so rare it isn't a problem.

Leonard

Robert Lefebvre

unread,
Mar 18, 2015, 4:07:44 PM3/18/15
to drones-discuss
Ok, sound would be another layer of protection.  Should we be stopping integration of the correction unless !ap.land_complete ?  There's no reason to accept correction inputs while on the ground?

Leonard Hall

unread,
Mar 18, 2015, 4:10:55 PM3/18/15
to drones-...@googlegroups.com
Yeh, that sounds reasonable.

Josh Welsh

unread,
Mar 18, 2015, 4:14:00 PM3/18/15
to <drones-discuss@googlegroups.com>
If people are doing it on the ground, add the is_flying check and then call that done. Weird case but I've seen weirder.


Robert Lefebvre

unread,
Mar 18, 2015, 4:22:35 PM3/18/15
to drones-discuss
I don't know that anybody is doing it on the ground, but you just have to *touch* the pitch or roll stick to accumulate correction which is a bit sub-optimal.  I didn't write the issue, I'm just trying to solve it.

Leonard Hall

unread,
Mar 18, 2015, 4:49:37 PM3/18/15
to drones-...@googlegroups.com
NOOOOOOO :)

The fact you only touch the sticks to make the adjustment is what makes it so accurate and nice to use. So don't change that mate.

Thanks for all your work mate!!!!

Leonard

Robert Lefebvre

unread,
Mar 18, 2015, 4:53:28 PM3/18/15
to drones-discuss
You think it should continue to accumulate correction on the ground?  How would one assess the effectiveness of the correction on the ground?

Randy Mackay

unread,
Mar 18, 2015, 8:51:54 PM3/18/15
to drones-...@googlegroups.com

Rob,

 

     Yes, I think that would be good.  We should also perhaps not start the timer until that flag clears (I think the user gets about 20sec of flight to set the trims).

 

-Randy

Marco Robustini

unread,
Mar 19, 2015, 3:59:34 AM3/19/15
to drones-...@googlegroups.com
After reading all your comments i've changed my opinion, i agree with Rob, SaveTrim is necessary but AutoTrim might cause problems to inexperienced user.
Moreover many features can be made only from the GUI, as the compass calibration, that instead as DJI would require being able to do with the tx, would be more important, but they want these features combined with audible and visual indications that Pixhawk can give, to minimize possible errors.
Yaw left for 15 seconds is a command really hard to do unintentionally, but I know who did it and the results were guaranteed crash.
My two cents,


Marco


On Tuesday, March 17, 2015 at 9:21:29 PM UTC+1, robert.lefebvre wrote:
Reply all
Reply to author
Forward
0 new messages