Adopting robot arms for manufacturing process in factories has become an inevitable trend for years. Several commercial off-line programming simulating software can be applied for generating motion trajectory for robot arms. However, it requires accurate device positioning and tool calibration in order to achieve the effect of automatic manufacturing. It is very challenging for factories to produce small quantity products with various customization requirements. Therefore, the trajectory generation highly depends on manual teaching via teaching pad. Using this method to generate path would fail if collision happens. Thus, we introduce a method in this paper to modify paths after collision by using cross laser sensors, which can achieve the effect of quickly resuming the production process.