Offboard mode does not start due to failsafe mode activation

I 've trying for a few days to generate an file which makes the Iris model to fly in offboard mode. However, once the code starts and the next setpoint is established the Iris does not move because the failsafe mode is triggered. I have done some research about similar codes and they work properly : Writing MAVSDK/PX4 Drone Applications - Circuit Cellar
Any help about this topic? @Jaeyoung-Lim @LorenzMeier

Hi mate, I met the same problem with you.
I’m using code on PX4 website, mavros_offboard
The programme sink in the loop of

ROS_INFO("Offboard enabled")

and never get out of it.
Meanwhile, PX4 keeps telling me that failsafe mode was activated. after a while, failsafe mode was deactivated, then being activated again. It just keep going, sinking in a endless loop like the programme.
and the plane cannot be armed, never taking off.
All right, here is a solution, I changed PX4 version, reference here link.
If you already had other solutions, please tell me, would be very thankful

Hello @JaimeParker and thanks for your answer!
Firstly i was trying the offboard mode via MAVSDK, but seing that anything worked I tried to install ROS2 to test the example ROS 2 Offboard Control Example | PX4 User Guide.
Do you have any experience with ROS2?
Thank you!

Hello @JuSevRo and thanks for yours too;
I’m sorry I got unfamiliar with ROS2;
However, I fixed my bug of enabling to enter offboard mode due to activating failsafe mode;
the reason is I did not set Virtual JoyStick in QGroundControl, that caused failsafe mode;
After opening joystick, I can run that program;
Would this be useful to you? and my discuss link here Failsafe mode keeps activating and deactivating
Maybe you got other reason that activated failsafe mode…