Robot Dog -- Two Core/Photon detect far and near?

I need help. I’m not an engineer. I have two cores.
I want to go out jogging and have robot dog follow me everywhere I go.

How do you make robot radar dog follow offline photon/core near?

Any simple open source for this project?