Práctica 3: Obstacle Avoidance
Welcome! Picture 1. Overtaking in an F1 race Goal: In this exercise we are going to implement the logic of the VFF (Virtual Force Field) navigation algorithm, where each object generates a repulsive force towards the robot and it´s destiny an attractive force. Explanation: In this exercise we were asked to design a version of the VFF (Virtual-Force-Field) algorithm, in which an F1 car must travel the circuit taking into account that this time it will have obstacles on the way and you will have to dodge them. First, I've declared three constants, one to check if you've hit the target, and the other two corresponding to the alpha and beta values that will be applied to calculate the resultant force. Then I have implemented the function absolute2relative(), which, as its name indicates, converts the absolute coordinates (point (0,0) at the beginning of the circuit) to relative ones (positive x-axis means forward and positive y-axis means left). The functions corresponding to t...