planner

Implements the planner based on different path planning algorithms, which are provided in OMPL.

namespace slope_constrained_planner
class Planner
#include <planner.h>

Implements the planner based on different path planning algorithms, which are provided in OMPL.

Desciption: The main class in the software architecture. Creates an object from the chosen planner, sets the custom sampler and motion validator, and tries to find a path between the starting and goal points in the provided grid map.

Subclassed by slope_constrained_planner::PlannerRos

Public Functions

Planner(const ParamsConstPtr &params = std::make_shared<const Params>())

Constructor for Planner class. Defines the state space and problem, sets the custom sampler and motion validator, and the planner algorithm.

Parameters:

params – contains required info about the planner name

void setMap(std::unique_ptr<grid_map::GridMap> &&map)

Sets the grid map’s different layers.

Parameters:

map – grid map of the environment

PlannerStatus plan(const ob::ScopedState<> &start, const ob::ScopedState<> &goal)

Plans a path between start and goal states.

Parameters:
  • start – Robots current state

  • goal – Chosen target state

Returns:

PlannerStatus

og::PathGeometric getSolutionPath(const bool &simplify = false) const

Plans a path between start and goal states.

Parameters:

simplify – Specifies whether the path would be simplified or not (default = false)

Returns:

PathGeometric Found solution path computed by the geometric planner

Protected Attributes

std::shared_ptr<og::SimpleSetup> ss_

Simple setup attribute.

ParamsConstPtr params_

Contains some parameters such as planner name, verbose and map layers.

bool solved_ = {false}

Status of planner.

std::shared_ptr<ob::SE3StateSpace> space_

Defines the states in se3.

ob::StateSpacePtr space_real_vec_

Defines the states in R(3)

ob::ScopedState<ob::RealVectorStateSpace> state_pos_

An scoped state in R(3)

std::shared_ptr<Map> map_

Grid map data.

mutable std::mutex map_mutex_

Grid map process mutex.

SamplerAllocator sampler_allocator_

Sets the custom sampler class.