Hi all,
I’m a newbie guy who tries to do his initial setup with a custom drone in Gazebo. I want to switch it to AltHold/Loiter to do a QuickTune and Autotune, but it doesn’t hold. Instead, it slowly climbs down, and then crashes as I have problems with manual (mode Guided) ascend and descend too. Otherwise drone is more or less fliable.
Parameters and settings:
- X-frame
- 9-inch props
- 0.15 throttle
- MOT_SPIN_ARM = 0.04
- MOT_SPIN_MIN = 0.07
- MOT_THST_EXPO = 0.58
- ATC_THR_MIX_MAN = 0.100
- ATC_THR_MIX_MAX = 0.500
Baro.Alt, CTun.Alt and DAlt all are very close (except for the crash), so I don’t really know what to do with that.
I followed the documentation on AltHold, but it is not of much help. The closest thing is Common Problem #2, which advices to have a stick in mid position to prevent the descend. I’m not using sticks in simulation, but increasing/decreasing THR_DZ anywhere in [30; 400] didn’t help. Changing PSC_POSZ_P, PSC_VELZ_P to 50% also didn’t help.
Also, this advice says to tune PSC_ACCZ_P and I, as these params affect AltHold the most. I tested a wide variety of values (P = 0.05-0.27, I - accordingly), but it still doesn’t hold.
Automatic takeoff (Guided), and landing in RTL right after the takeoff work perfect (stable, no oscillations, no crashes). Guided, though, both up and down, is unstable and often results in crash.
Thoughts are highly appreciated.
Log 172 - simple vertical ascend (with crash while landing)
Log 174 - zigzag flight on the same altitude
Log 176 - takeoff with switching to AltHold (crash)
Log 177 - takeoff and immediate RTL