Offboard while flying - yaw setpoint

Hello all,

we are trying to achieve smooth transition between manual and offboard control (from companion PC) and we have an issue with the first cca 600ms of transition. Roll and pitch are working perfectly, but yaw make very strange twitch.

When I inspected ulog I noticed very strange behavior. After activation of offboard, setpoint for yaw rate is set both mavlink command and px4 controller (I guess):

in dots it looks like this:

And we found out, that it depends on yaw when taking off it the twitch will be more or less signifiant. In some yaw angle the twitch is very small almost unnoticeable, like here:

I’m sharing complete log here: Flight Review - Quadrotor

Does anybody have an idea what to do with it please?

Thanks in advance!

Looks like the two inputs are fighting, that’s not supposed to be that way.

Any hints what offboard messages you’re using, or what API?

We are using mavros:
service to change mode to offboard: here
setpoint attitude rate: here
setpoint attitude: here

50ms before activating offboard we are already sending some dummy setpoint values so the px4 has received some setpoint from mavlink. But from what we see in logs, it looks like clash of some internal px4 setpoints and mavlink setpoint.

We have bags from ROS, if it would be helpful.

Can you reproduce it in SITL? If you could give me a simple example that I could try again PX4 in SITL that would make it easy for me to investigate in PX4. I suspect it’s a PX4 internal issue.

Hello Julian, sorry for late response.

We are unfortunately unable to reproduce in SITL. But it looked that the problem was, that we firstly set setpoint for attitude few times and then attitude rate… We were able to modify it so its not happening…

Anyways thank you very much for your support.