I’ve written some code to fly a drone using the offboard mode. I’ve setup Airsim with UE4 to test the code, however I’m having some issues with controlling the drone’s velocity accurately.
I can get the drone to fly between check points, but I want to limit the accelleration and decceleration of the drone. I’m updating the drones velocity 20 times a second, which matches the update frequency of the underlying mavsdk code. For every velocity update, I’m checking the drones current velocity and increasing the velocity to match the maximum acceleration. However, because I’m updating 20 times a second, the velocity updates are fairly small. When I tell the velocity to update by a small amount, the velocity isn’t changed. For instance, on take off, my current vertical velocity modulates around 0 very closely, and I’m telling the drone to change its velocity to move up at 0.05 m/s. The drone doesn’t even attempt to match this new velocity. It doesn’t start matching the velocity until the new velocity is at least 0.3m/s. Does anyone know why the new velocity setpoint isn’t being matched? I’ve tried adjusting the PID parameters but haven’t seen any changes.