Skip to content

ritesh27gole/robo_algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 

Repository files navigation

Algorithms in Robotics

General software problems in robotics solved using fundamental algorithms

Rapidly exploring Random Trees (RRT) Algorithm:

RRT is one of most popular algorithms used for path planning for autonomous vehicles, mobile robots as well as robotic manipulators

Open the "RRT" Folder to find "rrt.py" script and "occupancyGrid.npy" array which resembles a map of room consisting of obstacles

Firstly clone this repository using:

git clone https://github.com/ritesh27gole/robo_algorithms.git

Dependencies:

Tested for:

  1. Python (version: 3.8.10)
  2. Numpy (version: 1.24.2)
  3. Matplotlib (version: 3.7.0)

You can download the dependencies by entering the following command in terminal

cd <-path to the RRT folder->
pip install -r requirements.txt

How to run:

Download the "RRT" folder and copy the path to this folder

In terminal:

cd <-path to the RRT folder->
python3 rrt.py

This is the pre-loaded occupancy grid: occupancy_grid

Enter the starting as goal point coordinates as shown below, don't put coordinates that would end up on obstacles terminal_screenshot

After running the script we get: RRT_Algorithm Here nodes highlighted by green and blue ring respectively are the start and goal, whereas the dotted green line gives the path found by the algorithm

Eight puzzle solver using A* algorithm:

Solvability

We first find the amount of moves required to move the blank from position in initial state to position in goal state. We the find if the number of moves are even or odd. This is called the "parity" of the puzzle. Then we find the sum of total number of inversions and find whether it is even or odd, this is said to be the parity of initial state. If both the puzzle parity and initial state parity are same, that means the puzzle is solvable, otherwise it is not solvable.

Comparison of different heuristics used:

Figure_1

About

General software problems in robotics solved using fundamental algorithms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages