Visibility PRM

Andrew Olson
Kevin Crotty
Com S 476, Final Project

Project Description

Our project is an implementation of the Visibility Probabilistic Roadmap (Visibility PRM) proposed by T. Simeon, J.P. Laumond, and C. Nissoux. The Visibility PRM drastically reduces the number of nodes in the roadmap, which allows better performance due to the smaller search space when building edges.

Another advantage that Visibility PRM offers is that it can provide an intelligent termination condition, based on the probabilistic coverage of Cfree. Most other algorithms in the MSL simply loop through a fixed number of iterations before terminating. They have no gauge of the coverage of Cfree because they add nodes to their trees indiscriminately. Visibility PRM, in contrast, only adds nodes when they are not straight-line visible to any other nodes (guards) or connect two previously separate connected components (connectors). Simeon et al. propose terminating after the number of failures after the insertion of a new guard node exceeds a set limit. We modified this to the number of failures after any node (guard or connector) exceeds a set limit. We used the previously existing "NumNodes" variable as this limit. Consequently, NumNodes should be set much lower for Visibliity PRM than other algorithms. In our experimentation, we found that most guards were added to the PRM relatively quickly, and the connectors were the limiting factor in the graphs completeness.


Relative Performance of VisPRM, PRM, RRTExtExt, and RRTConCon

We tested examples from homework 3 and other examples that show illuminating differences between VisPRM and other algorithms. It is worth noting that times for PRM algorithms are for their Construct stage, while times for RRT algorithms are for their Plan stage (they have no construct). We repeatedly constructed until a solution for the particular problem was found. The Plan phase for the PRM algorithms was always much much less than the construct time, which would be much quicker than the RRT algorithms. Although PRM and RRT based algorithms have different fundamental purposes, the comparisons below should still prove fruitful.


example: fpd3 (2D)
A straight-forward local minimum example, VisPRM actually outperforms RRTConCon. It uses 1/3 the nodes and slightly lower number of collision tests.
Planner PlannerDeltaT NumNodes Nodes Edges Collision Tests Components Comments Time
VisPRM 1 10 7 12 1,054 1 - 0
PRM 1 10 73 432 1,416 1 - .01
RRTExtExt 1 - 413 - 29,000 - - .15
RRTConCon 1 - 21 - 1,294 - - .01


example: cross (2D)
This is a complicated, 2D example where rotation plays an important role. VisPRM's lack luster performance is attributed to the large number of sharp rotations required. The pathologic case described on page 7 of Simeon et al may be at play. VisPRM mapped out most of its guards quickly, but had trouble finding just the right spot for connectors. This phenomenon is described more specifically in the next example.
Planner PlannerDeltaT NumNodes Nodes Edges Collision Tests Components Comments Time
VisPRM 0.25 4 163 282 446,000 22 - 140.3
PRM 0.25 2,000 549 3,080 145,000 30 - 46.7
RRTExtExt 0.25 - 4330 - 19,600 - - 15.14
RRTConCon 0.25 - 220 - 2,860 - - 0.89


example: 2dpoint2 (2D)
This example resembles a small maze. The sharp corners are somewhat problematic for VisPRM, since the corners typically require that a connector node be placed right at the corner. This can be visually examined in the accompanying graphics below.
Planner PlannerDeltaT NumNodes Nodes Edges Collision Tests Components Comments Time
VisPRM 1 100 60 118 253,000 1 - 5.13
PRM 1 1,000 1979 26,200 188,000 21 - 4.82
RRTExtExt 1 - 1403 - 209,000 - - 2.34
RRTConCon 1 - 753 - 71,900 - - 0.74


example: cage (3D)
A classic "piano movers" type problem. VisPRM exhibited good performance for a general case problem solver, and actually beating RRTExtExt in running time. PRM choked, and was given up on.
Planner PlannerDeltaT NumNodes Nodes Edges Collision Tests Components Comments Time
VisPRM 0.25 10 103 186 319,000 10 - 34.5
PRM 0.25 1,000 230,000 47,300 731,000 5470 failed 309
RRTExtExt 0.25 - 11,200 - 36,400 - - 133
RRTConCon 0.25 - 549 - 23,500 - - 2.15


example: square rings (3D)
A simple 3D problem with mostly rotational motion requirements. VisPRM did well compared to other algorithms.
Planner PlannerDeltaT NumNodes Nodes Edges Collision Tests Components Comments Time
VisPRM 0.25 10 90 172 1,040,000 4 - 57.6
PRM 0.25 1,000 143,000 99,800 1,470,000 139 - 129
RRTExtExt 0.25 - 5,450 - 14,300 - - 24.2
RRTConCon 0.25 - 1,10 - 2,310 - - 0.35



Illustrated Examples

We implemented a custom 2D Graph Projection for the Visibility PRM. Guards are drawn as red dots, connectors are drawn as green dots, and edges, as always, are blue lines.

2Dmaze4rectangle

This is a difficult example that required a complicated visibility PRM to find a solution. Notice Visibility PRM's relatively dense cluster of nodes around the corners of the maze.
Obstacles
PRM
Visibility PRM

2Dpoint2

Another maze. Visibility PRM provides a nearly optimal PRM, with very few extraneous nodes and edges. Note that there must be a node at each corner. These were typically the last nodes to be added due to the low probability of randomly generating them.
Obstacles
PRM
Visibility PRM

fdp2

This comparison is a potent illustration of the difference in density between regular PRM and Visibility PRM. A drawback is that Visibility PRM generates obviously non-optimal solution paths.
Obstacles
PRM
Visibility PRM



Implementation Files and Notes

These file should reside in the "msl-1.2/programs/" or an equivalent location. They are modeled off of and copied from the implementations of PRM and slide.

Source Code:

visibility.C

This is copied almost directly from slide.C. It makes a few high level calls to bring up a gui.

visprm.C

Inherits from class PRM to define VisPRM. Overloads function Construct with substantial changes. Overloads function Plan with minimal change (commented within file). Adds custom DrawGraphs function for displaying 2D visibility PRMs.

visprm.h

The header file to accompany visprm.C. Nothing too special here.

Makefile

A few lines added to compile the visibility executable.