This project contains A* path planning algorithm implementation for Turtlebot3.
TurtleBot3 planning using A-Star using Differential constraints
├── Code
| ├── astardd.py
| ├── Node.py
| ├── helper.py
├── Results
| | ├── astar_output.mp4
| | ├── output.png
├── src/scripts
| ├── astardd.py
| ├── astar_tb3.py
| ├── Node.py
| ├── helper.py
├── launch
| ├── demo.launch
├── world
| | ├── map.world
├── results
| | ├── turtle_out1.mp4
| | ├── turtle_out2.mp4
| ├── CMakeList.txt
| ├── package.xml
Rahul Karanam Harika Pendli
In this project, the A-star motion planning algorithm was used on ROS Turtlebot 3 to navigate in a configuration space consisting of static obstacles.
For this project you will need to install the rospy, numpy, heapq(Priority queue for A*), matplotlib and gazebo to run the simulations.
For the simulation we used the gazebo and turtlebot3 package. The world file is located in the world folder and defines the setup of the gazebo environment.
git clone --recursive https://github.com/karanamrahul/astar_turtlebot.git
cd astar_differential
python3 astardd.py
This will pop-up the terminal where you need to input these values.
x coordinate for the start node(in meters"):
y coordinate for the start node(in meters):
orientation for the start node(in radians):
x-coordinate of the goal node(in meters):
y-coordinate of the goal node(in meters):
Enter the first value of RPM:
Enter the second value of RPM:
The Output will be a visualization of the path explored and optimal path generated by A* algorithm.
For running the code please follow the detailed instructions given below. First we create a catkin workspace for our project
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin_make
After creating your catkin workspace change your directory to src and clone this repository
cd ~/catkin_ws/src
git clone --recursive https://github.com/karanamrahul/astar_turtlebot.git
$ Move your astar_turtlebot directory to ~/catkin_ws/src
cd ../
catkin_make
After cloning the repository lets create an executable for our .py file that contains the code to run our program.
cd ~/catkin_ws/src/astar_turtlebot/src
chmod +x astar_tb3.py
catkin_make
Once all the above steps have been performed lets source our catkin workspace and then run the program
source ./devel/setup.bash
roslaunch astar_turtlebot demo.launch x_init:=8 y_init:=5 theta_init:=0 x_final:=7 y_final:=7 rpm1:=15 rpm2:=10
roslaunch astar_turtlebot demo.launch x_init:=2 y_init:=4 theta_init:=0 x_final:=8 y_final:=8 rpm1:=15 rpm2:=10
After entering all these values in the terminal, the A-star algorithm finds the optimum path between the entered start node and goal node. Please close the matplotlib figure in order for the publisher to publish. (Don't forget to close the figure). Then the "dvx, dvy, dw" values, which are the velocities in x-direction and y-direction and angular velocity along z-axis are published on the ROS Topic of the Turtlebot to move it from one point to another point.
Drive Link : https://drive.google.com/drive/folders/1selsuN77piMY9i_CcUnBPz3N9GBXBf1B?usp=sharing