Calculation of robot position.