Good morning kinder !
Initially, it is not possible to switch to offboard mode after taking off because it requires receiving an offboard signal. The vast majority of offboard examples (if not all) already have their own arming command in the code. In my experience, an external controller (such as a Raspberry Pi) is needed to send the offboard signal. It is also important that the offboard signal you send must be greater than 2Hz.
I have had a few problems with the offboard mode and have achieved some results although I am still struggling with it .
I’ll leave you my discussions about offboard mode and similar things to see if they help you in any way:
- Critical: Arming denied: Resolve system health failures first
- Problem: Arming denied in Offboard mode. We use Mavros, Mocaps and Ros2
I also leave you some manuals that have helped me to use the offboard mode:
- ROS 2 Offboard Control Example | PX4 Guide (main)
- Offboard Control | PX4 Guide (main)
- https://www.youtube.com/watch?v=8gKIP0OqHdQ
I don’t know if I’ve helped you at all, but I hope I’ve helped you! I hope you have a nice day and if you need anything don’t hesitate to ask in this forum . If I have explained myself wrong (which is possible because I am translating everything
) or I have not solved your question let me know and maybe someone else will be able to help you more than me.
I hope you have a wonderful day !