Problem during take off (switch mode)


Hi everyone !

I have a problem with my drone. I use a script in OFFBOARD mode.
I use a function takeoff in cpp. After that, i have a another function to go to GPS position (position_set_global)
When my drone takes off and reaches its altitude, it switch flight mode to HOLD mode. However, when it switch,the engines shut down for a short time (or the engine speed drops very quickly) and therefore loses altitude.
With this sudden change in speed, one of the propellers stalled and the drone crashed.
Is this change of mode (with sudden drop in rotation speeds) normal?




Please share the flytos runlogs.



Runlogs is here :

Thanks for your help,