Precision landing input shaping

I am facing the same issue with 4.4.1 firmware of sluggish behaviour, so there haven’t been any updates on that side.
For me, the major concern is the lag created between the values of commanded position and velocity by the precision landing module and the position and velocity target calculated by the position controller for the drone to achieve. Further, I do believe there is some compensatory behaviour inside position control.


I have modified the 4.4.1 firmware to log values commanded to the drone.
The above picture plots three signals:

  1. the target position commanded to the drone by precision landing(PL.tPx) using AC_PrecLand::get_target_position_cm(Vector2f& ret) method
  2. the PSCN.TPN and PSCN.PN represents the target calculated inside the position controller for the drone pose and the pose achieved, respectively.

Similar is the case for velocity.
I observe this laggy behaviour with both the raw sensor and Kalman filter estimator type with the moving target option enabled.
@Anubis , @rishabsingh3003, if you know about the same, could you please provide me with insights about the laggy behaviour? Do you think this is because of input shaping in some way?

Finally,
@Anubis , I was able to catch the aggressive acceleration behaviour that you mentioned earlier, which occurs as soon as the drone catches the target. It reacts aggressively to it when WPNAV_ACCEL isn’t small. I do think that it might be the initial jerk, and after the jerk, the pos control input shaping takes care of generating kinematically feasible jerk-limited inputs for the drone, due to which the drone doesn’t react aggressively afterwards.

above is the target position, target velocity and target acceleration logs for the same flight.
Please let me know what you think of the same.