Back to Projects

Improved Bi-directional RRT* for Robot Path Planning

RRT* Path Planning Demo

Project Overview

This project focused on enhancing the Rapidly-Exploring Random Tree (RRT) algorithm for mobile robot path planning by implementing an improved bi-directional variant in Python. The goal was to overcome standard RRT’s limitations – such as suboptimal and jagged paths – by integrating goal bias, heuristic guidance, and a post-processing path optimization step. The improved bi-directional approach grows two trees simultaneously (from the start and goal), connects them, and then smooths the resulting trajectory. This yields significantly shorter, smoother paths, enabling faster and more reliable real-time navigation in complex environments.

Key Features

Development Process & Challenges

  1. Bidirectional Growth: Implementing two trees required designing criteria for when and how to connect them. Fine-tuning the connection criteria was essential to balance speed and success rate.
  2. Incorporating Goal Bias: We introduced a probability that the random sampler selects points near the goal. Tuning this probability was critical—too high and the algorithm becomes greedy, too low and it behaves like a standard RRT.
  3. Path Smoothing: A post-processing step iterates through the found path, checking for direct connections between non-consecutive waypoints. If the direct path is collision-free, intermediate waypoints are removed, yielding a smooth trajectory.
  4. Dynamic Obstacle Avoidance: Integrating the global planner with a local dynamic planner allowed the robot to adjust its path in real time when obstacles appeared. The challenge was ensuring seamless switching between global planning and local re-planning.
  5. Performance Optimization: Python’s flexibility allowed us to vectorize many computations, ensuring the algorithm runs fast enough for real-time applications without compromising on path quality.

Technologies Used

Achievements & Metrics

Algorithm Illustration

Algorithm Illustration

Goal Bias

import numpy as np

# Sample point with goal bias
def sample_point(goal, X_max, Y_max, goal_bias=0.1):
    if np.random.rand() < goal_bias:
        return goal
    return np.array([np.random.uniform(0, X_max), np.random.uniform(0, Y_max)])

Resources