The Goal of this project was to develop a program that guides a planar 6 Link robot to move from one configuration to another while avoiding obstacles. to achieve this the code was divided into 5 segments
The configuration distance is calculated using the equation:
|x1(i) - x2(i)| (i <= n and n = number of links)
The Dijkstra algorithm uses a given list of nodes as vertices and distances of the edges in between to generate the shortest path between the nodes. Once the path is found the function outputs the route between the start position and the final position.
The random sampling is done via generating 6 random inputs as for the robot configuration and evaluates whether the random configuration is within free space or is in contact with any obstacles. to do this the model of the robot is composed of triangles and we use a simple triangle intersection algorithm to see whether collision has occurred.
The purpose of the local planner function is to see the robot can incrementally go from start position to the final position and whether all increments exist in free space. Finally the last function generates a probabilistic road map between the start and final position. The Dijkstra algorithm in the written in the first section is used again to solve for the shortest path along the PRM.
The result of the overall algorithm (Click on the image to see animation):