20th week: VFF completed!
This week I ended the VFF project.
The big problem I was facing with the attractive forces really was not that big. The problem was that I was using python’s functions “math.cos” and “math.sin” with euler degrees instead of radians, so when I changed them, everything worked as intended.
As we can see in the following video (as a difference with the 19th week which only used repulsive forces) is that now the robot takes the interior path in the turns and not the center of the circuit. This is caused by the attractive forces pulling the robot to the path of the objective and the repulsive forces making it not collide with the walls.
I also added a debug block, which receives every data from the program (odom, destination, repulsive & attractive forces) and creates a grid showing the position of the robot, the destination and the rotational forces (red for the attractive and brown for the repulsive) on it. The linear forces are not showed, as the robot is using a constant linear velocity. The laser measures are represented as black points around the robot. Also this block shows the direction of the robot (black arrow) and the velocities (linear “V”, angluar “W” and both attractive and repulsive forces) as numbers in the right-down corner.
Here is the VisualCircuit project showing everything:
And here is finally the video of everything working!!
Now I’m working on the TFG’s index for the final summary.