Here is my setup :
- Simulation with gazebo (9.0.0) and PX4 on SITL with QGC (v4.0.6)
- “make px4_sitl gazebo_plane” to start gazebo simulation with time factor 10
I’ve tuned the roll, pitch and yaw regulator and made a mission plan.
The first simulation is made without a range finder (no sensor include in the “plane.sdf”)
Here is the log file :
As I can see, the output of the EKF is following the setpoint and the regulation of the altitude is perfect. (but setpoint is 1.1m and the mission plan 1m)
The second simulation is made including a range finder in “plane.sdf” like this :
here is the “model.sdf” for the sensor :
I think the parameters is correctly configure :
- EKF2_HGT_MODE : Range sensor
- The gate, delay and noise are as default
Here is the logfile:
I don’t understand why the plane crash if the EKF output is following the setpoint. When I compare the sensor output and the EKF Output, it’s like the EKF is not using the sensor.
My objectif is to have an altitude regulation with 10 cm accuracy above a flat surface. I want use the sensor as primary source for altitude measurement.(maybe the only one).
Please someone can give me advices or tell me some error I’ve made ?
Thank you very much !