An automatic pipe cutting/welding robot with a magnetic binder, which is named APCROM, is developed and its tracking control is studied in this paper. Using magnetic force the four-wheeled mobile robot binds itself to the pipe and executes automatic pipe cutting/welding process. As APCROM rotates around the cylindrical pipe laid in the gravitational field, the gravity effect on the movement of the robot varies. The varying gravitational effect deteriorates the tracking performance of the robot and degrades the quality of the pipe cutting/welding process. To maintain a constant velocity and consistent cutting/welding performance, the authors adopt a repetitive learning controller, which learns through practice the required effort to cancel the tracking errors. Analysis results and experimental results verify the effectiveness of the proposed control scheme.