Coder Social home page Coder Social logo

astar_turtlebot's Introduction

astar_turtlebot

This project contains A* path planning algorithm implementation for Turtlebot3.

TurtleBot3 planning using A-Star using Differential constraints

File Structure (A star differntial drive directory)

├── Code
|  ├── astardd.py
|  ├── Node.py
|  ├── helper.py
├── Results
|  |  ├── astar_output.mp4
|  |  ├── output.png

File Structure (A star Turtle Bot directory)

├── 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

Obstacle map

A-star Output

Results

Authors

Rahul Karanam Harika Pendli

Introduction to the Project

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.

Software Required

For this project you will need to install the rospy, numpy, heapq(Priority queue for A*), matplotlib and gazebo to run the simulations.

Simulation platforms used

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.

Instructions for running the code

A-star with Differential Driver

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.

A-star Turtlebot

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.

A-star Turtlebot 3 Output

Videos:

Drive Link : https://drive.google.com/drive/folders/1selsuN77piMY9i_CcUnBPz3N9GBXBf1B?usp=sharing

astar_turtlebot's People

Contributors

karanamrahul avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.