In Loiter mode, after flying for a certain period of time, when the RC joysticks are released to center (neutral position), the drone exhibits aggressive movements and drifts in a random direction instead of holding position. The issue is a regression introduced in 4.8; the same hardware and configuration works correctly on 4.6.
The system includes M8N Gps & IST8310, Sbus RC reciever and no external sensors(optical flow, distance, etc…)
Steps to reproduce:
Arm the vehicle and take off in Loiter mode
Fly for a certain period of time
Release both joysticks to neutral/center
Drone begins aggressive movement and drifts in one direction instead of holding position
Expected behavior:
Drone should hold its position when sticks are centered in Loiter mode.
Actual behavior:
Drone exhibits aggressive uncommanded movement and drifts in a fixed direction.
Regression: Issue is not present on 4.6. Confirmed working correctly on 4.6 with identical hardware and configuration.
Version
ArduCopter 4.8.0dev (master branch)
Platform
All
AntennaTracker
Copter
Plane
Rover
Submarine
Airframe type
Quadcopter
Hardware type
Pixhawk V6X-based custom carrier board
Logs
Two logs are provided from the exact same hardware and configuration — only the firmware version differs:
4.6 this link — Normal Loiter behavior, drone holds position when sticks are centered.
4.8 this log Aggressive uncommanded movement and drift observed when sticks are released to neutral in Loiter mode.
You’re going to need to provide a better log to look at. There is only one point, less that 3 seconds, where either the pitch and roll are neutral. The default loiter breaking delay is 1 second, so in that 3 seconds, the quad did level out and respond as requested.
The tune of this quad is not ideal. Rate outputs and vibrations are good, so you might be able to get away with setting the notch filter and re-tuning.
The PID tune is dedicated by Autotune outcomes. So the values of PID for Roll, Pitch and Yaw not given by randomly.
For v4.6 vs v4.8 flights, When flying at loiter mode, after flying 2-3min and releasing the rc joystick to middle/neutral position it should be stable on the position. While fliying with same hardware same configuration with 4.6, The drone stables itself as soon as we release the jostick. But with 4.8 when we release the joystick it cant stable it self, it drifts hard and agressively. Thats why the log files are short time period.
We’re afraid of the crush thats actually why we keeping flight time short. We can detect the problem directly with our eyes.
Autotune only does a good job if certain preconditions are met.
Using the configuration sequence guided by the AMC software forces you to meet the optimal preconditions required for Autotune to optimally tune your vehicle.
I’ve had a quick look at the logs and a few observations:
ATC_INPUT_TC is the default value of 0.1 which means it’s less likely that this is the cause of the problem.
As @iampete reported the 4.8 log is using a non-standard version although I suspect the only addition is a new board has been added. Still, it would be good to use 4.7.0-beta7 for testing.
Tuning doesn’t look too bad to me with the exception of the PSCE and PSCN desired, target and actual velocities. There’s a graph below which shows the actual velocity significantly underperforming. I must admit though that I have not looked at the velocity tuning very much.
The problem’s source is not PID values, they’re not good we already know it, but the problem is with 4.8 there’re some changes applied on loiter mode or something like that.
How we know that is as we mentioned, we’ve been tried this hardware&configuration on 4.6 and there is no problem at all. The problem only occurs on 4.8 with loiter mode.
But thank for inspecting our problem.
We returned to the master branch with our custom configurations,
Thanks to @Leonardthall , by changing the “LOIT_OPTIONS 1” to “0” the problem has been solved.
This parameters not included at 4.6.3, it seems new parameters added with new versions.
Our lastest test outcomes like this
Thanks for all you guys for inspecting the problem.