A four freedom robot able to carry out automatic welding of offshore platform is introduced in this paper. The kinematic design of the robot has been designed according to the welding seam feature of T/Y/K-joint. The path planning of T/Y and the obstacle avoidance technique are used to study the robot’s collision avoidance welding on K-joint. In the process of K-joint path planning, the geometrical method was adopted to study the welding torch’s posture in branch gap. And for ensuring the postural stability of robot, the robot posture of a series welding points in single branch pipe condition was adjusted gradually in K-joint condition. The automatic welding process of K-joint was simulated in Solidworks. The result shows that the method could satisfy the collision avoidance requirement in the K-joint welding project.