I am currently working on a project that is helpful to society. However, I have encountered one difficulty. I would like to get help with the following: When the Battery Failsafe condition is triggered, I want to execute my newly configured logic instead of the RTL. I have a good understanding of PX4, but I am curious about which parts I need to modify and whether I only need to modify the files in the Commander folder. If possible, I would like to know exactly what files need to be modified and what advice I can give. I will wait for an accurate and definite answer. Thank you. As a best example, I am also considering entering offboard mode when the Battery Failsafe is triggered.
Thank you for your answer. We will try to approach it in a simpler way. When entering the rtl condition of GPS latitude and longitude through Jetson Orin Nano, we are aiming to move to a random coordinate and land instead of returning to the takeoff point. Could you please share the contents related to the files or logic that need to be modified for this method?
Thank you for your responce.
“Once you have the event, you can send the drone anywhere” what is mean? I don’t understand.
And if I disable the failsafe condition as you said, Joe will assign an RTL switch to the RC controller, or trigger the RTL in QGC. When the rtl mode is triggered, I want to detect this mode change via mavros on Jetson Orin Nano and send arbitrary GPS data to the code in rtl via mavlink communication, and configure the logic to go to an arbitrary other point other than the takeoff location.
Currently I have modified land.cpp, land.h, mission_block.cpp, mission_block.h, navigator_main.cpp, navigator_mode.cpp, navigator_mode.h, navigator_params.c, rtl.h, rtl.cpp in PX4-Autopilot/src/modules/navigator.