In the environment with limited light, robot��s obstacle avoidance could not be realized if the vision sensor was used only. In order to deal with the problem, an antenna sensor system was designed. Position sensitive detector (PSD) was used as the sensing instrument and a laser pointer was attached to the antenna end, from which the laser was shot out to the other side. Following this approach, a new antenna mechanical structure was proposed to make the installation simple and to reduce the assembly error. Two new methods were proposed to detect the angle between the body and the wall. Advantages and disadvantages of the two methods were discussed. The robot could walk along the wall by the two methods and the effectiveness was experimentally demonstrated. What caused the error was analyzed at last.