Obstacle detection and location are the key points of path planning and autonomous walking of indoor robot. Laser radar is one of the best sensors for robot to perceive the external environment. In this paper, we studies single-line laser radar to acquire point cloud data, establishes a 2D indoor environment map and achieves the location of indoor robot. And we establish a new point cloud data clustering model which is based on adaptive threshold to detect obstacle on the path. The experiment is based on single-line laser radar, and we have established an experimental system for laser detection of obstacles in indoor robots. The experimental results of scanning and imaging typical indoor scenes show that obstacles can be correctly identified by the above algorithms. Therefore, an effective method has been explored for the obstacle detection and location of indoor robots based on radar.