Skip to content

Commit 2a53e67

Browse files
committed
Add Bresenham line algorithm description to docs
1 parent c3ffc08 commit 2a53e67

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

docs/modules/5_path_planning/grid_base_search/grid_base_search_main.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ Theta\* algorithm
8989

9090
This is a 2D grid based shortest path planning with Theta star algorithm.
9191

92-
It offers an optimization over the A* algorithm to generate any-angle paths. Unlike A star, which always assigns a new node’s parent as the node it came from, Theta star checks for a line-of-sight (unblocked path) from an earlier node (typically the parent of the previous node) and assigns it directly if visible. This reduces cost by replacing staggered segments with straight lines.
92+
It offers an optimization over the A star algorithm to generate any-angle paths. Unlike A star, which always assigns the current node as the parent of the successor, Theta star checks for a line-of-sight (unblocked path) from an earlier node (typically the parent of the current node) to the successor, and directly assigns it as a parent if visible. This reduces cost by replacing staggered segments with straight lines.
93+
94+
Checking for line of sight involves verifying that no obstacles block the straight line between two nodes. On a grid, this means identifying all the discrete cells that the line passes through to determine if they are empty. Bresenham’s line algorithm is commonly used for this purpose. Starting from one endpoint, it incrementally steps along one axis, while considering the gradient to determine the position on the other axis. Because it relies only on integer addition and subtraction, it is both efficient and precise for grid-based visibility checks in Theta*.
9395

9496
As a result, Theta star produces shorter, smoother paths than A star, ideal for ground or aerial robots operating in continuous environments where smoother motion enables higher acceleration and reduced travel time.
9597

@@ -101,6 +103,7 @@ Reference
101103
++++++++++++
102104

103105
- `Theta*: Any-Angle Path Planning on Grids <https://cdn.aaai.org/AAAI/2007/AAAI07-187.pdf>`__
106+
- `Bresenham's line algorithm <https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm>`__
104107

105108
Code Link
106109
+++++++++++++

0 commit comments

Comments
 (0)