Iāve been working on a custom airframe (singlecopter) with the PX4. Iāve achieved very good flight stability and good altitude hold. Iām using a PixHawk (with px4fmu-v2_lpe). Currently, Iām working on achieving position hold now, with the PX4Flow Optical Flow module. Previously, I had attained very good position hold with the same optical flow module on a quadcopter.
However, since moving to the custom airframe, my LPOS.X and LPOS.Y estimates have been going haywire. Iām running all my tests indoors, as it is the final objective. Iāve tried various flow sensor orientations (with appropriate changes in the parameters), to no avail. Iām using an MB1242 SONAR as my rangefinder, Iāve made changes in the driver file to allow me to use it facing upwards. Can this be a reason for bad LPOS estimation? Iāve also tried various surfaces in a attempt to get better position estimation, with no improvement in the results.
Iām getting very similar results to you, which makes me think itās not a hardware issue.
Iām using a DJI Flamewheel with PX4Flow and LidarLite v3.
I find that even when my drone is at rest (nothing armed, no motors on) with all sensors seeing the ground, I get a constant drift in the LPE.
Iāve started looking at the raw sensor data from each sensor thatās going into the LPE. One thing Iāve found is that even when my vehicle is level, it puts out a constant X acceleration of about 0.05. Itās noisy, as expected, but I would expect the noise to be centered at zero. The offset is high enough that none of the noisy points get below zero. I re-calibrated the IMU and it did not help.
I think the LPE is a pretty new addition to the PX4 family, so maybe thereās a bug that hasnāt been found yet? I havenāt been able to find such a bug, if it exists.
Have you tried running some closed loop tests with your setup (after ARMING in stabilise mode)?
The LPE was working great (GPS denied, with MB1242 SONAR and PX4Flow) on my quadcopter, perhaps thereās an issue with my hardware.
Yeah Iāve done all sorts of unit tests. When I am flying and flip to position control I get a lot of drift and some odd behavior from the vehicle. Thatās how I first discovered that the LPE was drifting. I started debugging the odd behavior.
About a year ago I had an almost identical hardware setup to what I have now, but the LPE didnāt exist yet (at least not in the stable release that I was using at the time). I believe I used the INAV estimator at that time, and everything worked great.
I am having a similar issue and position control is rejected.
This is my flight log: http://logs.px4.io/plot_app?log=3f14be80-3596-4043-8aa6-dacb749d2b08
To help debug this issue, can somebody share a log file of a successful flight where position control was achieved (PX4FLOW + Lidar-Lire, NO GPS). I am looking to compare the parameters and the flight graphs to find out why we are now having issues.
@tomatac , according to your logs, you have a lot of vibration; which it might have caused to reject the Position Control mode. Unfortunately, the the logs donāt show the flow_quality value; which it should be around 250. On the other hand, Iāve not been able to get the optical flow to work properly indoors with the v1.6.0 RC1 and LPE myself either. I suggest you try the v1.4.4 release; which works great for me with the same āDJI Flame Wheel F450, Quadrotor xā configuration that you have.
Upon further testing, Iāve figured it is an hardware issue with my PX4Flow module which was returning erroneous values. Looking forward to implementing other visual methods for odometry.
@Al_B, Thanks! I will try to decrease the vibrations (thicker foam pad and maybe change the props, I am not sure if calibration can be a factor for vibrations). Also, on firmware 1.4.4., did you test with Lidar Lite or the sonar?
@tomatac, the sonar that comes with the PX4Flow doesnāt work well for us in 1.4.4 like it used to do with 1.3.4 so we had to use the Lidar Lite. However, we used the latest version 3.
@Al_B Great! That is what I have. Could you share your parameter file for that configuration? Some of the parameters are different in the latest version and the documentation for the old firmware has been replaced. Do you, by any chance have a flight log to a successful flight? I will post mine. It would be nice to compare. Thanks for your help!