How can i use speedj to track a moving object?

how to realize track a moving object like this

I have testing servoj command, but it works not as expect. The list of positions of moving object are got from camera realtime, I used get_inverse_kin command to get joint agree of Cartesian coordinate object position.