Loiter handling not like alt hold mode Help

Hi All.
I need to use loiter mode as the speed can be regulated via the wp_nav parameters.

However I find the stick feel and overall flight very sluggish.

The craft overshoots self levelling in a slow rock/roll fashion fashion.

I I fly in alt hold. The craft is locked in and responsive. It levels crisp and feels in control.

How can I tune loiter mode to feel more crisp and responsive, and in control.

Any help on which parameters to adjust will be helpful.
Thx
Gary

https://ardupilot.org/copter/docs/loiter-mode.html#tuning

probably need to turn down you PSC_ gains

Thanks. I’ll try that.

Hi Gary,
Posting a log file would really help in trouble shooting the issue. Right now we can only guess from your description of the issue.
Regards,
Bill

1 Like

Hi Bill

I’m not familiar yet with the logs.
After doing an auto tune, the craft flies excellent in alt hold and pos hold.
Switching to loiter, quite frankly it is shit.
I was hoping I could get loiter to be similar to GPS MODE like on a Dji Phantom.

With loiter, the craft is unresponsive, has delayed reaction, over shoots leveling and rocks like the gains are too low.
Switch back to alt hold and it is brilliant.

Gary,
The way to download logs is described here. If you can post a log, that would be most helpful but posting your param file is also helpful (but the log is better). you can save your parameters in the config tab of mission planner. Click on the Full parameter list on the left and then you will see a button to Save Params on the right. You’ll need to be connected to the vehicle to do this.

after a flight there should be a log file in the APM/LOGS directory on the microSD card. Anything we tell you without having a log to work from is guesswork.

These Loiter values give a sporty sort of performance and might be what you’re after.
There could be other tuning issues affecting this though, as others said a .bin log is preferred.

LOIT_ACC_MAX 600
LOIT_BRK_ACCEL 300
LOIT_BRK_DELAY 0.3
LOIT_BRK_JERK 300
LOIT_SPEED 1250

LOIT_ANG_MAX 0

  • set to something like 30 for a camera craft (for example) or leave 0 to use 2/3 of PSC_ANGLE_MAX or ANGLE_MAX

Hi All

After fiddling with the WP_NaV settings and some other POS X and Velocity XY settings, I feel that I have improved the handling in LOITER mode substantially.

There is still a small wobble after stick centering, it does not stop in an exact fashion in the middle. However it is more acceptable.

The log detail is attached. If there is any advice on how to improve the wobble, maybe via PID or Stabilisation then that will be appreciated.

Thanks again your all the help so far.

Gary.

Log File C:\Users\Garry McDonogh\AppData\Local\Temp\tmp20B9.tmp.log

Size (kb) 3793.8134765625

No of lines 46685

Duration 0:02:50

Vehicletype ArduCopter

Firmware Version V3.5.8

Firmware Hash 24b68451

Hardware Type

Free Mem 0

Skipped Lines 0

Test: Autotune = UNKNOWN - No ATUN log data
Test: Brownout = GOOD -
Test: Compass = GOOD - mag_field interference within limits (20.23%)

Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = GOOD -
Test: GPS = GOOD -
Test: IMU Mismatch = NA -
Test: Motor Balance = WARN - Motor channel averages = [1633, 1617, 1554, 1542]
Average motor output = 1586
Difference between min and max motor averages = 91
Test: NaNs = GOOD -
Test: OpticalFlow = FAIL - FAIL: no optical flow data

Test: Parameters = FAIL - ‘THR_MIN’ not found
Test: PM = GOOD -
Test: Pitch/Roll = UNKNOWN - Unknown mode in TestPitchRollCoupling: LOITER(??)
Test: Thrust = GOOD -
Test: VCC = GOOD -

4S SETTINGS BEST AT OFFICE BEFORE PARTK AFTER SETTING LOITER WP NAV.param (13.3 KB)

2020-02-14 11-52-17.bin (1.69 MB)

After another session this afternoon. Things are going really well.
In high speed forward flight in pos hold and alt hold there is a small tendency to reduce height.

I think that increasing the Alt P gain I can improve this.

Ah Ha, you’re on Ac 3.5 nuttx, didnt realize before. Loiter is much improved in AC 3.6, I’d suggest update to 3.6.12 chibios - you’ll have to check that all your parameters convert over as expected, and some of them change names. Use the LOIT values I suggested above.
LOIT_ACC_MAX 600
LOIT_BRK_ACCEL 300
LOIT_BRK_DELAY 0.3
LOIT_BRK_JERK 300
LOIT_SPEED 125
I think you’ll find it to your liking.

Also please tell us more about the aircraft, frame size, props, motors, and so on.
Pitch is departing from Desired Pitch a bit, but Roll looks OK, maybe run Autotune on pitch and roll axis.
Baro might be affected by wind in forward flight, or prop wash - what flight controller is this? and is the baro protected?

You might want to set MOT_BAT_VOLT_MIN to 13.2 instead of 14, but I see you’ve got a very conservative battery failsafe value set.

Way back in time when I used AC 3.5.7, we had:
WPNAV_ACCEL,100
WPNAV_ACCEL_Z,100
WPNAV_LOIT_JERK,3000
WPNAV_LOIT_MAXA,500
WPNAV_LOIT_MINA,100
WPNAV_LOIT_SPEED,1100
WPNAV_SPEED,800
WPNAV_SPEED_DN,150
WPNAV_SPEED_UP,250

One odd thing I noticed, you had:
ANGLE_MAX 3200
but
PHLD_BRAKE_ANGLE 4000
Probably not a big issue, but didnt make much sense to me.
And:
MOT_SPOOL_TIME 2 where I’d normally see 0.5, but if it works…
Also try this for a smoother feel:
RC_FEEL_RP 25

2 Likes