Table of Contents
Fetching ...

An Efficient Solution to the 2D Visibility Problem in Cartesian Grid Maps and its Application in Heuristic Path Planning

Ibrahim Ibrahim, Joris Gillis, Wilm Decré, Jan Swevers

TL;DR

This work addresses efficient 2D visibility computation on grid maps for robotics by formulating visibility as a transport quantity solved with a linear first-order hyperbolic PDE using an entropy-preserving upwind scheme. The method computes a per-cell visibility in $[0,1]$ in $O(n)$ time and $O(n)$ memory, independent of obstacle count, and extends to curves and 3D to produce curvilinear visibility. A key contribution is embedding the visibility field as a heuristic for a deterministic, local-minima-free, any-angle path planner that iteratively places waypoints in barely-visible regions to achieve full visibility; results show substantial speedups over ray-casting (up to $100\times$ on large grids) and practical planning performance on sizable mazes. The approach enables real-time visibility-aware planning with low memory footprints and opens avenues for localization, sensor placement, and exploration driven by visibility, all supported by open-source implementations.

Abstract

This paper introduces a novel, lightweight method to solve the visibility problem for 2D grids. The proposed method evaluates the existence of lines-of-sight from a source point to all other grid cells in a single pass with no preprocessing and independently of the number and shape of obstacles. It has a compute and memory complexity of $\mathcal{O}(n)$, where $n = n_{x}\times{} n_{y}$ is the size of the grid, and requires at most ten arithmetic operations per grid cell. In the proposed approach, we use a linear first-order hyperbolic partial differential equation to transport the visibility quantity in all directions. In order to accomplish that, we use an entropy-satisfying upwind scheme that converges to the true visibility polygon as the step size goes to zero. This dynamic-programming approach allows the evaluation of visibility for an entire grid orders of magnitude faster than typical ray-casting algorithms. We provide a practical application of our proposed algorithm by posing the visibility quantity as a heuristic and implementing a deterministic, local-minima-free path planner, setting apart the proposed planner from traditional methods. Lastly, we provide necessary algorithms and an open-source implementation of the proposed methods.

An Efficient Solution to the 2D Visibility Problem in Cartesian Grid Maps and its Application in Heuristic Path Planning

TL;DR

This work addresses efficient 2D visibility computation on grid maps for robotics by formulating visibility as a transport quantity solved with a linear first-order hyperbolic PDE using an entropy-preserving upwind scheme. The method computes a per-cell visibility in in time and memory, independent of obstacle count, and extends to curves and 3D to produce curvilinear visibility. A key contribution is embedding the visibility field as a heuristic for a deterministic, local-minima-free, any-angle path planner that iteratively places waypoints in barely-visible regions to achieve full visibility; results show substantial speedups over ray-casting (up to on large grids) and practical planning performance on sizable mazes. The approach enables real-time visibility-aware planning with low memory footprints and opens avenues for localization, sensor placement, and exploration driven by visibility, all supported by open-source implementations.

Abstract

This paper introduces a novel, lightweight method to solve the visibility problem for 2D grids. The proposed method evaluates the existence of lines-of-sight from a source point to all other grid cells in a single pass with no preprocessing and independently of the number and shape of obstacles. It has a compute and memory complexity of , where is the size of the grid, and requires at most ten arithmetic operations per grid cell. In the proposed approach, we use a linear first-order hyperbolic partial differential equation to transport the visibility quantity in all directions. In order to accomplish that, we use an entropy-satisfying upwind scheme that converges to the true visibility polygon as the step size goes to zero. This dynamic-programming approach allows the evaluation of visibility for an entire grid orders of magnitude faster than typical ray-casting algorithms. We provide a practical application of our proposed algorithm by posing the visibility quantity as a heuristic and implementing a deterministic, local-minima-free path planner, setting apart the proposed planner from traditional methods. Lastly, we provide necessary algorithms and an open-source implementation of the proposed methods.
Paper Structure (13 sections, 13 equations, 5 figures, 2 algorithms)

This paper contains 13 sections, 13 equations, 5 figures, 2 algorithms.

Figures (5)

  • Figure 1: The 2D visibility polygon $\mathcal{U}$ computed using our algorithm. The robot position is the light source shown as a yellow dot. The white region is visible to the robot, constituting the visibility polygon. Dark regions are invisible to the robot. Obstacles are shown in red. $1000\times1000$ grid.
  • Figure 2: Log-log plot of average compute time of Alg. \ref{['alg:VisibilityAlgorithm']} (left) with respect to the grid size $n_{x}\times{}n_{y}$ and in comparison to that of ray-casting. Error bars are insignificant/negligible over the 20 repetitions of each experiment. The speedup achieved using Alg. \ref{['alg:VisibilityAlgorithm']} over ray-casting is illustrated to the right.
  • Figure 3: Quiver plot on left showing the vector field, centered around the light source, that governs the resulting behaviour of the curves-of-sight. Resulting scalar field is $\frac{y}{2.5\times x}$. The resulting curvilinear polygon is illustrated on the right with the source of light being the yellow dot.
  • Figure 4: Progression of the path planner in six steps. Starting point is in green at the bottom left, whereas the target point is the blue one at the top right. Points in cyan are intermediate waypoints, whereas the points and lines in magenta constitute the final path. Obstacles are shown in red.
  • Figure 5: Visibility heuristic planner solution in mazes. Start point at top center in green, target point at bottom center in blue, intermediate exploration waypoints in cyan, and final path in magenta. Obstacles in red.