Page 1 of 1

The drone drifts when flying using position hold mode

Posted: Wed Jun 06, 2018 3:48 pm
by Sun
Hello,
We are trying to fly the drone using UWB loco positioning system, but the effect is far from expectation.

We use a joystick to control the drone by cfclient. The firmware downloaded to the drone is in VM2018.01 with forced DWM1000deck support and TWR ranging support. The location of the drone can be shown in the client correctly as the picture shows though the response is a bit delayed. We tested in anchor identification mode and every anchor can be detected when the drone is nearby. However, when choosing position hold mode in flight control tab and flying the drone with a joystick, the drone drifts.

During the flight, we just give control over z axis. The plane is expected to only change its height under position hold mode but it drifts in random direction. The drift differs for each flight and the drift direction also changes during the flight. After ten to twenty seconds, the location of the drone can be several meters away from its initial location even though there is no command to change x and y coordinates. The location of the drone can be shown correctly in the client during the flight. Does it means the control of the position barely works? Why does that happen?

Another strange thing is that the LEDs blink normally during the start of the flight while after some time, the red light may stop blinking and stay on. We noticed that after we've done lots of tests.

The ranging mode is TWR and the 6 anchors are placed as the picture shown in lps wiki. The distance between each two anchors is larger than two meters. Before the flight, the target and actual pitch and roll trim are perfectly calibrated.

We are confused about the problem and hope you can give some help.
Thanks!

Re: The drone drifts when flying using position hold mode

Posted: Thu Jun 07, 2018 10:02 am
by tobias
Hi Sun and welcome!

I'm not the expert but I think I know what the problem is. When using a joystick to control in position hold the Crazyflie 2.0 is actually controlled in velocity mode and if the input from the joystick is not exactly 0 it drifts away. You could try to control it from one of the example scripts instead. Then it should stay steady.

As for the red led that is when the battery is getting low, it is described in the getting started guide.

Re: The drone drifts when flying using position hold mode

Posted: Thu Jun 07, 2018 5:56 pm
by Sun
Thanks for your reply, tobias. We will try to use python script or ROS to control the position of the plane later. However the screenshot of the client above shows the target pitch and roll are exactly zero. Doesn't that mean the inputs are zero?

Re: The drone drifts when flying using position hold mode

Posted: Mon Jun 11, 2018 10:57 am
by arnaud
Hi,

Actually in position hold mode, the Crazyflie drifts a bit because the velocity estimate from the kalman filter is drifting a bit. I am not sure where that come from but if you start controlling the Crazyflie with a position instead of a velocity setpoint, the drift should disappear.