Toilet Bowl motion while using External vision and ROS2

Hi. I am using X650 Holybro kit with Lidar as an external vision system. I have integrated the system with ROS2. Followed the px4 and ROS2 guide. My issue is that the drone depicts toilet bowl motion in position mode. I am unable to understand why is this happening. I am attaching the log as well. Any suggestions would be highly appreciated.

Log file: https://review.px4.io/plot_app?log=9222b710-7779-4aff-92a6-f420f18b78b2

Be aware that you maybe fuse pose estimtates with a non-neglectable time delay to the system. This could lead to the estimation lacking behind, which could cause toilet bowling. Have you tried tuning EKF2_EV_DELAY? I guess you have already tried to tune the P/D gains of the position/velocity controller?

Thanks @haumarco . I have fixed this issue using the EKF2_EV_DELAY and the UXRCE parameters. It is working fine now. Now I have run into another issue. Whenever I take-off, my drone sometimes take yaw without no specific reason. Is there any way I could know what is causing this behaviour? I am unable to understand this.

Do you use the mag for the heading estimate? In the log you’ve sent you have only horizontal-position enabled for EV. Maybe this is the issue while flying indoors, if you do so.