General software problems in robotics solved using fundamental algorithms
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
Tested for:
- Python (version: 3.8.10)
- Numpy (version: 1.24.2)
- 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
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:
Enter the starting as goal point coordinates as shown below, don't put coordinates that would end up on obstacles
After running the script we get: 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
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.