LPS: inaccurate estimation of yaw-angle/yaw-drift
Posted: Mon Jun 15, 2020 9:39 am
Hey,
I've implemented a position controller (with subordinated velocity, attitude and angular velocity controller) within the App-Layer. Everything is working fine, but I have got problems due to inaccurate yaw-estimation (log: stateEstimate.yaw). I'm using the LPS, and the crazyflie is positioned in x-axis direction when turning on, respectively with yaw angle = 0°. But after just a few seconds of flying, the estimation of yaw-angle becomes very inaccurate. For example, when I'm doing a 90°-rotation to the left (target: yaw = 90°) and after that a 90°-rotation to the right (target: yaw = 0°), the crazyflie's yaw-attitude differs from the initial attitude by approx 20°. How can I fix this? Furthermore, the yaw-angle drifts when the crazyflie is on the ground. Is there a possibility to reduce that drift? Has somebody tried to use the magnetometer instead?
The position controller needs the sine and cosine of yaw-angle in ordner to calculate the pitch- and roll-angle dependent on yaw-angle (similar as it is implemented in position_controller_pid.c https://github.com/bitcraze/crazyflie-f ... pid.c#L173). I'm wondering why the original position controller is working well, because it is using the same yaw-estimation.
I would appreciate any kind of help!
Joyner
I've implemented a position controller (with subordinated velocity, attitude and angular velocity controller) within the App-Layer. Everything is working fine, but I have got problems due to inaccurate yaw-estimation (log: stateEstimate.yaw). I'm using the LPS, and the crazyflie is positioned in x-axis direction when turning on, respectively with yaw angle = 0°. But after just a few seconds of flying, the estimation of yaw-angle becomes very inaccurate. For example, when I'm doing a 90°-rotation to the left (target: yaw = 90°) and after that a 90°-rotation to the right (target: yaw = 0°), the crazyflie's yaw-attitude differs from the initial attitude by approx 20°. How can I fix this? Furthermore, the yaw-angle drifts when the crazyflie is on the ground. Is there a possibility to reduce that drift? Has somebody tried to use the magnetometer instead?
The position controller needs the sine and cosine of yaw-angle in ordner to calculate the pitch- and roll-angle dependent on yaw-angle (similar as it is implemented in position_controller_pid.c https://github.com/bitcraze/crazyflie-f ... pid.c#L173). I'm wondering why the original position controller is working well, because it is using the same yaw-estimation.
I would appreciate any kind of help!
Joyner