Many manufacturing industries especially small and medium size (SMEs) industries are reluctant to automatize their production using robots. This is due to the fact that mostly industrial robots are not properly equipped to recognize their surrounding and take intelligent decisions regarding path planning especially for low volume, flexible production with versatile production lines. The proposed idea is that a robot manipulator performing assembly or disassembly tasks should be able to predict potential collisions even with unknown obstacles and must be able to prevent i.e. react automatically for safe detour around obstacle. Currently, industrial robots have tactile sensing abilities, which detect collisions after a real contact but the existing proposals for its avoidance are either computationally expensive, need prior information about the obstacles or not very well adapted to the safety standards. Therefore, this paper introduces a ToF sensor based information collection and intelligent decision methodology in order to localize the un-known, un-programmed obstacles and propose a safe peg-in-hole automated assembly process. In the case of collisions, the proposed method will provide various solutions and decides for the best solution according to the scenario on-hand. The proposed solution is quick and robust and currently applied for static environment, whereas dynamic obstacles will be treated in future.