The voltage that the potentiometer will put out is relative to whatever angle it is set at. The way you go about reading the potentiometer's output as an angle is to set it at the desired angle manually, read the potentiometer and save that voltage. To get the robot to set itself to that angle, you just recall the voltage that you measured earlier.
I know that this is super simplified, but its basically what you do, no fancy math involved
