This repo brings you robust, optimal path planning for non-holonomic mobile robots (TurtleBot3) using RRT-A* and Informed RRT*—tested in both 2D and Gazebo. Follow the steps below to get rolling!
- For more details and project breakdown, please check out my blog: link
- Ubuntu 18.04
- ROS Melodic
- Gazebo 9.1
- Turtlebot3 Packages
Make sure you have these installed (use pip
or apt
as needed):
import numpy
import matplotlib.patches
import math
import rospy
import time
import heapq
import random
import sys
import pygame
mkdir -p planning_ws/src
cd planning_ws
catkin_make
source devel/setup.bash
# Clone TurtleBot3 repositories
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git src/turtlebot3
git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git src/turtlebot3_msgs
git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git src/turtlebot3_simulations
cd ..
catkin_make
-
Download the package:
Placeproject_5
in yourplanning_ws/src
directory. -
Build the package:
catkin_make
-
Source your workspace:
source devel/setup.bash
-
Set the TurtleBot3 model:
export TURTLEBOT3_MODEL=burger
-
Make the node executable:
cd src/project_5/nodes chmod +x task
-
Launch the node and Gazebo environment:
roslaunch project_5 proj.launch
-
Configure at runtime:
- Enter clearance value (recommended:
0.03
to0.07
) - Enter RPM value when prompted (suggested:
10
)
- Enter clearance value (recommended:
-
Watch the magic:
- The node will initialize in a few seconds.
- TurtleBot3 will autonomously navigate to the goal in about a minute.
You’re all set to explore optimal path planning with RRT-A* and Informed RRT* on your TurtleBot3. For troubleshooting or more details, check the code comments and documentation.
Pro Tip:
Tweak the clearance and RPM values to see how your TurtleBot3 handles different environments and constraints!
Happy path planning! 🚗💨