{'fraction_non_alphanumeric': 0.03289848754150038, 'fraction_numerical': 0.009490593245917034, 'mean_word_length': 4.877020102483248, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Learned Critical Probabilistic Roadmaps for Robotic Motion Planning

Sampling-based motion planning techniques have emerged as an efficient algorithmic paradigm for solving complex motion planning problems. These approaches use a set of probing samples to construct an implicit graph representation of the robot's state space, allowing arbitrarily accurate representations as the number of samples increases to infinity. In practice, however, solution trajectories only rely on a few critical states, often defined by structure in the state space (e.g., doorways). In this work we propose a general method to identify these critical states via graph-theoretic techniques (betweenness centrality) and learn to predict criticality from only local environment features. These states are then leveraged more heavily via global connections within a hierarchical graph, termed Critical Probabilistic Roadmaps. Critical PRMs are demonstrated to achieve up to three orders of magnitude improvement over uniform sampling, while preserving the guarantees and complexity of sampling-based motion planning. A video is available at https://youtu.be/AYoD-pGd9ms.


I. INTRODUCTION
Robot motion planning computes a collision free, dynamically feasible, and low-cost trajectory from an initial state to goal region [1]. Sampling-based motion planning (SBMP) approaches, such as probabilistic roadmaps (PRMs) [2] and rapidly-exploring random trees [3], efficiently solve complex planning problems through using a set of probing samples to construct an implicit graph representation of the robot's state space. To connect the initial state and goal region, PRMs search this roadmap graph and identify a sequence of states and local connections which the robot may traverse. Though these algorithms can form arbitrarily accurate representations as the number of samples increases to infinity, in practice, only a few critical states are necessary to parameterize solution trajectories. Often these critical states enjoy significant structure, e.g., entries to narrow passages, yet are only identified through exhaustive sampling [4]. Furthermore, when these states are identified [5], [4], traditionally they are treated with equal importance as less critical samples, e.g., samples in open regions.
We present a method that learns to recognize critical states and use them to construct a hierarchical PRM. These critical states are quantified through betweenness centrality [6], a graph-theoretic measure of centrality based on a sample's importance to shortest paths through a graph, followed by a smoothing step that retains critical samples that are necessary for planning. Given this set of critical states, a neural network is learned to predict criticality from schmrlng@waymo.com local, environmental features; this local focus enables scaling to complex environments. Online, with a new, previously unseen planning problem, we construct a Critical PRM, which samples a small number of critical states and a large number of non-critical states. The non-critical samples are connected locally, preserving the asymptotic optimality and complexity of SBMP. The connection strategy for the critical states, however, is modified by connecting critical states to all samples, providing critical edges through the graph. The results in this work demonstrate the algorithm's generality and show a significant reduction in computation time to achieve the same success rate and cost as baselines.
Related Work. Since the early days of sampling-based motion planning [2], researchers have sought to develop improved sampling techniques that bias samples towards important regions of the state space [7], [8] or cover the state space more efficiently [9]. Several works have considered deterministic sequences for covering spaces evenly [9], [10], [11]. To bias samples, several previous works have used heuristically driven approaches to sample more frequently near obstacles [8], near narrow passages [7], or to adaptively combine several of such approaches [5]. Others have used workspace decompositions to identify regions of interest [12], [13]. Another promising approach [14] adaptively samples only in regions that may improve the current solution. These methods are generally limited in their ability to sample the state space or consider local planner policies.
One recent approach has been to learn sample distributions to directly sample from in sampling-based motion planning [15], [4], [16], [17], [18]. [4] and [16] use offline solution trajectories to learn a distribution of samples and bias sampling towards regions where an optimal solution might lie. [17] learns a local library sampler to bias sampling towards regions likely to contain the solution. [18] learns to identify critical regions for sampling based on images of successful solutions and leverages these samples by growing trees from them. [19] proposes several heuristic approaches for identifying diverse bottleneck states to plan with sparse roadmaps. In this work, we identify critical regions from graph theoretical techniques in the state space and incorporate these samples into a hierarchical Critical Roadmap, which allows the critical samples to connect throughout the state space. Furthermore, most previous work has focused on a single-query setting, where the initial and goal state can be heavily leveraged in sample selection and where complex, large environments can be difficult to learn from. Instead, Critical PRMs are targeted towards multi-query settings and only require local information to choose samples.
Finally, we note the connections between Critical PRM and other areas of machine learning. Within Reinforcement Learning (RL), the exploration problem is not unlike the motion planning problem we consider herein. In this context, critical states may be used to identify and subsequently reward useful subgoals, allowing more efficient exploration [20], [21]. These critical states can further be used to identify discrete skills to enable learned hierarchies [22], [23], [24]. Within planning and control, recent work has sought to learn low-dimensional representations of important regions of the state space [25], [26], [27]. Statement of Contributions. The contributions of this paper are threefold. First, we present a methodology for identifying and subsequently learning to identify critical states for the optimal motion planning problem. The criticality of a node is based on the graph-theoretic betweenness centrality, which allows states to be identified in problems with complex environments, state spaces, and local planners. The learned regressor further can identify criticality from only local features, allowing scaling to more complex environments and requiring less training data. Second, we present an algorithm for leveraging these critical states as more important through a hierarchical PRM, termed the Critical PRM. In particular, these states are globally connected through the state space, along with a set of locally connected uniform states. This allows critical states and connected edges to serve as highways through the state space. Third, we demonstrate the Critical PRM algorithm on a number of motion planning problems as well as compare to state of the art baselines. Our findings show that Critical PRM can outperform other methods by up to three orders of magnitude in computation time to a success rate and one in cost. Furthermore, we show that Critical PRM can scale to the complexity of real-world planning problems.
Organization. In Section II, we introduce the optimal motion planning problem approached herein. In Section III, we overview the process of learning to identify critical samples. In Section IV, we describe the Critical PRM algorithm. In Section V, we demonstrate the generality and speed improvements of Critical PRMs as well as show the performance on a real robot. Finally, in Section VI, we overview conclusions and outline future directions.

II. PROBLEM STATEMENT
The goal of this work is to efficiently solve optimal motion planning problems by learning to identify and effectively leveraging states critical to their solutions. Informally, solving the optimal motion planning problem entails finding the shortest free path from an initial state to a goal region, if one exists. For complex problems, there exist formulations that include kinematic, differential, or other more complex constraints [28], [1]. The geometric motion planning problem, a simple version of the problem, is defined as follows. Let X = [0, 1] d be the state space, with d ∈ N, d ≥ 2. Let X obs denote the obstacle space, X free = X \ X obs the free state space, x init ∈ X free the initial condition, and X goal ⊂ X free the goal region. A path is defined by a continuous function, s : [0, 1] → R d . We refer to a path as collision-free if s(τ ) ∈ X free for all τ ∈ [0, 1], and feasible if it is collisionfree, s(0) = x init , and s(1) ∈ X goal . We thus wish to solve, Problem 1 (Optimal motion planning): Given a motion planning problem (X free , x init , X goal ) and a cost measure c, find a feasible path s * such that c(s * ) = min{c(s) : s is feasible}. If no such path exists, report failure.
Even simple forms of the motion planning problem are known to be PSPACE-complete [1], and thus one often turns to approximate methods to solve the problem efficiently. In particular, sampling-based motion planning techniques have emerged as one such state of the art approach. These algorithms avoid explicitly constructing the problem's state space and instead build an approximate, implicit representation of the state space. This representation is constructed through a set of probing samples, each a potential state the robot may be in. A graph (or tree) is then built by connecting these samples to their local neighbors via a local planner under the supervision of a black-box collision checker [1]. Finally, given an initial and goal state, this representation can be searched to find a trajectory connecting the two. In this work we focus on a multi-query setting, focusing on identifying critical states and connecting critical states globally.

A. Identifying Critical States
The first question we seek to answer is what defines a critical sample for the optimal motion planning problem. If we consider a human navigating an indoor environment, these critical states may be doorways and non-critical states may be hallways or other open regions. In the context of geometric motion planning discovering these narrow passages is often the bottleneck [7]. However, as problems increase in difficulty, either due to more complex environments (cluttered and unstructured) or more complex robotic systems (differential constraints, rotational DoFs, complex local policies, stochasticity), it is not clear how such concepts can be utilized. We thus wish to devise a principled, general method for extracting and learning to identify critical states.
Several approaches exist to compute a sample's "criticality" in the state space; the most promising we considered were: label propagation [29], minimum k-cuts [30], and betweenness centrality [6]. Label propagation algorithms seek to break graphs into communities, where the transition between communities may be considered a bottleneck state. Label propagation finds reasonable results for very narrow passage problems, but the results are unstable and poorly defined for problems with less constrained bottlenecks ( Fig  1b). Minimum k-cut algorithms seek to find the minimumweighted cuts in a graph partition the graph into k components. Minimum k-cuts can identify many critical samples, but require a fixed number of cuts be provided which can result in too few cuts, thus ignoring critical regions, or too many, thus identifying non-critical regions, e.g., corners, Fig.  1c. Furthermore, minimum k-cuts is significantly slower than the other approaches. Ultimately, we selected betweenness centrality, a graph-theoretic measure of the importance of each node to shortest paths through a graph. As outlined in Fig. 2, betweenness centrality is computed by counting the number of all-pairs shortest paths that pass through a specific node. We make two alterations to betweenness centrality to adapt it to the motion planning problem and the complexity of PRMs. First, we only compute an approximate value by solving m shortest path problems with a randomly chosen initial node (sampled without replacement) to all other graph nodes (note if m = n, this is exact). Each time a node is used in a shortest path, its centrality score is incremented. Secondly, we add a smoothing step to discount samples that can be skipped along the shortest path. Essentially, for a collision-free path that traverses nodes x i , x i+1 , x i+2 , if the connection between node x i and x i+2 is collision-free, then node x i+1 is not critical to the path, and thus its score should not be incremented. This step is necessary to eliminate samples that are simply in the free space trajectory between critical samples and used due to the limited r n connection radius. Crucially, it also allows critical states to be identified in part by local environment features, enabling more compact environment representations and increased data efficiency, and thus better scaling to complex environments.

B. Learning to Recognize States
The first phase of the algorithm learns to identify critical samples from a set of PRMs generated for a family of training environments. This phase generates the critical sample dataset and then trains a predictor deep neural net model conditioned on the planning environment to output the criticality of a sample. This methodology allows the neural network to generalize to new environments at test time. Furthermore, due to the smoothing step, which discounts the criticality of states if they can be skipped in the local region, this network only needs a local representation of the environment. This allows for much more scalable training in complex problems, as demonstrated in Section V. Note that here we learn to predict sample criticality and sample accordingly rather than learning a distribution of states. Though the distributional approach may allow more precise critical regions to be learned, this regressor approach only requires local features and may handle the multi-modality of critical states more effectively. Dataset Creation. For a given set of state spaces X free in a training set, we construct a standard PRM G with samples {x i } i∈[1..n] ∈ X free and edges (x i , x j ) for i, j ∈ [1..n] if and only if the trajectory from sample x i to x j is collision free and the samples are within a connection radius r n , as defined in [31]. With these roadmaps in hand, we compute the criticality of each sample via the betweenness centrality as described above.
Training. The computed centrality values become labels for training a neural network h θ (x, y(x)), parameterized by θ, where x ∈ X free is a state sample and y(x) is a representation of X free . Herein, y(x) is a representation of the local environment around x, e.g., an occupancy grid. We minimize L 2 loss to learn θ.

IV. CRITICAL PROBABILISTIC ROADMAPS
Given the ability to identify critical samples in a previously unseen environment, the next key question is how to best leverage these important samples. Previous works have general sampled them at a higher rate, but considered them of equal importance beyond that [5], [4]. Herein, we propose a hierarchical graph, called a Critical Probabilistic Roadmap (Critical PRM), that globally connects critical states, along with a bed of locally connected uniform states. This allows these critical states to act as primary hubs within the space, while preserving the theoretical guarantees of samplingbased motion planning via the uniform samples.
Given a new planning environment, the online portion of the Critical PRM algorithm proceeds as follows (and outlined in Fig. 3. The value of Γ allows the critical samples to be chosen from a more dense covering of the state space. Given a planning problem in a new environment with free space X free , corresponding environmental input y, a sample budget of n, and a constant λ that controls the number of critical samples, we first select Γn samples {x i } i∈[1..Γn] ∈ X free and predict their criticality with h θ (x i , y(x i )) (Line 1-2). Next, to select λ log(n) critical samples, the samples are stochastically drawn with a probability proportional to their criticality (Line 3). We refer to the remaining samples n − λ log(n) as non-critical samples (Line 4). To connect the Critical PRM, we connect the non-critical samples locally, only with neighbors within an r n connection radius, as detailed in [31] (Line 5). In contrast, the critical samples are connected globally, to all other samples regardless of distance (Line 6). 1 Finally, given a planning problem with an initial and goal region, we connect them into the roadmap globally, and search the roadmap for the shortest connecting path (Line 7-8). Fig. 4b shows a Critical PRM example with 20 samples versus a uniformly sampled PRM with 1000 samples in Fig.  4a, wherein the Critical PRM achieves better connectivity than a standard PRM with 50x fewer samples.
Complexity: The complexity of Critical PRM remains O(n log(n)) as the n − λ log(n) uniform samples are locally connected and maintain the standard O(n log(n)) complexity of PRM [31]. The λ log(n) critical samples are connected to all n neighbors, requiring no nearest neighbor lookup and nλ log(n) constant time connections and collision checks.
Probabilistic Completeness and Asymptotic Optimality: The theoretical guarantees of probabilistic completeness and asymptotic optimality from [32], [11], [31] hold for this method by adjusting any references to n (the number of samples) to (n − λ log(n)) (the number of uniform samples in our methodology). This result is detailed in Appendix D of [32] and Section 5.3 of [11], which show that adding samples can only improve the solution.

V. EXPERIMENTS
In this section we evaluate the Critical PRM algorithm on several motion planning problems and on robot. The results in this work were implemented in a mix of Python and Julia [33] along with TensorFlow [34]. The network architectures are fully connected for 1D environment inputs, convolutional for 2D inputs, and 3D convolutional for 3D inputs. The loss for each problem is a log mean squared error on a sample's criticality. Each training dataset was composed of 50% critical states (states with criticality greater than 0) and 50% non-critical states. Note that we make comparisons for several problems well-tuned to Hybrid sampling [5], however we do not make comparisons to previous learning-based approaches targeted towards single-query settings, as these heavily rely on initial and goal states and have difficulty scaling to the large complex environments that the local nature of Critical PRM can cope with.

A. Narrow Passage Environment
As a proof of concept, we consider randomly generated 2D and 3D narrow passage environments shown in Figs. 4a-4d and 4e-4h. These environments provide both clear learned samples and allow comparison to previous heuristic methods tuned for narrow passages [5]. Two critical prediction networks were trained for each environment with exact and local workspace representations. The first network is given an exact representation of the workspace as input: the (x, y)-coordinates of each gap. The second network is given a local representation of the workspace as input. For 2D, the workspace is divided into a 100 × 100 occupancy grid, of which the local 10 × 10 occupancy grid is fed into the network. For 3D, the workspace is divided into 36 × 36 × 36 and locally 12×12×12. 2D used λ = 2 and 3D used λ = 10.
The training data consisted of 1k problems and 100k example states. For comparisons, we also consider a standard, uniform PRM [2] and Hybrid sampling PRM [5], which specifically biases samples towards obstacles and narrow passages. For the network with better performance on each problem, we consider the effect of globally connecting critical samples by showing results for sampling critical states, but only r n local connections (instead with the connection radius r n ). For each problem, Critical PRM outperforms both uniform and hybrid sampling in cost and success rate vs. computation time (s). For 2D, the exact representation achieves better initial performance compared to the occupancy grid input, though the occupancy grid input performs similarly well at higher computation times. However for 3D, due to the complexity of the problem, the local representation vastly outperformed the exact even with a significantly higher dimensionality. This is because each sample's local environment is unique, allowing for 100k different environment training inputs instead of only 1k unique inputs for the exact. Furthermore, while the Critical PRM with a standard connection radius outperforms uniform sampling, the global connections improve both cost and success rate substantially.
B. Rigid Body Planning SE(2) L Problem. To further demonstrate the ability of the Critical PRM learning methodology to identify narrow passages in the state space from obstacle representations given in the workspace, we also consider the problem of maneuvering a rigid L-shaped robot through a constrained environment as depicted in Fig. 5a. The state space SE(2) = R 2 × S 1 includes an orientation dimension in addition to two position dimensions. To highlight the complications that arise from considering orientation, the family of environments for this subsection is constructed by computing Voronoi diagrams for randomly drawn points in the unit square and cutting passages in the borders between regions (which have variable orientation by construction) significantly narrower than the lengths the robot body segments.
From Fig. 5c, which displays inferred sample criticality superimposed on a PRM not within the neural net's training set, we can see that the learning process has gained the insight that states where the arms of the L straddle a passage are most valuable. The learned model produces smoother criticality predictions compared to the ground truth values depicted in Fig. 5b. This ground truth is in a sense overfit to the specific sample set and associated graph (see, e.g., narrow passages with nearby states having near-zero criticality because the ground truth graph contains no path through the passage); in contrast the regression estimate gives a sense of how a sample might be useful in a generic PRM. For this problem family we find that putting learned criticality to work in Critical PRM improves the required computation time for a given success rate by approximately half an order of magnitude, Fig. 5d.

SE(3) I Problem.
We also consider an SE(3) = R 3 × S 3 I rigid body shown in Fig. 6. We use the same environment inputs and network architecture from the earlier 3D planning problem. Due to the complexity gathering data for the problem, we only train the criticality network from 200 environments for 100k total samples (and to showcase the minimal data requirements). Fig. 6b shows several critical states for the SE(3) problem. The non-critical samples generally occur in free space (blue) and the critical samples (red) tend to be near the gaps and oriented perpendicular to the obstacle plane, though they are reasonably varied, allowing some diversity. The results are shown in Figs. 6c-6d. For this environment, the local representation again outperforms by orders of magnitude (even in such a low data regime and with a high dimensional input)-the difference is particularly stark in path cost compared to Hybrid PRM and Uniform PRM. The global connections too have a large effect in both success rate and cost.  (2) rigid body motion planning (5a). The ground truth criticality (5b) and network outputs h θ (x, y) (5c) are visualized as robot miniatures with color/size proportional to log-criticality (redder and larger is more critical). Critical PRM displays a half order of magnitude improvement in computation time for a fixed success rate (5d).

C. Reinforcement Learned Local Policy
In this section, we demonstrate the generality and efficacy of Critical PRMs on a challenging planning problem that requires consideration of: (1) the effect of a complex local planner, (2) the effect of uncertainty in choosing robust samples that are navigable in the presence of sensor and dynamics noise, and (3) high-dimensional, complex, realworld environment representations in the form of images of office building floor plans (Fig. 7). This problem follows the formulation presented in [35], [36], in which a differential drive robot navigates an office environment to a local goal via a reinforcement-learned policy. The policy takes as input a vector from the current state to the goal and a 64-wide, 220 • field-of-view to see the local environment along with a realistic noise model. This is incorporated into the PRM framework by connecting local samples, thus allowing more intelligent local planning. These edges are added if the local planner is able to perform the connection 100% of the time over 20 trials, thus requiring samples to be chosen robustly to the local policy and noise. The value of λ was set as 15 (note the increase due to the complexity of the problem and number of narrow passages). The critical training data is visualized in Fig. 7 along with the input to the network (a 100×100 pixel image over a 10m×10m area). The network used on this data trained over three different office floor plans, with a total of 50k samples. We note that due to the scarcity of environments and complexity of input for the full environments, previous learned methods [4], [19] that require full environment input cannot generalize. Further-  more, approaches that seek to find samples near obstacles or narrow passages [5] are likely to both select difficult to reach states given the problem's stochasticity and not extract the key features of the problem given the clutter. Fig. 8 shows the results of Critical PRM on a new building. Though the building has not been seen before, the neural network is able to extract the importance of features like hallways and ignore areas around cubicles. Note that the critical points are not always in doorways as one may expect for a straight line policy, as the intelligent local policy is often able to robustly enter or exit such narrow passages. In terms of success rate and cost, Critical PRM is approximately 5 times faster to compute. We also compare to if the critical points were learned only considering straight line (SL) connections (though at runtime, the robot still executes the learned policy). This compares a method that cannot take the local planner into account when learning to sample. The straight line connections still outperform PRM, but are approximately 3 times slower than Critical PRM.

D. Physical Experiments
Lastly, we implement the approach on a physical robot, a Fetch operating in an indoor environment using SLAM (see   9). The robot observes and localizes against the environment with a 220 • field-of-view single plane lidar observation and navigates locally using the reinforcement learned policy described in Section V-C. The input to the criticality network is a 80×80 pixel image of the environment. The network was trained on 5k samples from a different lidar-mapped environment.
The experiments are shown in Fig. 9, for which 6 longrange trajectories are shown traversing the space. The Critical PRM trajectories in Fig. 9c were generally more direct and robust than their uniform PRM counterpart in Fig. 9b. To this end, the cyan (circled) path in Figs. 9c-9b was repeated five times, of which the Critical PRM trajectory was successful 100% of the time versus 40% for the uniform PRM. This improved performance was primarily a result of the Critical PRM using waypoints only when necessary, allowing more spread out waypoints (e.g., when the environment was less cluttered), allowing the RL policy to better adjust to stochasticity in operation.

VI. CONCLUSIONS AND FUTURE WORK
Conclusions. In this paper, we have presented a method towards learning critical samples for sampling-based robot motion planning and using them more heavily. Specifically, we identify critical samples via betweenness centrality-a graph theoretic measure of a node's importance to shortest paths-and learn to predict them via a neural network that takes local workspace information as input. For a new planning problem, these critical samples are then sampled from more frequently and connected globally (along with a bed of uniform samples locally connected). The result is a hierarchical roadmap we term the Critical PRM. The algorithm is demonstrated to achieve up to a three order of magnitude improvement in computation time required to achieve a success rate and cost due to both the selection of better samples and the use within a hierarchical roadmap. The method is further demonstrated to be general enough to handle real-world data, state space sampling, and complex local policies. Lastly, Critical PRM is shown on robot to compute lower-cost and more-robust trajectories.
Future Work. In the future we plan to extend this work in several ways. First, we plan to show its ability to identify samples for differentially constrained systems and robot arms. Second, we plan to investigate how critical samples may be clustered to identify critical regions and reduce overlap between samples. Finally, we plan to use these results within a hierarchical RL framework by biasing the high level policy towards more critical subgoals.