Control systems for preventing interference between the moving gun and the adjacent structure