Maze Solver_RWA2_GROUP21
This project is used to solve the maze using wall follower algorithm
rwa2group21::Algorithm Class Reference

This class implements the search algorithm using a Left hand approach or right hand approach. More...

#include <algorithm.h>

Public Member Functions

void run (std::string algo)
 This method is called from the main file, after which the whole methods of bot traversing around maze is called sequentially.
More...
 
void init_outer_walls ()
 This method is internally called from the run method to highlight all the outer walls of any maze selected before moving the bot.
 
void follow_wall_left ()
 left handed wall algorithm is executed using methods of robot class by recording and evaluating current position and orientation. This is called from run method of algorithm as well.
 
void follow_wall_right ()
 right handed wall algorithm is executed using methods of robot class by recording and evaluating current position and orientation.This is called from run method of algorithm class as well .
 
void generate_goal ()
 generating a random goal every time using srand and rand function and is done during the start of the program.
 
void set_right_wall ()
 Setting the right wall of a cell whenever the bot in that particular cell finds a wall on the right when it is moving in the maze.
 
void set_left_wall ()
 Setting the left wall of a cell whenever the bot in that particular cell finds a wall on the left when it is moving in the maze.
 
void set_front_wall ()
 Setting the front wall of a cell whenever the bot in that particular cell finds a wall on the front when it is moving in the maze.
 
void traceback_coordinate_elimination ()
 Function is responsible for elimination of deadend coordinates during forward movement of the robot. More...
 
void traceback_robot_movement ()
 Function for tracing back robot movement using coordinates generated from coordinate elimination function. More...
 
 Algorithm ()
 Creating a constructor using member initalisation list and default values. Intialised the instance of robot class using unique pointer.
 

Detailed Description

This class implements the search algorithm using a Left hand approach or right hand approach.

Member Function Documentation

◆ run()

void rwa2group21::Algorithm::run ( std::string  algo)

This method is called from the main file, after which the whole methods of bot traversing around maze is called sequentially.

Parameters
algo,Thisparameter is used to store the value of algorithm to be followed in the build of Simulator.

◆ traceback_coordinate_elimination()

void rwa2group21::Algorithm::traceback_coordinate_elimination ( )

Function is responsible for elimination of deadend coordinates during forward movement of the robot.

◆ traceback_robot_movement()

void rwa2group21::Algorithm::traceback_robot_movement ( )

Function for tracing back robot movement using coordinates generated from coordinate elimination function.

Here is the call graph for this function:

The documentation for this class was generated from the following files: