Indoor flight horizontal position shift/drift using only IMU sensors

Hi everyone,

I want to raise this topic considering there are not much information about indoor flight. I believe that your experience will be quite useful for me and others.

I have a DJI F450 frame with CUAV X7+ board, and laser altimeter to hold altitude. I have followed all the points described in First Time Setup and First Flight/Tuning (Calibrations, PID Tunings, Vibration Damping, etc.). The only problem that I couldn’t solve is the position drift in indoor flight. The position drift is random so that trim commands is not the optimum way to resolve the problem.

My question is that is it possible for a drone with good INS system (e.g., CUAV X7) to hold its position using only IMU data in indoor flight. I mean no GPS and Visual Positioning System(VPS).

It will be very helpful if If you can share your indoor flight experiences without VPS in ALTHOLD mode.

P.S: I also have a DJI Mavic 2. It holds its position perfectly in indoor flight when in Position mode (DJI called it OPTI mode). However, I have blocked the visual sensors just to check the performance in Attitude mode. It seems that it has also random position drift problem in indoor flight when VPS are not active.

Hello, that is an interesting question that arise from time to time.
IMU are prone to signal bias and noise that will induce error over time.
Even with commercial grade sensors, there will be alway a source of noise that will make the measurement incorrect.

1 Like

Thanks for the reply ppoirier :grinning: I agree your points, but want to be sure.

Just to let you know that for indoor flight you can get stable loiter with OpticalFlow
This is a velocity estimator and the integration with the EKF is quite good.
https://ardupilot.org/copter/docs/common-optical-flow-sensors-landingpage.html

2 Likes

Thank you ppoirier, I will be looking on that.

To update: I have added HereFlow Optical Flow sensor. Tested indoor flight at 2-3 m. AGL. Performance is good.

1 Like

Hi @emrecan

Are you able to share how much shift/drift you manage to reduce? I am trying to achieve that too using LW20C and Hereflow.

Hi @Jai.GAY

Currently, there is no position drift at PosHold with optical flow sensor enabled. I mean, drone can hold position without any pilot inputs. I have tested only indoor flight with maximum 5 m altitude. I am not sure about the optical flow performance at higher above ground.

I am using the Hex HereFlow Optical Flow Sensor with Benawake TF-02 Pro LIDAR for range estimation. The reference pages for setup and calibration are as follows:
https://ardupilot.org/copter/docs/common-hereflow.html
https://ardupilot.org/copter/docs/common-optical-flow-sensor-setup.html#common-optical-flow-sensor-setup

Also note that, I have set the AHRS_TRIM_X and AHRS_TRIM_Y manually before integrating the optical flow sensor (auto trim is another option : AutoTrim — Copter documentation). Setting these trims will reduce drift. But even with perfect trim a position drift occurs in time for indoor flight (accelerometer error accumulates with time). So need to integrate optical flow or other position/velocity estimators to hold position without pilot inputs.

1 Like

I am using Loiter flight mode.

Any significant obvious difference with PosHold flight mode? Did you try both and concluded PosHold?

Loiter s s Y Holds altitude and position, uses GPS for movements
PosHold s + Y Like loiter, but manual roll and pitch when sticks not centered

I haven’t tried Loiter, you can try it with PosHold but I don’t think it is related to flight modes. Have you updated the EK3 params to disable GPS and enable optical flow?

Today I did, and the test height is 50cm, the drift still exists. My test room high is only about 2.4m. Okay, tomorrow i will try PosHold flight mode.

Did you modify any of the EK3_Flow_xxx parameters?

No I did not. Just compared the the OF.body and IMU.Gyro data. They were mostly matching so did not need any calibration.