The complex component intelligent
welding trajectory and posture optimization method and
system disclosed by the application belong to the technical field of
welding process control. By acquiring the weld geometry characteristics and obstacle information of a to-be-welded component, a spatial
data set is established; the nominal and actual weld center lines are registered, and the nominal trajectory points are discretized; a tangent, a secondary normal and a normal local coordinate base are constructed at each nominal trajectory point, the deviation is decomposed into the three directions, and a
deviation vector field is obtained; the nominal trajectory point positions are corrected and smoothed according to the
deviation vector field, and a continuous corrected trajectory is obtained; candidate
welding gun postures are generated at each corrected trajectory point, and the optimal welding gun posture sequence is solved through constraint judgment and
cost evaluation; and the continuous corrected trajectory and the optimal welding gun posture sequence are converted into
robot instructions. The application reduces the wire stick-out fluctuation, improves the arc centering accuracy and stable welding heat input, effectively reduces welding defects such as incomplete fusion, undercutting and spatter, and thus improves the weld forming consistency.