Class Planner

Inheritance Relationships

Derived Types

Class Documentation

class Planner

Abstract class that is inherited by concerete implementaions of planner classes. The Plan function is a pure virtual funciton that is overloaded

Subclassed by AntColony, AStar, Dijkstra, DStarLite, GeneticAlgorithm, JumpPointSearch, LPAStar, RRT, RRTStar

Public Functions

Planner(std::vector<std::vector<int>> grid)

Constructor.

Return
no return value
Parameters
  • grid: the grid on which the planner is to plan

Planner(const Planner&)

Copy constructor.

default

Return
No return value

Planner(Planner&&)

Move constructor.

default

Return
No return value

Planner &operator=(const Planner&)

Copy assignment.

default

Return
No return value

Planner &operator=(Planner&&)

Move assignment.

default

Return
No return value

virtual ~Planner()

Virtual destructor.

default

Return
No return value

virtual std::tuple<bool, std::vector<Node>> Plan(const Node &start, const Node &goal) = 0

Pure virtual function that is overloadde by planner implementations.

Return
tuple contatining a bool as to whether a path was found, and the path
Parameters
  • start: start node
  • goal: goal node

virtual void SetDynamicObstacles(const bool create_random_obstacles = false, const std::unordered_map<int, std::vector<Node>> &time_discovered_obstacles = {})

Sets the time discovered obstacles and the option that allows the creation of random obstacles.

Set separately from the plan function to allow this to persist between calls to

Plan()
Return
void
Parameters
  • create_random_obstacles: should random obstacles be created during execution
  • time_discovered_obstacles: obstacles to be discovered at specific times

Protected Attributes

std::vector<std::vector<int>> grid_ = {}
const std::vector<std::vector<int>> original_grid_
const int n_