Yaw Rotate when Landing

I am using a Pixhawk 4 FMUv5, and I am flying a Multi-Copter under Offboard flight mode with geometric controller. The firmware version is 1.11.1.

During Offboard mode, the Multi-Copter works fine. But when the Multi-Copter switch from Offboard mode to Land Mode, the Multi-Copter rotates around the z axis unexpectedly (for about 90 degrees), and then quickly rotate back to yaw = 0.

Here I attached my flight log. The multi-copter switches to the Land mode with the mavros_msgs::SetMode service. Here I set the mode keyword in SetMode variable to “AUTO.LAND”.

By the way, I used the /mavros/setpoint_raw/attitude as command input during the Offboard, and didn’t turn it of when switching to Land Mode.

Any ideas how I can fix this yaw rotation issue?

Here are my Flight logs. (Just the Yaw and Yaw Rate Records)


I meet this problem too, did you find some way to slove it?

May I watch your code?

Hello, similar problem here. Were you able to fix the issue?

Hi, would you be able to post a link to the whole flight log itself?
Thanks

I saw similar issue. The drone tried to land facing to the east. Don’t know why compass is used to tell the drone which direction is the east even when flying indoor. Have you got the problem resolved?

Here is a flight log
https://review.px4.io/plot_app?log=8a3cda5b-edba-4367-ab5e-25301678ae36

Really appreciate any help :raised_hands: