Drone does not fly to assigned setpoint

I am trying to command my drone to fly to a setpoint. It gets its local position from an OptiTrack motion capture system. However, it keeps stabilizing at an altitude of about 0.25 m instead of the commanded 1.5 m. It has more than enough thrust to climb further.

Has anyone seen this before or have any ideas on what could cause this?

Here is my log file

Can you share another log with additonal logged topics? Enable vision/avoidance and estimator replay in SDLOG_PROFILE.

Thank you for taking the time!! Here is my new log file.

You need to fill out the message it it’s entirety, you’re missing linear/angular velocities and variances

See this as an example

Hi,

I did try it with 3D velocity enabled using EKF2_EV_CTRL, and the noise parameters are user-defined with EKF2_EV_NOISE_MD = 1 since my mocap system does not provide a measurement noise covariance.

What ended up being the issue was actually MPC_THR_HOVER. I initially thought it would not matter because the description said it is only used for stabilized mode, but it turns out it also affects offboard mode. Setting it to the correct value fixed the problem.

Thank you so much for all your help and time!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.