Class LPAStar¶
- Defined in File lpa_star.hpp
Inheritance Relationships¶
Base Type¶
public Planner
(Class Planner)
Class Documentation¶
-
class
LPAStar
: public Planner¶ Class for objects that plan using the LPA* algorithm.
Public Functions
-
LPAStar
(std::vector<std::vector<int>> grid)¶ Constructor.
- Return
- no return value
- Parameters
grid
: the grid on which the planner is to plan
-
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 executiontime_discovered_obstacles
: obstacles to be discovered at specific times
-
std::tuple<bool, std::vector<Node>>
Plan
(const Node &start, const Node &goal)¶ LPA* algorithm implementation.
Creates a path to be followed Steps through time in increments of 1 time step Checks for discovered obstacles Replans as necessary
- Return
- tuple contatining a bool as to whether a path was found, and the path
- Parameters
start
: start nodegoal
: goal node
-