Yaw oscillations in auto - spline waypoints

Hello,

now I’ve flown a auto track composed of spline waypoints. I expected a smooth ride and the footage, but during this flight, strong yaw oscillations happened, what is perfectly visible in the video. Not only during the DO_JUMP (is it possible to close the loop using only the spline fragments?). I’ve compared the desired yaw to the actual yaw, and it seems they were commanded (not mistuned yaw PIDs?)

I have not much experience about this, could you explain why this happens? The heading was set to follow the GPS track.

The log

Hi @maciek252,

Txs very much for the report! I agree it does look like the yaw changes are commanded as we can see from the desired vs actual yaw graph below (they’re very much in sync meaning this is not a tuning issue) so I’ve added this to our 4.7.0 issues list.

I suspect we can reproduce this is SITL but I wonder if the same behaviour happens with 4.6.3. No huge pressure to try that of course, it would just immediately tell us if we’ve got a regression on our hands.

Txs again and I’m very envious of your flying location!

Hi @maciek252 ,

This is happening because the yaw is set to:
WP_YAW_BEHAVIOR - 3 - Face along GPS course.

You then have some position control occilations:

The mission path looks like this:

But it should look like this:

I feel like we might be able to tweak the spline weighting a little to get a nicer curve but you can see that your actual path is much less smooth than the target path.

Currently we use the actual direction of travel to define the yaw so when we have wobble like that in our track we see a wobble in the heading too. This is another area where we could do better by using the target velocity instead of the actual velocity.

After talking to Randy about this:

If WP_YAW_BEHAVIOR 1 or 2 you would not have seen the wobble and it would have looked along the target path.

The name is a misleading.

Thank you! I’ll give it a try. But is everything fine here otherwise? Why there are these position/heading oscillations?

Hi, @maciek252
The first thing I would try is reducing ATC_INPUT_TC by 50% to 0.125

This is a known side effect of a change in 4.7.