Inspired by the hydrodynamic perception abilities based on lateral lines on fish surfaces, the artificial lateral lines (ALLs) based on pressure and flow sensors were proposed by the researchers. As the ALLs are widely used in underwater robots, the mechanisms of lateral line perception are urgently needed to be studied. Based on the lattice Boltzmann method, immersion boundary method, and large eddy simulation, a three-dimensional numerical model of underwater robot motion is established and verified. The distribution and variation of velocity and surface pressure on robots with different shapes under different flow fields are studied in detail. It is found that the robots with the upstream surface curvature aspect ratio of 1:1 are more suitable for placing ALLs. Then, similarly, the hydrodynamic perception abilities of robots with different sizes are further investigated. It was observed that the smaller the robot size, the better the perception ability. In addition, sensing devices are more suitable for placement on the upstream surface of the robots. These conclusions can also explain the physiological characteristics of cavefish with well-developed lateral lines in nature. Finally, based on the above analysis, to guide the shape design and sensor layout of the robots, an evaluation index for the perception ability of the robot is proposed. The reliability of the evaluation index is verified by using a machine learning method based on polynomial regression to predict the flow field. The R-square of machine learning can reach 0.99 at the upstream surface of the robot.