Magnetically controlled capsule robots are predominantly used in the diagnosis and treatment of the human gastrointestinal tract. In this study, based on the permanent magnet method, magnetic driving and fluid measurement systems for in-pipe capsule robots were established. Using computational fluid dynamics (CFD) and particle image velocimetry (PIV), the fluid velocity and vorticity in the pipe of the capsule robot were calculated and measured. The running characteristics of the capsule robot were numerically analyzed in the curved pipe and the peristaltic flow. Furthermore, the range and variance method of orthogonal design was used to analyze the influence of four typical parameters (namely, pipe diameter, robotic translational speed, robotic rotational speed, and fluid viscosity) on the three operating performance indicators of the capsule robot (namely, the forward resistance of the robot, fluid turbulent intensity near the robot, and maximum fluid pressure to the pipe wall). In this paper, the relative magnitude and significance of the influence of each typical parameter on different performance indicators of the robot are presented. According to the different performance requirements of the robot, the different four parameter combinations are optimized. It is hoped that this work provides a reference for the selection of the appropriate mucus, translational speed, and rotational speed of the robot when it is working in pipes with different diameters.