A Robot in A Three Dimension Scene
This is a path planning project done for a three dimension (3D) world which contains has a 3D robot and 3D obstacles. The task is to move the robot in a continuous path from an initial position in free space to another position, also in free space, with out the robot colliding with any obstacles in space. Since the robot is only allowed to translate in X- and Z-axes, it has 2 degrees of freedom. The path planning is done using a modified Rapidly-Exploring Random Tree (RRTs) methods. The algorithm developed should pick the initial and final positions at random, check to make sure they are in free space and then search for a random path to move the robot from the initial to the final position.
The 3D area has an outside boundary on all the four sides, representing the walls and has obstacles scattered inside the walls boundary. The robot is only allowed to translate in the X- and Z-axes to simulate an actual motion of a robot in a real world. It was not allowed to rotate since the model is not too complex and that would have complicated the problem further.
This project is implemented using World Tool Kit (WTK) software and is written in object-oriented C/C++. When the user runs the application program, the program will randomly choose an initial and goal positions in free space and generate a random path in free space, using a modified RRTs method, to move the robot between these two positions. To accomplish the above tasks, random positions that are generated are tested to make sure they are in free space. After the path is generated, the robot will be drawn at the initial position and the user can animate the robot by placing the mouse on the graphics window and pressing "a" on the keyboard.
The search algorithm is biased towards the final (or goal) position to rapidly move the robot towards the goal. The metric used is the Euclidean Metric, for the distance between the random position and the goal positions. A number of points are chosen at random and then using the metric, the closest position to the goal is chosen. However, the trade off is that the robot at times does not work, as can get stuck at the local minimums.
I modified the algorithm by testing for the local minimums and moving the robot in the X- and Z-axes. The number of time the robot gets stuck at the local are reduced by this modification. The problem of the robot getting stuck at local minimums can be improved by reducing the bias towards the goal. Also, changing the metric could actually change and reduce the positions at which the robot gets stuck. This method is computationally efficient compared to the traditional RRTs.
Searching for a path for the 3D robot represents a challenge. Any point chosen in the configuration space has to be in the free space and has to be farther enough away from the obstacles and the wall such that the robot will not collide with the obstacles and the walls. Since the 3D obstacles and the walls are drawn using the defined drawing functions, the collision detection is also a bit difficult to implement. I had to create a virtual robot, walls and obstacles to use in the collision detection check during the search for the path.
The algorithm generated was able to find a path for the robot in most cases. It is biased towards the goal allowing the path to converge at the goal faster, but also making the robot get stuck at local minimums. The algorithm can be improved to reduce the incidents in which the robot gets stuck by defining a different metric space or reducing the bias towards the goal.
Using the WTK was a challenge since I had to modify the algorithm to work with in the limitations of the software. This tended to make the programming long and tedious. The algorithm would have been a lot easier to implement if I had used the LEDA libraries which has some useful functions such nodes and edges, to store the state and positions, etc.
Lavalle, Steve, Spring 2000 Computer Science 476/576 class notes.
Lavalle, Steven M, Rapidly-Exploring Random Trees: A New Tool for Path Planning, Dept of Computer Science, Iowa State University