Hi all,
I didn’t see a recent thread on this topic. I am running a non standard optical flow sensor and downward facing rangefinder setup on a f405 flight controller, no GPS in the system and it is only used indoors. I am looking for the best approach to improving my x/y position accuracy from using just the optical flow, Z is rangefinder and is constant, so its not an issue as altitude performance is great.
When using INAV my performance was MUCH much better with the exact same hardware. When compared to an off the shelf sensor such as a MATEK 3901-L0X, the same performance difference is noted. The x/y accuracy is much better on INAV than on Arducopter, I am using LOITER mode for all of this.
I am sure I am missing something in the tuning process. Something INAV did more ‘on its own’ or was able to account for given the betaflight/inav forks all do well with default tunes and filters for performance in various areas. I do not know how to find what that difference is. Is there a good tuning guide that exists beyond the basic setup steps for optical flow/direction/sensor location/scaling in the arducopter documentation? I have looked through multiple tuning documents and threads based specifically on loiter mode and parameters, as well as the optical flow setup page, and I am so far unable to see much of a positive reaction when attempting to ‘tighten up’ the x/y position variance.
I am currently looking through ‘indoor loiter’ tagged posts as well - maybe I’ll find some answers there.
The ArduPilot methodic configurator provides 4 steps exclusively to do what you want:47, 50, 51 and 52
As a bonus the configurator makes sure you do not miss any steps.
Alternatively you can read the wiki on tuning the loiter controllers.
I installed the configurator and took a look at the .param sets for each of the numbers you listed. Those are for the most part all of the tuning parameters I have been using already. Am I missing a functionality aspect of the configurator that would aid in this tuning process? Optical flow is tuned well according to the wiki for log based tuning, performance in stab, and althold are also great. Performance in loiter is lacking - Specifically in holding a constant position regarding x/y. It will move .5-1m left/right/front/back at times, it will then hold a position for a few seconds, and then shift again. This is the specific behavior I am trying to correct for and going through the posxy and velxy parameters and the LOT tuning parameters (its seems one has P only, the other allowes changes to P, I, and D) I am unable to get a behavior that is on par with other firmware. Given the same hardware - I would think I could get a similar result with proper tuning? I am just unsure of exactly what to look for.
What should I be reviewing in a log to determine what information is causing the switching from one position to another, rather than holding on one constant position? I am unsure of exactly which data set I should be looking at to correct the problem.
Noise. All boils down to noise: vibration noise, sensor noise, …
If your noise levels are high, no amount of PID tuning is going to get you hovering in a stable position.
How good did you tune the notch filter? How high are your vibe levels? How are your gyro and accel filters set? Is the baro protected by foam?
All of these are addressed in the correct sequence when using the software I recommended. And if you want, you can use the wiki instead of the software.
Understood. I will try a full config using the tool you provided. I see how having a structured approach to all of theses things in order could help with these types of issues. I was planning on revisiting my notch filters before you said it as well, so, we’ll see how it goes doing a ‘ground up’ setup, tuning, and so on, using the configurator.