The drone drifts when flying using position hold mode

All discussions related to the Loco Positioning system
Post Reply
Sun
Beginner
Posts: 2
Joined: Wed Jun 06, 2018 2:50 pm

The drone drifts when flying using position hold mode

Post by Sun » Wed Jun 06, 2018 3:48 pm

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!
Attachments
QQ截图20180606232719.png
QQ截图20180606232653.png

tobias
Bitcraze
Posts: 1687
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: The drone drifts when flying using position hold mode

Post by tobias » Thu Jun 07, 2018 10:02 am

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.

Sun
Beginner
Posts: 2
Joined: Wed Jun 06, 2018 2:50 pm

Re: The drone drifts when flying using position hold mode

Post by Sun » Thu Jun 07, 2018 5:56 pm

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?

arnaud
Bitcraze
Posts: 1650
Joined: Tue Feb 06, 2007 12:36 pm

Re: The drone drifts when flying using position hold mode

Post by arnaud » Mon Jun 11, 2018 10:57 am

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.

Post Reply