For straightness detection of hydraulic support in unmanned working face of coal mine underground, an attitude and straightness detection model of hydraulic support was proposed. Laser positioning matrix of straightness detection robot for hydraulic support was focused on, and software and hardware design schemes of the laser positioning matrix were expounded. Through analyzing experimental results, following conclusions are gotten:For laser positioning matrix made by photosensitive resistors with a diameter of 12 mm, when light spot diameter is from 9 mm to 30 mm, detection error decreases with the increase of light spot diameter, and the maximum detection error is 7.6 mm. Considering detection precision and effective detection range synthetically, the optimal light spot diameter is selected to be from 12 mm to 18 mm. Factors influencing detection precision of the laser positioning matrix are systematic error and random error mainly. Detection error can decrease by reducing diameter of photosensitive resistor, adding resistor with low resistivity before photosensitive resistor, etc.