Online Path Planning on a Turtlebot
Hands-On Planning
Collaborator(s): Mohamed Khaled Othman
Overview
In this project, we implemented a path planner and a low level controller to autonomously guide a differential drive simulated robot to the goal position specified by the user. Rapidly-exploring random trees (RRT) is used for obtaining the path from the start to the goal position. The gridmap that is used for the path planning is obtained from an octomap server. All these are achieved using the ROS framework.
RRT Planner
In order to implement the RRT algorithm, two classes were defined, tree_node and Planner. The tree_node class is used to define the properties of a tree node, such as its position in the grid map and parent node. The Planner class contains methods for implementing the RRT algorithm, path generation, and path smoothing.
The RRT algorithm iteratively chooses random positions in space with a \((1-p)\) probability and the goal position with \(p\) probability using the q_random method. The position chosen is called q_rand. The nearest tree node to q_rand is selected, and the algorithm tries to extend to q_rand from the nearest node by a distance \(\Delta q\). If there is no obstacle within the extension line, the extended position, called q_new, is added to the edges and nodes of the tree. This process continues until the goal node is part of the tree or the maximum number of iterations is reached.
Demonstrations
Here are demonstrations of the robot reaching various goal positions:
You can see the robot in action as it plans and moves autonomously toward its goal position in each of the demonstrations above.