A procedure for determining the position of a mobile robot in a 3-D space is presented. A single 2-D image of a cubic object is used to derive the position of the robot relative to this cube. The derivation is based on the information of vanishing points of the 2-D perspective projection of the cube. The coordinates of vanishing points are iteratively modified to satisfy the imposed constraints: (1) the edge length of the cube is known; (2) the adjacent edges of the cube are mutually perpendicular, and (3) the projected lines of all parallel edges of the cube converge to a vanishing point. In the experiments, a robot arm is automatically guided using the proposed method to grasp a cube. The error analysis of the experimental results is also reported.