Quadrotor not flying in straight line with OFFBOARD mode via SET_POSITION_TARGET_LOCAL_NED

I am guiding a quad through 5 waypoints to form a straight line sending SET_POSITION_TARGET_LOCAL_NED MAVLink messages however the path is not straight (see attached image).

Flight is done with SITL in Gazebo. I am using DroneKit which sets mode to OFFBOARD. The quad obtains its position through Gazebo via ATT_POS_MOCAP MAVLink messages.

I tried setting the NAV_ACC_RAD to 0.1 which does not change its behavior. What is causing this behavior?

1 Like