This paper deals with the old and classical problem of determining necessary conditions for the overconstrained mobility of some mechanical device. In particular, we show that the mobility of pentapods/hexapods implies either a collinearity condition on the anchor points, or a geometric condition on the normal projections of base and platform points. The method is based on a specific compactification of the group of direct isometries of $\mathbb{R}^3$.