Skip to content

Don-Withana/Grid-Path-Planning-Robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grid-Path-Planning-Robot

An implementation of grid-based path planning algorithms for navigating robots through obstacles.

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Efficient Path Planning for Autonomous Robot

Table of Contents
  1. About The Project
  2. Installation
  3. Features
  4. Usage
  5. Example Output
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgments

About The Project

This project is a Java-based application designed to simulate a grid-based path planning scenario. The program allows users to define the size of a grid, place a robot and an end point, and then calculates the shortest path from the robot's starting position to the end point while avoiding obstacles placed randomly on the grid based on Breadth-First Search (BFS) algorithm.

Built With

Java: The core programming language used for developing the grid path planning program, leveraging object-oriented principles for efficient pathfinding and grid management.
Console-Based UI: Utilizes Java’s standard input and output libraries to provide an interactive console-based user interface, enabling intuitive user input and visual grid representation.

java

Features

  • Customizable Grid Size: Users can define the number of rows and columns for the grid (between 5 and 50).
  • Obstacle Placement: The program randomly places obstacles on the grid while ensuring there is always a possible path from the robot to the end point.
  • Pathfinding Algorithm: Utilizes a breadth-first search (BFS) algorithm to find the shortest path from the robot to the end point.
  • Interactive Console Input: User-friendly prompts to input grid size, robot starting position, and end point position.
  • Visual Grid Display: Displays the initial grid layout with coordinates, the robot's path, and obstacles.

Installation

To run this project, ensure you have the following prerequisites:

  • Java Development Kit (JDK) 8 or higher
  • IDE or text editor of your choice (e.g., IntelliJ IDEA, Eclipse, VSCode)

Steps to Set Up the Project

  1. Clone the Repository:

    git clone https://github.com/yourusername/GridPathPlanning.git
    cd GridPathPlanning
  2. Compile the Java Files:

    javac Main.java Grid.java RobotState.java
  3. Run the Program:

    java Main

Usage

Once the program is running:

  1. Input the Grid Dimensions:

    • Enter the number of rows and columns (both between 5 and 50).
  2. Position the Robot:

    • Enter the starting position for the robot (within the grid bounds).
  3. Set the End Point:

    • Enter the coordinates for the end point (must be different from the robot's start position).
  4. View the Output:

    • The program will display the grid, indicating the shortest path from the robot to the end point, avoiding obstacles.

Example Output

★★★ Welcome to the Grid Path Planning Program ★★★ 

★ Enter the number of rows (between 5 and 50): 10
★ Enter the number of columns (between 5 and 50): 10

★ Enter the position of the robot:
    Row: 0
    Column: 0

★ Enter the position of the end point:
    Row: 9
    Column: 9

+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
|  (0,0) |  (0,1) |  (0,2) |  (0,3) |  (0,4) |  (0,5) |  (0,6) |  (0,7) |  (0,8) |  (0,9) |
...

Contributing

Contributions are welcome! If you have ideas for new features or bug fixes, please fork the repository and submit a pull request. Here’s how:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License. See the LICENSE.txt for more details. This means you can freely use, modify, and distribute the code, but please include the license notice in any copies or substantial portions of the software

Contact

Have questions, suggestions, or just want to chat about the project? Reach out to me!

Name: Himan Withana
Email: [email protected]

Acknowledgments

Special thanks to the following resources and tools that have been invaluable in the creation and development of this project:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages