Robotic Motion Planning using Learned Critical Sources and Local Sampling

Sampling based methods are widely used for robotic motion planning. Traditionally, these samples are drawn from probabilistic ( or deterministic ) distributions to cover the state space uniformly. Despite being probabilistically complete, they fail to find a feasible path in a reasonable amount of time in constrained environments where it is essential to go through narrow passages (bottleneck regions). Current state of the art techniques train a learning model (learner) to predict samples selectively on these bottleneck regions. However, these algorithms depend completely on samples generated by this learner to navigate through the bottleneck regions. As the complexity of the planning problem increases, the amount of data and time required to make this learner robust to fine variations in the structure of the workspace becomes computationally intractable. In this work, we present (1) an efficient and robust method to use a learner to locate the bottleneck regions and (2) two algorithms that use local sampling methods to leverage the location of these bottleneck regions for efficient motion planning while maintaining probabilistic completeness. We test our algorithms on 2 dimensional planning problems and 7 dimensional robotic arm planning, and report significant gains over heuristics as well as learned baselines.


I. I
We examine the problem of using prior experience for sampling based motion planning in robots. Sampling based motion planning (SBMP) algorithms construct a graph or roadmap as a discrete representation of the state space of a robot. The vertices of this roadmap represent robot configurations and edges represent potential movements of the robot. A graph search algorithm is then used to find the path between any two vertices in the roadmap. Rapidly Exploring Random Tree (RRT) [17] is a tree growing variant of SBMP that creates this roadmap (tree) implicitly while planning. SBMP is state of the art in high dimensional spaces. A defining feature of SBMP is itâĂŹs reliance on the sampler. Traditionally, these samples are generated either probabilistically or deterministically [8] to uniformly cover the state space. Such a sampling approach allows arbitrarily accurate representations (in the limit of the number of samples approaching infinity), and thus allows theoretical guarantees on completeness. However, in environments where paths pass through narrow passages, these algorithms become computationally intractable. This is because a huge number of samples must be generated to cover these narrow passages. Thus, the main challenge in sampling based algorithms is to place a small set of samples (critical samples) on certain key *All four authors contributed equally to this research. 1   locations (bottleneck regions) to enable the algorithm to find a high quality path with low computation effort. Current state of the art approaches [1], [2] use learning algorithms (called learners hereon) to predict these critical samples. These samples are then connected to the nodes of a uniform sparse graph to construct a roadmap. Depending on the structure of the bottleneck regions (say in an extended narrow passage or semicircular tube like structure), the learner is required to place a small set of critical samples in accordance with the local structure at each bottleneck. The graph created by connecting these critical samples among themselves acts as a bridge for connecting the disjoint subgraphs (connected components) present in the sparse graph. Thus, the learner needs to not only identify the bottleneck regions but also propose samples in accordance with their local structure. This brings us to two major challenges faced by these approaches. Firstly, the learners used in these approaches are commonly fed an occupancy grid among other parameters as a representation of the workspace of a robot. There exists a trade-off between the size of the occupancy grid and, amount of data and time taken by the model to converge. In complex planning problems, the size of this occupancy grid must be large. However, this makes the convergence of the model computationally intractable. On the other hand, a decrease in the size of the occupancy grid results in low resolution and thus the learner is not able to learn the internal representation of these bottleneck regions. Thus, a large number of the generated samples are rendered useless. Secondly, most of the learners are conditioned only on the planning problem and not on the prior samples it has generated. Thus, the learner tends to repeatedly sample similar points inside a bottleneck region, leading to redundant samples.
Our key insight is to rely on the learner to identify the location of the bottleneck regions and then exploit the property of planners such as RRT to cover the local structure of these bottleneck regions. Therefore, getting a set of samples from the learner that includes a single sample in each bottleneck region is sufficient. As we expect the learner to generate a single sample per bottleneck region, we propose to convolve the occupancy grid using a kernel to create a smaller grid that contains information relevant for this generation. We use this preprocessed grid during training and for testing the learner. We thus use the learner to get this initial set of critical samples (one per bottleneck region) and call them critical sources. We then generate our required set of critical samples from these critical sources using local sampling-based methods. This solves the first challenge faced by current algorithms, as using a smaller grid as input to the learner makes it converge faster to generalizing well over planning problems that have similar global structure for the location of bottleneck regions but different local structures within these regions This also solves the second challenge as we condition the subsequent samples on our current set of critical samples. The job is therefore divided between the learner (generate the critical sources) and the local sampler (procure the required set of critical samples by using these critical sources to generate subsequent samples). We argue that this is similar to how we, as humans, given a planning problem, first globally identify the doorways present relevant to our planning problem and then locally explore how to navigate through these doorways. Due to the efficient space filling nature of RRTs, we propose the algorithm: Local Critical Source RRT (LCS−RRT). This algorithm, in conjunction with a sparse graph, uses RRTs rooted at critical sources as the local sampling algorithm. We propose another algorithm, Critical Source-RRT (CS−RRT), which forfeits the sparse graphs altogether and incrementally builds RRTs rooted at start, goal and critical sources. In addition to RRTs generating the required set of critical samples, CS−RRT depends on the inherent bias of RRTs to grow towards large unsearched areas of the problem to emulate the sparse graph once the tree is out of the bottleneck region. We thus make the following contributions: 1) We present G C S , a fast methodology that uses learning models efficiently to generate a set of critical samples, ideally one per bottleneck region (called critical sources). 2) We present the algorithm Local Critical Source -RRT (LCS−RRT) which, in conjunction with a sparse graph, uses RRTs rooted at critical sources to generate the required set of critical samples which acts as a bridge between disjoint sub-graphs of the sparse graph. 3) We present the algorithm Critical Source -RRT (CS−RRT) that works by incrementally building RRTs rooted at multiple key sources (start, goal and critical sources). 4) We show that LCS−RRT and CS−RRT outperform the sampling based baselines on a set of R 2 point object and R 7 robotic arm motion planning problems, and prove their probabilistic completeness.

II. R W
An analysis on the shortcomings of using uniform sampling in the presence of narrow passages is given by D. Hsu et. al. [7] . This has stimulated numerous works on using selective densification for non-uniform sampling [9]- [13]. A multitude of these works use adaptive sampling for roadmap densification by exploiting the structure of the environment. While some propose to sample around the obstacles [14], [15], others use heuristic based strategies to trace or locate key samples [9]. Even though these techniques generalize to a large set of problems, they suffer from placing samples in regions where a path is unlikely to traverse. Also, owing to the huge number of collision checks performed, their computation time increases rapidly with increase in dimensionality of the state space. Recent approaches use learning models for non-uniform sampling.
[1]- [6]. Some of them propose to find low dimensional structure in planning [1], [2]. In particular, generative models like conditional variational autoencoder (CVAE) [19] have been used to great success. We use the CVAE used in LEGO [1] (called LEGO−CVAE hereon) as our underlying learning model in G C S and provide a gist of the same below. Note that, although our work uses the model used in LEGO, it can be extended to work with any other learning framework that predicts samples in bottleneck regions [2]- [5].

A. LEGO: Leveraging Experience using Graph Oracles
Leveraging Experience using Graph Oracles is a framework for predicting efficient roadmaps for sampling based motion planning. During training time, LEGO processes a dense graph to identify a sparse subset of key vertices. These vertices are a diverse set of nodes lying on bottleneck regions through which a near optimal path may pass. A CVAE [16] conditioned on the occupancy grid of the workspace, start and goal positions is then trained on these key samples. During test time, given the occupancy grid, start and goal positions, the CVAE generates these key samples which are used in conjunction with a uniform sparse graph to generate a roadmap.

B. CVAE: Conditional Variational Autoencoder
The core component of the LEGO framework is a conditional variational autoencoder (CVAE). It is an extension of traditional variational autoencoder and has been increasingly used to learn low dimensional structure in planning. The addition of conditional parameters helps embed the features of a planning problem as conditions and learn the corresponding representations. Let X be the state space and x ∈ X , z ∈ R L be the latent random variable and y ∈ R m be the conditioning variable. The framework comprises of two deterministic mappingsan encoder and a decoder. An encoder maps (x, y) to a mean and variance value of a Gaussian q φ (z|x, y) in latent space, such that it is "close" to a standard Gaussian N (0, I). The decoder maps this Gaussian and y to a distribution in the output space p θ (x|z, y). This is achieved by maximizing the following function L (x, y; θ, φ): At test time, we use only the decoder to map samples from an isotropic Gaussian in the latent space to samples in the output space. The CVAE is trained by passing in a . y i is the conditional parameter vector extracted from the planning problem. In our case it's (start, goal, occupancy grid). X i is the desired set of nodes extracted from the dense graph G dense that we want our learner to predict. Hence we train the model by maximizing the following objective.
III. P F Let X denote a d−dimensional configuration space. Let X obs ⊆ X be the portion in collision and X free = X \ X obs denote the free space. Let a path ξ : [0, 1] → X be a continuous mapping from index to configurations. A path ξ is said to be collision free if ξ(τ ) ∈ X free for all τ ∈ [0, 1]. Problem: Given a motion planning problem Λ = {x s , x g , X free } where x s ∈ X free is the start configuration and x g ∈ X free is the goal configuration, find a feasible ξ i.e. ξ that is collision free, ξ(0) = x s and ξ(1) = x g . Given a database of prior worlds, the overall goal is to use a conjunction of a learned policy and local sampling based planners to generate a roadmap G which is used by a graph search algorithm A to efficiently compute a feasible path. A , given a graph G, finds and returns a feasible path ξ. If no feasible path exists in the graph, A returns ∅. An ideal roadmap should be sparse enough for A to be efficient. In addition, for problems with narrow passages (bottleneck regions), this roadmap must have a set of critical samples in the bottleneck regions to ensure existence of a feasible path. We assume the graphs to be undirected for simplicity. However, it can easily be extended to directed graphs. The following are the additional notations used in this paper: • G sparse : A sparse graph embedded in the state space of the robot. It is additionally composed with the set of samples generated from the learner and local planners while constructing G by LCS−RRT to ensure a minimal coverage. • CS : Set of critical sources.

IV. A
We propose to identify the location of bottleneck regions using G C S and then use LCS−RRT or CS−RRT to navigate through these bottlenecks using local sampling based planners instead of learning their local structures. if free_count/total_count < threshold then 17 CS ← CS ∪ sample;

return CS;
A. Critical Source Generation G C S identifies the locations of bottleneck regions by generating CS, a set of critical samples, one corresponding to each bottleneck region. It uses LEGO−CVAE as the underlying learner. If an occupancy grid of a certain size is required to learn the locations of the bottleneck regions along with their local structures, we argue that we can preprocess this occupancy grid with a kernel to create a grid of lower dimensions that encodes only the information necessary to learn the locations of the bottleneck regions. The choice of kernel depends on the features of the environment. For example, a dilation kernel can be used in environments which contain extended narrow passages. As we do not expect LEGO−CVAE to learn the local structures, there is no loss of relevant information.
This preprocessed occupancy grid is then used for training and testing LEGO−CVAE. We call the LEGO−CVAE trained with this preprocessed occupancy grid LEGO-G as it only learns global information of the planning problem.
We thus use LEGO-G for generating a set of candidate critical source samples. A sample from this set ∈ CS if (a) it is at least a distance source_sep away from all the critical sources generated up till now (Lines 4-8, Algorithm 1) and (b) if we connect the sample to the vertices of G sparse that are within distance r_critical by edges, the percentage of edges not in collision with the obstacles must be smaller than a certain threshold (Lines 9-17), Algorithm 1).

return
LG;

B. Local Critical Source -RRT
Local Critical Source -RRT (LCS-RRT) uses G -C S to get CS and adds the start and goal vertices to it. It builds G, which contains G sparse and CS. For each CS i , the algorithm maintains two graphs: a tree T i and a local graph LG i . T i is RRT rooted at CS i . LG i consists of edges and vertices of G within distance r from CS i . The goal of the algorithm is to make LG i completely connected by adding edges between the vertices of T i and the vertices of LG not belonging to the connected component of CS i . Initially, for each CS i , both T i and LG i contain only CS i . In an iteration of the outer while loop of LCS-RRT (Line 7, Algorithm 2), E L G expands each LG i to radius r. After expansion, these LGi consist of the subgraph of G within a radius r of CS i (Line 6, Algorithm LG i ← LG i ∪ {rn',edge(rn',nn)}; 12 for n ∈ LN do 13 if V (edge(rn',n)) then 14 LN ← LN -C C (LG i ,n);

return
LG, T ; 2a). E L G and D L G both maintain LN , a set of vertices of the LG i that does not belong to the connected component of CS i . Wherever possible, the nodes of T i , are connected to LN by collision free edges and LN is updated (Lines 8-12, Algorithm 2a). D L G densifies the local graph by growing its T i and adding edges between its T i and the vertices of the set LN until either the LG i is completely connected or M (hyperparameter) iterations have taken place, whichever is earlier. To grow its T i , D L G samples a random node within a radius r of CS i , interpolates it to within a distance of step_size of the vertex nearest to this node in its T i and, if possible, joins them with an edge in a similar fashion to RRT growth (and therefore the name) (Lines 5-10 Algorithm 2a). It then tries to connect this new node of T i with the vertices of LN and wherever a connection is possible, LN is updated (Lines 12-15 Algorithm 2b). After densification, LG is added to G and A is run on G (Lines 10-12 Algorithm 2). If successful, the feasible ξ is returned. Else, the radius r is increased by a factor λ and the process is repeated again and so on. Probabilistic Completeness: Let us consider the local graph LG s at start node CS s at infinite time. As time approaches infinity, so does the radius r. Thus, the goal node is present in the LG s . As we try to connect CS s to all nodes not present in the connected component of CS s using T s , we are at the least running a RRT from start node to goal node. Thus, due to the probabilistic completeness of RRT, LCS−RRT is probabilistically complete.

C. Critical Source -RRT
Critical Source -RRT (CS-RRT) uses G C -S to get CS and adds them to G. It then adds start and goal vertices to G. These nodes subsequently act as the roots of the RRTs we will grow. In each iteration of the outer while loop (Line 3, Algorithm 3), the algorithm iterates through the connected components present in G i.e. the RRTs in a round robin manner. In lines 5-10, the algorithm samples a random node, interpolates it to within a distance of step_size of the vertex nearest to this node in its RRT and loops until it is possible to join them with an edge. This is similar to how a RRT grows (and therefore the name). In lines 11-13 it then tries to connect the new_node of its tree to the nearest vertices of the other trees that lie within a distance of step_size. If a connection is possible, an edge is inserted into the graph (line 14). Insertion of this edge results in merger of the two trees the nodes belonged to. The algorithm returns a feasible path when the start and goal nodes belong to the same connected component of G (Lines 15-17). Probabilistic Completeness: As CS−RRT grows RRTs rooted at start and goal nodes along with the critical sources to connect the start and goal nodes, it runs a RRT-Connect at the least. Thus, due to the probabilistic completeness of RRT-Connect, CS−RRT is probabilistically complete.
V. E In this section, we compare the performance of LCS-RRT and CS-RRT to sampling based algorithms in multiple domains. We evaluate our algorithms against RRT-Connect [18], a variation of RRT that incrementally builds two trees rooted at the start and goal nodes. Additionally, we compare our algorithms with LEGO, a state-of-the-art learning based sampling algorithm. As LEGO is a graph based approach while others are tree based approaches, we adapted LEGO to an anytime algorithm with incremental densification for testing purposes. We have tuned the parameters of RRT-Connect and LEGO to ensure their best performance. Evaluation Procedure: For a given planning problem, we run each algorithm with a fixed timeout. For a given problem domain, each of the learning models used by these algorithms are trained on similar number of planning problems. We evaluate the performance of these algorithms on the metric of time taken to find a feasible path. Problem Domains: We evaluate our algorithms on R 2 and R 7 problem domains. The R 2 problems have random rectilinear walls with extruded narrow passages that have varying local structures (Fig 3). The R 7 problem is a robotic-arm manipulation problem in a cluttered environment. Experiment Details: We compare the algorithms LCS−RRT, CS−RRT, LEGO and RRT-Connect on a testset of 100 planning problems. For the R 2 problems, each learning model is trained on 4000 planning problems for around 30 minutes. The planning timeout for the algorithms is 5 seconds. The size of occupancy grid used by LEGO−CVAE is 50X50. The kernel used by LEGO-G for preproccessing is of size 5X5 (with stride value 5) resulting in an updated occupancy grid of size 10X10 (Fig 5). For the R 7 problems, each learning model is trained on 4000 training problems for 2 hours and the planning timeout for the algorithms is 12 seconds. The code is open sourced and can be found at https://github.com/RKJenamani/CS-RRT. is able to place a sample at each bottleneck region while LEGO−CVAE is not (Fig 2).

VI. C
We show the feasibility of using local sampling algorithms aided by a learning model to rapidly find a feasible path in complex environments containing extended bottleneck regions. These algorithms share the responsibility of generating key samples between the learner and the local sampler. This lets the learning model converge faster to generalizing well over planning problems that have similar global structure for the location of bottleneck regions but different local structures within these regions. As we require the learner to only identify the location of bottleneck regions, we introduce the idea of using a kernel to preprocess the occupancy grids for better learning. In future works, we would like to analyse the relationship between a workspace and the kernel suitable to it. We intend to explore the integration of other sampling based methods to make the approach asymptotically optimal. We would also like to test our algorithms on environments where extended bottleneck regions arise due to differential constraints. R