**2. Sampling-based motion planning**

Naturally, offline path-planning algorithms need a complete map of the configuration space which usually increases the cost and runtime of the search in most problems. Sampling-based motion planning was proposed to solve navigation queries without trying to construct the map of the entire configuration space. Instead, they only depend on a procedure that decides on whether a given configuration of the robot is in collision with obstacles or not. The available sampling-based path-planning algorithms can be categorized into two main classes, namely, roadmap-based or multi-query algorithms and tree-based or single-query algorithms [19]. Roadmap-based algorithms are normally applicable in multi-query scenarios as they form a graph that later will be used to solve different navigation problems. The graph is the main structure used for saving the environmental information, where the nodes represent different configurations in the robot's configuration space. An edge exist between any two configura‐ tions if the corresponding geometrical properties satisfy a set of conditions such as vicinity, and the autonomous agent can navigate from one point to another without any collision. A typical algorithm consists of two main stages: learning or observation stage and search stage. In the first stage, the graph structure is constructed. Collision-free positions or samples are chosen randomly and considered as the vertices of the graph. In the search stage, each vertex is tested to be connected to the closest neighbour configurations, and the resulted successful connection will be an edge in the roadmap. To answer a given planning task, the initial and final configurations are added to the existing graph and a normal search technique is consid‐ ered for finding the shortest path. The most important factor in the efficiency of the algorithm is how effectively the roadmap can learn the free-space connectivity of the configuration space. In addition, the main problem in the performance of such algorithm is the construction of the graph because the search algorithms usually perform satisfactory in terms of speed and runtime. The original form of PRM planner consists of the following steps. First, a random configuration is selected from the configuration space and is tested if it lies in the free config‐ uration space. If the sample passes this, it will be included in the roadmap structure as a vertex or a node. Second, a search technique takes place to find the closest neighbours in the graph to the new node. Finally, a local planner attempts to connect the closest neighbour and the new configurations based on criteria posed by the planning query. This connection will be added to the graph as a new edge if it is collision free. In several situations, quickly finding a solution for a particular problem is the main objective. In these situations, single-query algorithms can be implemented. In these algorithms, the base of the data structure is normally a tree. The basic idea is to find an initial configuration (the starting configuration) that is the root of the tree and all incrementally generated configurations will be connected to other configurations already included in the tree. The initial tree-based algorithm is the rapidly exploring random tree (RRT) planner [20]. Started to grow from the start configuration, a tree continuously grows in the free configuration space until it gets close enough to the final configuration. An essential feature of this planner is that configurations with larger Voronoi regions (i.e. the part of the free configuration space that is closer to that node than to other members of the tree) have higher chances to be selected in the process of tree expansion. Therefore, the tree normally grows towards yet unknown parts of the environment, circumfusing rapidly in the free configuration space. The initial version of the RRT consists of the following steps. First, a random sample is generated in the free search environment. Then, the planner searches the tree for a particular configuration, which is the nearest node to this newly generated sample. Next, a new node is created by moving a predefined distance from in the direction of the selected node using a local planner or an interpolation technique that relies on the robotic system. And, finally, if the new node is a valid point that falls in free configuration space, and if the local path between it and the nearest node is collision free, then, the new node is added to the tree as a new node and an edge is created between the tree and the new node. This process is repeated until the goal configuration can be connected to the tree or a maximum number of iterations are reached.

One of the key issues in sampling-based planners is that they usually result in undesirable lengthy resulted paths that stray within the free configuration space. Recently, the RRT planner has been proven not to be able to find the optimum answer [18]. Thus, the optimal improved forms of original sampling-based algorithms, i.e. PRM\* and RRT\*, have been proposed and proven to possess the asymptotical optimality in which the chance of generating the optimum path approaches unity as the cardinality of the generated structure approaches infinity. The RRT\* planner contains a unique ability which is the sufficiency to find the optimal path from the start position to any configuration within the free space [18]. **Figure 1** shows the perform‐ ance of PRM\* and RRT\* algorithms in a 2D indoor environment.

**Figure 1.** Performances of (a) PRM\* and (b) RRT\* algorithms in a simple 2D environment. Start and goal configurations are shown by yellow and green squares, respectively.
