The relay node placement in wireless sensor networks is usually constrained by physical factors, while most of present relay node placement approaches are unconstrained. To solve the problem, the paper presents a constrained relay node placement algorithm. Based on grid routing mechanism, the algorithm determines the grid intersections as candidates for the relay node locations, and places as fewer relay nodes as possible to assure the network connectivity. Consideration must be given to both the number of relay nodes and energy efficient, the paper uses the greedy norm and constrains to place relay nodes. By the analysis and study of the experiments, the performance of the proposed algorithm is more superior to the algorithm without constrains.