Code Monkey home page Code Monkey logo

sudharsan10 / maze-solver-robot Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 928 KB

This is a program to drive a robot through a maze using Depth First Search as it's path-planning algorithm. The program is interfaced with Micromouse simulator for visualizing the maze and the robot in real-time.The concepts of object-oriented programming, inheritance, and dynamic polymorphism were used to develop this project.

Home Page: https://www.iamsudharsan.com/maze-solver-robot

CMake 11.28% C 13.61% C++ 54.54% Makefile 20.56%
maze micromouse-simulator mazesolver cpp robot depth-first-search maze-solver-simulation

maze-solver-robot's Introduction

Social-header

A Maze Solver Robot project.
Explore Maze Solver Robot docs »

Report bug · Request feature

Maze solver Robot is a program to drive a robot through a 16x16 maze using Depth First Search as it's path-planning algorithm. The program is integrated with Micro-mouse simulator a.k.a mms for visualizing the maze and the robot in real-time. The concepts of object-oriented programming, inheritance, and dynamic polymorphism were used to develop this project.

Table of contents

Pre-requisites

This app depends on Qt5 libraries. We can setup this up using apt-get package manager (for Debian linux) or conda virtual environment tool.

  • setting up using pip installer
    sudo apt-get install qt5-default
    

Quick start

  • Clone the repo in terminal using following command:

    git clone https://github.com/Sudharsan10/maze-solver-robot.git
    

    or download github repo as .zip and extract it in the desired location.

  • If you would like to use latest micro-mouse simulator and maze files then do the following,

    git clone https://github.com/mackorone/mms.git
    
    git clone git https://github.com/micromouseonline/mazefiles.git
    

    Note: To install and setup anaconda environment follow this link first and visit this section again after successfully setting up the conda environment.

Run instructions

To run the app, first finish the pre-requisites mentioned above, then

  • Navigate to the root directory of the cloned repo and start the Micro-Mouse Simulator(mms) using the following command:

    cd mms/src
    
    qmake && make
    
    ../../mms/bin/mms
    

    The last command will fire up the micro-mouse simulator.

If every requirement is fulfilled a window should open as follow,

start-screen

Status

Documentation Status Maintenance Doc Tool made-with-C++ pyqt-version made-with-Markdown contributors Logo Flow-charts

What's included

Within the download you'll find the following directories and files, logically grouping the classes under src directory. mazefiles and mms directories are submodules based out of third party repo. You'll see something like this:

maze-solver-robot/
├── mazefiles/ ...
├── mms/ ...
├── docs/ ...
├── img/ ...
├── src/
|   ├── Algorithm/ ...
|   ├── API/ ...
|   ├── LandBasedRobot/ ...
|   ├── LandBasedTracked/ ...
|   ├── LandBasedWheeled/ ...
|   └── Maze/ ...
├── main.cpp
├── CMakeLists.txt
└── README.md

Documentation

For documentation related to the code you can refer the one provided under docs directory. A general outline explanantion with the help of flowcharts and images are provided in the following subsections,

Contents:

  1. How to use
  2. Class Structure
  3. Depth First Search flowchart
  4. Node Object Data Structure
  5. Implementation
  6. Project Execution

1 How to use

Enter the initial state of the puzzle and goal state of the puzzle as shown in the fig below.

  • Click on the + icon from the config section, you will get a window like this,

  • Enter all the fields in the respective locations,

    • Name: Any name of user choice to store the config.

    • Directory: The absolute path to the root directory of the project folder.

    • Build Command: It takes compiler that 'g++', '-std = c++14' is the c++ standard we used, then relative path to all the necessary .cpp class files. If you haven't changed any of the files and project structure you can go ahead and copy paste the following command.

      g++ -std=c++14 main.cpp src/LandBasedRobot/landbasedrobot.cpp src/LandBasedWheeled/landbasedwheeled.cpp 
      src/API/api.cpp src/Algorithm/algorithm.cpp src/LandBasedTracked/landbasedtracked.cpp src/Maze/maze.cpp
      
    • Run Command: use this command.

      ./a.out

  • Then click, Build button and wait for it to turn green. If the previous step clears out then it will turn green indicating that we can run the simulator.

  • To run click the Run and you will see the simulation of the robot exploring in the maze.

2 Class Structure

The following figure explains the class structure for all the classes in the src directory

3 Depth First Search & Ideal Implementation

  • Depth first search:

- General Implementation of DFS algorithm flowchart

- Incorporating the DFS algorithm to solve the maze Flowchart

4 Node Object Data Structure

Since the above mentioned DFS algorithm and Solver has lot of redundancy loops like exploring or visiting same trail of path frequently. This is definitely a optimization issue, which has been resolved with the help of our own custom Node data structure and custom dfs and solver implementation algorithm.

  • Custom Implementation:

5 Project Execution

Bugs and feature requests

Have a bug or a feature request? Search for existing and closed issues, if your problem or idea is not addressed yet, please open a new issue.

Creators

@Sudharsan : https://www.iamsudharsan.com

Thank you for visiting our Repo!

maze-solver-robot's People

Contributors

sudharsan10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

santi-nue

maze-solver-robot's Issues

Implementing Maze Solving Algorithms on Real Robots with Single-Chip Computers (e.g., Raspberry Pi, BeagleBone)

Dear Repo Admin,

Firstly, I'd like to express my appreciation for the efforts put into developing the maze-solving interface within this repository. It's undoubtedly a valuable tool for exploring various algorithms in a virtual environment. However, I believe it would be beneficial to discuss the feasibility and implementation details of deploying these algorithms on real-world robotic systems, specifically those utilizing single-chip computers such as the Raspberry Pi or Beagle Bone.

Real robots often face unique challenges and constraints that may not be fully represented in a simulated environment. Therefore, it's crucial to consider the practical aspects of deploying maze-solving algorithms onto hardware platforms commonly used in robotics projects.

In this issue, I propose we explore the following topics:

Hardware Compatibility: Discuss the suitability of single-chip computers like the Raspberry Pi or Beagle Bone for running maze-solving algorithms in real-time.
Interface Adaptation: Address any necessary modifications or optimizations required to interface the existing algorithms with sensors, actuators, and other peripherals commonly found in robotic systems.
Performance Considerations: Analyze the computational requirements of the algorithms and assess their feasibility within the processing constraints of single-chip computers.
Integration Challenges: Identify potential hurdles in integrating the maze-solving algorithms with the overall robotic system architecture, including communication protocols, power management, and hardware interfacing.
Practical Examples: Share insights, best practices, and real-world examples of maze-solving implementations on single-chip computers in robotics projects.
By delving into these aspects, we can not only enhance the applicability of the maze-solving algorithms developed within this repository but also provide valuable guidance for enthusiasts and developers looking to deploy similar solutions in real robotic applications.

I welcome input and collaboration from fellow contributors, researchers, and robotics enthusiasts to explore this exciting avenue further.

Thank you for considering this proposal, and I look forward to engaging in fruitful discussions on this topic.

Best regards,
Rangala Mahesh

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.