I previously posted about some problems with optical flow in loiter mode here, and was able to get them resolved thanks to the community. Thank you everyone!
For reference, we’re using the 3DR Solo which has a pixhawk 2 onboard, and we’re using ArduCopter 3.4 on board. We’ve attached and calibrated the PX4Flow and the LIDER Lite rangefinder and confirmed that they are reading values and oriented properly.
Now that we’ve verified loiter works without GPS, we are trying to move into guided mode without GPS. Currently, something seems to be wrong with the altitude. We set up our guided mode script and are actually able to takeoff to about 3 meters if we tell it to takeoff to 13 meters(similar to this issue?). Additionally, as we send various
set_position_target_local_ned messages, the solo seems to navigate to the x,y position while the z position oscillates up and down. The z position seems to hop back and forth between 0.5m and 5m (sorry I don’t have logs on me but will link when I get a chance).
The issue that we are running into is that it seems that the EK2 altitude reading is just completely wrong and/or not adopting the altitude from our rangefinder. We have verified that our rangefinder is outputting correct readings through mission planner and mavproxy. When typing the command
alt in mavproxy, we get a value of zero even when the rangefinder is outputting the correct value. Looking at other readings such as
status AHRS3) prints out a value that is also wrong–it was a few meters too high. We also saw that
status did not show messages shown in SITL such as the solo’s local estimate of position.
For more information, we do see the quadcopter holds its altitude correctly after holding down the FLY button on the solo controller which seems to execute this command. So to be clear, altitude seems to be working in loiter/althold but not in guided mode (which i think includes
takeoff via mavproxy).
We have gone through the forums and guides to do this and have configured our parameters like so:
EK2_ALT_SOURCE = 1 EK2_ALT_NOISE = 10 AHRS_EKF_TYPE = 2
We are wondering if anyone has experienced this problem and has any insight on what we could do to override the EK2 altitude reading with the altitude from the rangefinder.
Thanks for reading,