Hallo,
I’m currently working on a fully actuated hexarotor that’s aimed to fly in indoor environments. It’s only using optical flow (Ark Flow module) to enable position mode for the fully actuated (3d thrust) position controller. I observed that its x and y positions oscillate slowly around the setpoint while hovering. The amplitude increases with height. While at roughly 1m the drone only moves ~20cm, at a height of 3m this movement already increases to about a meter. Due to the phase offset of x and y movements the drone basically orbits around the setpoint. Because of the rather narrow indoor environments, one meter of deviation from the position is already quite a lot.
Analysing the plots, like suggested in this post, showed that the optical flow velocity tends to be higher than the fused velocity, especially when hovering at higher altitudes. These are the plots for x and y velocities for this flight log where I took off to a height of about 2,5m and hovered there for some time.
While the high optical flow velocity explains the oscillating position, I’m still struggling to find a reason for the high optical flow velocities. So far I tried to add some structure to the ground, but it didn’t help much. The EKF2_OF_POS parameters are all set, as well as the offset parameters for the LiDAR.
My system:
Fully Actauted Hexarotor, custom frame, 4’’ props
Custom firmware based on a recent release/v1.14 branch
Ark Flow optical flow module
Pixhawk 6X Flightcontroller
@bresch@AlexKlimaj Thanks a lot for the help. This morning I made a fresh build for ark flow and px4 from the most recent main, with only the necessary changes for 3d thrust. The flight as well as the corresponding logs looked a lot better now. The drone is able to hold a very stable position, even at higher altitudes, with maximum position deviations of around 10-20cm in each direction.
I also had a look at the plot from the initial post again. The optical flow velocity still has spikes with higher amplitude, but amplitude and quantity decreased significantly. Could this be related to something like the quality of the ground or vibrations?
I will give it a try once it’s merged (seems to be still open). Nevertheless, even since the previous fixes the drone holds its position very stable, especially at altitudes above 2m. So once it’s merged I will do some test flights and see if it improves even more.
Today I managed to do some flight tests again, using a more recent main including the new fix. The position during hovering is very stable. Sometimes when stopping from a horizontal movement the drone moves a bit back towards its starting position. However I think this is primarily caused by the repetitive pattern of the floor that’s underneath the drone (I try to add a picture of it later).
@dirksavage88 Unfortunately I’m not doing any freelancing work but I could help you if you open a new issue on the forum with a log file and some description of the setup.