ok, moving object detected and is
stationary. What next?

A video camera can be used. An open source program like this can be used : http://dorgem.sourceforge.net/

Focal point of lens can be used for depth perception (perspective)

Then you can code the screen pixels such that the extreme left top is  (x,y) 0'0  and Z being a variable - etc

a) Calculate position X,Y,Z ( grid based )
b) approach target
c) redetect target - or update target
d) approach target (by avoiding obstacles)
e) redetect target
f) approach target (its a loop)
e) identify target
f) determine cause of action


Its a dumb system, because if the target becomes stationary ; then the code will deem it as part of background...

Unless one has a memory bank that 'remembers' bearing  and shape of the scanned object  - even if the pursuing object changes direction to avoid obstacles...