Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Custom A* Global Planner for TurtleBot3 (ROS2 Nav2)

This project implements a customized A* global planner for TurtleBot3 using ROS2 Nav2, designed to generate smoother, safer, and more cost-aware paths compared to the default Nav2 A* planner. The custom planner introduces heuristic weighting and obstacle cost penalties to improve navigation near obstacles while maintaining efficiency and stability.

Features

ROS2 Nav2 compatible global planner plugin Heuristic-weighted cost function: balances goal distance and obstacle cost Safe, smooth path generation: avoids paths too close to inflated obstacles Tunable parameters: heuristic_weight and obstacle_penalty for flexible tuning Performance Monitoring Nodes: to evaluate path efficiency, goal reach time, and success rate

Package Structure

custom_a_star_planner/
├── include/custom_a_star_planner/
│   └── custom_a_star_planner.hpp
├── src/
│   └── custom_a_star_planner.cpp
├── config/
│   └── nav2_params.yaml
├── CMakeLists.txt
├── package.xml
└── planner_server.xml

Requirements

Before running this package, ensure you have: ROS2 Humble (or compatible) installed TurtleBot3 packages downloaded and sourced A valid map file (e.g., map.yaml) generated using SLAM

Installation

cd ~/turtlebot3_ws/src
git clone https://github.com/pranavak0201/custom_a_star.git

Step 2: Build

cd ~/turtlebot3_ws
colcon build --symlink-install
source install/setup.bash

Step 3: Running the Simulation

ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py

Step 4: Launch Navigation2 with the custom A* planner:

ros2 launch turtlebot3_navigation2 navigation2.launch.py \
  use_sim_time:=True \
  map:=$HOME/map.yaml \
  params_file:=$HOME/turtlebot3_ws/src/custom_a_star_planner/nav2_params.yaml

Step 5:Run the performance monitor node:

ros2 run performance_monitor performance_monitor

Step 6:Send navigation goals:

ros2 run performance_monitor goal_sender

Results Summary

Smoother motion: reduced sharp turns and jerky behavior Better obstacle clearance: maintains safer distance from inflated obstacles Reduced local planner corrections: improved navigation consistency

Author

Pranav K

LinkedIn: https://www.linkedin.com/in/pranav-kalyan-2aa12a343

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages