AltHold mode leaning forward error

Hi All,

My previous issue has been solved here, so, I post a new one. :slight_smile:

So, my setup is Pixhawk Mini with Copter 3.6.7 v2 on it. Previously I completed the Autotune and the AutoTrim, and it has flown as expected.

Recently I bought a LidarLite V3 which I wanted to use as altimeter to replace the Maxbotix clone sonar. I installed the lidar as mentioned (except the rangefinder type, I set it to 21 instead of 15 because, like others, I also experienced 9.some offset but on 21 setting the lidar is giving nearly cm accurate readings), and it is working as expected. I left the sonar in the craft, turned to 180 deg, for act as backward proximity sensor, with the needed parameter setup. For test purposes I also activated the EK3…

At the test flight I experienced strange behavior… In Stabilized mode everything was fine. In any assisted flight mode the craft leaned forward to ~5-10 degrees and started to move away. I needed to react with pulling the pitch slightly back. Switching back to Stabilized made the craft be leveled.

After this I inactivated the EK3, and today I also made a test flight. Stab is OK, PosHold and Loiter is also OK but in AltHold the forward leaning is still present… I provoked the object avoidance routine, and the craft is stopping when I directed it’s back toward a wall in Loiter and in AltHold as well. But I can not deal with the leaning forward in AltHold… I tried to find the cause in the log, but I was not succesful…

Any help is highly appreciated!

Just an update for the issue.

Today I upgraded the firmware to the latest stable PX4 v3 version, which is running perfectly. I have tested the stability of the craft in the different flight modes, and the forward banking is still present! Only in AltHold mode, in any other mode (including the Sport mode!!) the craft flies leveled. I erased the parameter list where I messed with EK3, I have uploaded a previous, working one, and did the changes required for the lidar and for the object avoidance.

One thing I should mention: the Lidar is not pointing perpendiculary down from the craft, it is pointing a little (some degrees) forward.

Any idea, how to solve the issue, please?