how PX4 enables autonomous tracking of moving targets

How to use PX4 firmware to autonomously track moving targets with code?

Should PX4 enter off board mode or other modes?

At present, my idea is to enter the off board mode for control, write my own code in PX4 Autopilot/src/module, and then send instructions to execute the code I wrote through the ground station to track and land the target.

I hope the leaders can provide some ideas, or let me know if my method is feasible and what points to pay attention to (such as whether the off board mode must be connected to an external controller, and whether conducting experiments indoors must require optical flow or other connections. PX4 provides position information, and if it is not connected, it cannot take off)

The newcomer knelt down and begged for help from the boss!

Thank you very much!

You probably want to start by reading this:

I will carefully read it and thank you for your suggestion. Thank you very much.