Twitchy/Unstable flight in position control mode (External Vision Estimator + PX4Flow)

Hello everyone,

Problem: Twitchy and unstable flight in position control mode. For local position on the drone I am feeding Marvelmind(Pose data published to /vision_pose/pose in MAVROS) and PX4Flow.

Previously, I had Toilet bowl effect when I used just external vision estimator without PX4Flow. I am still stuck with this problem. Copter moving in circle in POSCTL mode (external position estimate). To move forward I tried using combination of PX4Flow and Marvelmind, which seems to solve the TBE issue.

Logs
https://review.px4.io/plot_app?log=c3c2bde6-5c40-4861-af5b-37374b01c307
In the log even though I am not touching the remote control, the x and y setpoints seems to be changing. I don’t understand why.

When I flew the copter just with PX4flow to debug the issue, the setpoint is one straight line. Please see the logs below.
https://review.px4.io/plot_app?log=4004b602-d5d5-468e-bab5-a0b2f9962746

Setup:

  1. IRIS drone with Pixhawk 2.1
  2. Marvelmind position system- publishing data over /vision_pose/pose
  3. PX4Flow
  4. Teraranger for height

Params

  1. EKF_AID_MASK = 26
  2. HGT_MODE = Teraranger

Questions

  1. Can anyone explain reason for twitchy/unstable flight ?
  2. Is there any reason for the XY setpoint to be changing even when I am not touching the RC controller.
  3. Other than using external vision estimator is there any way to integrate marvelmind to pixhawk with a PX4 1.9.2

Any help will be much appreciated.

Ash