Optical Flow PID settings

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?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • 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.

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…