collision avoidance, global variables, GUI and others

added collision avoidance function
script defining global variables (changed names of "PC_i")
some changes in GUI
added some text for collision avoidance