added API for getting and initializing the current position of motor