Less effective way of checking if the trajectory following process is complete