My copter is running the 2.6 default PID settings, which seem pretty good for stabilise, but loiter wanders quite a bit. I installed an optical flow sensor, and now when i enable OF_LOITER, the copter overshoot, oscillates around the loiter point, and gradually loses altitude. Are there seperate PID settings for OF_LOITER?
From reading the code, yes there is a separate PID for optical flow loiter:
pid_optflow_roll (OPTFLOW_ROLL_P, OPTFLOW_ROLL_I, OPTFLOW_ROLL_D, OPTFLOW_IMAX * 100),
pid_optflow_pitch (OPTFLOW_PITCH_P, OPTFLOW_PITCH_I, OPTFLOW_PITCH_D, OPTFLOW_IMAX * 100),
I think you should be able to set them from the mission planner parameter screen. They may be named OF_RLL_[PID] and OF_PIT_[PID]? I'm not sure how that works.
My optical flow sensor is in the mail, so I haven't actually played with this, just been looking at the code. I'm hoping to do some work to integrate OF with auto mode, but we'll see how far I get.
Thanks Bob, I will have a look for the setting in planner and see if I can get some more useful functionality out of the flow meter.
Another concern of mine is how well the low resolution sensor will track over grass. I have seen some videos of people using the sensor successfully over grass, but how can the low contrast image give enough data?