UAVs don't go straight to reference point #163
Unanswered
MartinSegaert
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hey, this totally looks like a magnetometer-induced whirlpooling, which is typically solved by aligning the magnetometer properly and/or calibration it. Is this related to your other internal mag issue? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
My external compass which measures the heading has an offset of around -30° with the x-axis. I disabled the internal compass of the pixhawk because that one had issues with interferences (reference issue). Because of this offset in the measurement. The UAV is not aligned in the direction of the x-axis during trajectories. When doing step references the UAV does not go straight to the reference point but first goes in what seems to be the direction of the 0 measured heading (which is off by 30°). Here are the results for a trajectory (x-step, y-step, z-step and then back to initial point) with your controller and tracker (Se3Controller and MpcTracker)
We can clearly see in the XY plot that the UAV goes in the wrong direction in all steps (it is not aligned with the axes) and then it swirls around the set point. The UAV deviates by around 20 cm in each step.
With our controller and tracker (Which are inspired by yours and thus similar) the effect is the same but it is more pronounced (probably because the gains are more aggressive). Results for only a x-step:
The UAV deviates by 50 cm here, for only a 3m step !
I don't know the reason, and I tried several things but none solved the issue.:
I tried both with your controller & tracker and ours. As shown in the Figures, both have the problem.
I canceled out the offset of the heading by setting SENS_BOARD_Z_OFF to -30° (Which adds an offset in yaw). This solved the alignment of the UAV with the x-axis in flight. I thought that would also solve the issue of not going straight to the setpoint. However, The UAV movement during the trajectory is the same as in the previous figures. When printing the heading from the “uav_state.Pose.Orientation” in the controller, it is indeed 0° both when; SENS_BOARD_Z_OFF is set to 0° and the UAV is aligned -30° off the x-axis, and when SENS_BOARD_Z_OFF is set to -30° and the UAV is aligned with the x-axis. (So canceling the offset with SENS_BOARD_Z_OFF is visible in the uav_state and the controller)
I tried to tune integral gains (I tested several combination of kib, kiw, km (0.1, 1.0 and disabled by putting kib_lim, kiw_lim, km_lim to zero). It did not improve or worsen the problem.
I have a second UAV which also has an offset of heading in the same direction (the offset is slightly smaller). Its behaviour is the same. It deviates from the direction of the reference step on the same side as the first UAV.
Do you know why the UAVs don’t go straight to the set-points, but deviate so much and always in the same direction ? Is this Because of the offset in heading measurement and is there another way to solve it than with SENS_BOARD_Z_OFF ? Could it be that SENS_BOARD_X_OFF and SENS_BOARD_Y_OFF also need to be adapted ?
Here is a wetransfer link to the results of the trajectory with the Se3Controller and MpcTracker: https://we.tl/t-tFCyctvakT
Thanks a lot for your response,
Martin
Beta Was this translation helpful? Give feedback.
All reactions