← Back to Blog Feed
Code
2026-09-20
12 min read

Autonomous Motion Planning: Comparing A* Grid Search with Continuous RRT

Autonomous Motion Planning: Comparing A* Grid Search with Continuous RRT

Autonomous Motion Planning: Comparing A* Grid Search with Continuous RRT

When developing autonomous delivery rovers, drones, or automated logistics carts for Kone Warp, navigation is divided into two primary tiers:

  1. Global Planning: Finding the shortest collision-free topological path across known city streets or warehouse maps.
  2. Local Motion Planning: Steering safely through continuous space around dynamic obstacles (pedestrians, vehicles, unexpected roadblocks) while adhering to non-holonomic vehicle kinematics.

Two foundational algorithmic families dominate this domain: Discrete Heuristic Search (A∗A^*) and Sampling-Based Motion Planning (RRT).


1. Discrete Heuristic Search: A∗A^* and Jump Point Search

A∗A^* evaluates nodes on a discretized graph (such as a 2D occupancy grid) using the cost evaluation function:

f(n)=g(n)+h(n)f(n) = g(n) + h(n)

Where:

Strengths of A∗A^*:

Limitations of A∗A^*:


2. Sampling-Based Planning: RRT and RRT*

Instead of discretizing space into uniform grids, Rapidly-exploring Random Trees (RRT) (LaValle, 1998) sample points randomly from the continuous configuration space C\mathcal{C}:

  1. Sample a random configuration qrand∈Cfreeq_{\text{rand}} \in \mathcal{C}_{\text{free}}.
  2. Find the nearest existing tree node qnear∈Tq_{\text{near}} \in T.
  3. Extend a new node qnewq_{\text{new}} from qnearq_{\text{near}} toward qrandq_{\text{rand}} by a fixed step size Δq\Delta q.
  4. Check collision validity along the trajectory segment. If clear, add qnewq_{\text{new}} and the edge (qnear,qnew)(q_{\text{near}}, q_{\text{new}}) to the tree.
  5. Repeat until qnewq_{\text{new}} is within reach of the goal qgoalq_{\text{goal}}.
import random
import math

class RRTPlanner:
    def __init__(self, start, goal, obstacles, step_size=5.0):
        self.start = start
        self.goal = goal
        self.obstacles = obstacles # List of (x, y, radius)
        self.step_size = step_size
        self.tree = [start]
        self.parents = {start: None}

    def plan(self, max_iters=5000):
        for _ in range(max_iters):
            # Goal biasing: 10% chance to sample exact goal directly
            q_rand = self.goal if random.random() < 0.1 else (random.uniform(0, 100), random.uniform(0, 100))
            
            # Find nearest node in tree
            q_near = min(self.tree, key=lambda n: math.dist(n, q_rand))
            
            # Step toward sample
            angle = math.atan2(q_rand[1] - q_near[1], q_rand[0] - q_near[0])
            q_new = (q_near[0] + self.step_size * math.cos(angle),
                     q_near[1] + self.step_size * math.sin(angle))
            
            if self.is_collision_free(q_near, q_new):
                self.tree.append(q_new)
                self.parents[q_new] = q_near
                
                if math.dist(q_new, self.goal) <= self.step_size:
                    self.parents[self.goal] = q_new
                    return self.reconstruct_path(self.goal)
        return None

3. Head-to-Head Comparison

MetricA∗A^* SearchRRT / RRT*
Space RepresentationDiscretized Grid / GraphContinuous Configuration Space C\mathcal{C}
High Dimensions (D > 3)Fails due to state space explosionExcels; scales smoothly into high dimensions
CompletenessResolution CompleteProbabilistically Complete
OptimalityOptimal for grid graphRRT: Suboptimal; RRT*: Asymptotically Optimal
Kinodynamic ConstraintsHard to incorporateNaturally supports differential equations in edge generation

Applied Autonomous Engineering at Kone Warp

In the Kone Warp Autonomous Fleet curriculum, our engineers combine both paradigms: using hierarchical coarse A∗A^ or H3-hexagonal routing coupled with kinodynamic RRT for obstacle avoidance in our Geospatial Dispatch & Real-Time Logistics Track.

Register at Kone School

Cohort positions are open. Build physical robotics firmware, structured web code, and master AI pathways through hands-on project systems.

Join Cohort (WhatsApp)