Hi, I’m using a motion capture system and mavros to send position to arducopter as discussed here Indoor flight with external navigation data.
I’m trying to have copter motion as smooth as possible, like @chobitsfan in his cool video.
I have already tried to tune EKF2 and PSC parameters and surely I’ll continue to, but I wanted to share my results, maybe someone has the same problems or knows how to deal with them…
Here’s a simple graph of a loiter with position and target position on x axis (NKF1.PN and PSC.TPX) and yaw (NKF1.Yaw)
I can see two problems:
- in the first half there are oscillations due to overshoot, is it related to the PID I term?
- in the second half I see a strange behaviour, when the copter is turned on the yaw axis it flies in the opposite direction and then comes back in position, can this be related to some kind of sensor offset?
Here’s my PSC params:
PSC_ACC_XY_FILT,2
PSC_POSZ_P,1
PSC_VELZ_P,5
PSC_ACCZ_P,0.5
PSC_ACCZ_I,1
PSC_ACCZ_D,0
PSC_ACCZ_IMAX,800
PSC_ACCZ_FILT,20
PSC_ACCZ_FF,0
PSC_POSXY_P,1
PSC_VELXY_P,2
PSC_VELXY_I,0.1
PSC_VELXY_IMAX,1000
PSC_VELXY_FILT,5
PSC_VELXY_D,0.01
PSC_VELXY_D_FILT,5
PSC_ANGLE_MAX,0
Here’s the log file.
Here’s a video of another flight showing the yaw causing oscillation, also you can see that when it comes back in position it is not very steady.
The firmware is the ardupilot master of a couple months ago, I’ll update that for next test.