Matlab is used in this assignment to generate the results. The code if available here. Two external Matlab files were used which are available at Matlab File Exchange.
1. Dijkstra's Algorithm used here is taken from here.
2. Lines intersections checks are done using Matlab file taken from here.
The following animation using a
gif
file shows the movement of a robot with 2 degrees of freedom and specifications provided in
robot1.dat
. The obstacles, obtained from
robot1.dat
are shown in red with robot's arm starting from start position and reaching different final positions as specified in
goals1.dat
. The number of random points used is 20,000. The last entry of
goals1.dat
has been removed as the robot will collide on that configuration.
The following plot shows the c-space as determined by the algorithm. The black colored dots represents the points in the occupied space. While the other lines and dots represents the points in free space. The lines represent the edges obtained using
knn
algorithm and local planner. The lines may appear to cross the occupied space but on observing carefully one can see that these lines connect points from extreme ends due to cyclic nature of distance metric, with no relation to points in occupied space. The red dot represent the starting configuration while the magenta dots represents the goal configurations.
The line obstacles are regions in the graph i.e. the c-space. The mapping from workspace to c-space is clearly non-linear in nature so in no case a line object in workspace can be lines in c-space. Moreover, a single point on a obstacle(which is reachable by robot with redundancy) can have infinite continuous configuration of robot that can collide with that point. These continuous movement of movement in workspace give rise to regions in c-space.
The following animation using a
gif
file shows the movement of a robot with 5 degrees of freedom and specifications provided in
robot2.dat
. The obstacles, obtained from
robot2.dat
are shown in red with robot's arm starting from start position and reaching different final positions as specified in
goals2.dat
. The number of random points used is 10,000.