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):
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:
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.
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.
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…