selfdriving
Classes | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
mpp::TPS_Astar Class Reference

#include <mpp/algos/TPS_Astar.h>

Inheritance diagram for mpp::TPS_Astar:
mpp::Planner

Classes

struct  Node
 
struct  NodeCoords
 
struct  NodeCoordsHash
 
struct  NodePtr
 
struct  path_to_neighbor_t
 

Public Member Functions

 TPS_Astar ()
 
virtual ~TPS_Astar ()=default
 
PlannerOutput plan (const PlannerInput &in) override
 
mrpt::containers::yaml params_as_yaml () override
 
void params_from_yaml (const mrpt::containers::yaml &c) override
 
cost_t default_heuristic (const SE2_KinState &from, const SE2orR2_KinState &goal) const
 
cost_t default_heuristic_SE2 (const SE2_KinState &from, const mrpt::math::TPose2D &goal) const
 
cost_t default_heuristic_R2 (const SE2_KinState &from, const mrpt::math::TPoint2D &goal) const
 
- Public Member Functions inherited from mpp::Planner
 Planner ()=default
 
 ~Planner ()
 
mrpt::system::CTimeLogger & profiler_ ()
 
void attachExternalProfiler_ (mrpt::system::CTimeLogger &p)
 
cost_t cost_path_segment (const MoveEdgeSE2_TPS &edge) const
 

Public Attributes

TPS_Astar_Parameters params_
 
astar_heuristic_t heuristic
 
- Public Attributes inherited from mpp::Planner
std::vector< CostEvaluator::Ptr > costEvaluators_
 
planner_progress_callback_t progressCallback_
 
duration_seconds_t progressCallbackCallPeriod_ = 0.1
 

Private Types

using nodes_with_desired_speed_t = std::unordered_map< NodeCoords, normalized_speed_t, NodeCoordsHash >
 
using absolute_cell_index_t = size_t
 
using list_paths_to_neighbors_t = std::vector< path_to_neighbor_t >
 

Private Member Functions

absolute_cell_index_t nodeCoordsToAbsIndex (const NodeCoords &n) const
 
NodegetOrCreateNodeByPose (const mpp::SE2_KinState &p, mrpt::graphs::TNodeID &nextFreeId)
 
NodeCoords nodeGridCoords (const mrpt::math::TPose2D &p) const
 throws on out of grid limits. More...
 
NodeCoords nodeGridCoords (const mrpt::math::TPoint2D &p) const
 
list_paths_to_neighbors_t find_feasible_paths_to_neighbors (const Node &from, const TrajectoriesAndRobotShape &trs, const SE2orR2_KinState &goalState, const std::vector< mrpt::maps::CPointsMap::Ptr > &globalObstacles, double MAX_XY_OBSTACLES_CLIPPING_DIST, const nodes_with_desired_speed_t &nodesWithSpeed)
 
mrpt::maps::CPointsMap::Ptr cached_local_obstacles (const mrpt::math::TPose2D &queryPose, const std::vector< mrpt::maps::CPointsMap::Ptr > &globalObstacles, double MAX_PTG_XY_DIST)
 

Private Attributes

mrpt::poses::CPose2DGridTemplate< Nodegrid_
 

Detailed Description

Uses a SE(2) lattice to run an A* algorithm to find a kinematicaly feasible path from "A" to "B" using a set of trajectories in the form of PTGs.

Member Typedef Documentation

◆ absolute_cell_index_t

using mpp::TPS_Astar::absolute_cell_index_t = size_t
private

◆ list_paths_to_neighbors_t

◆ nodes_with_desired_speed_t

Constructor & Destructor Documentation

◆ TPS_Astar()

mpp::TPS_Astar::TPS_Astar ( )

◆ ~TPS_Astar()

virtual mpp::TPS_Astar::~TPS_Astar ( )
virtualdefault

Member Function Documentation

◆ cached_local_obstacles()

mrpt::maps::CPointsMap::Ptr mpp::TPS_Astar::cached_local_obstacles ( const mrpt::math::TPose2D &  queryPose,
const std::vector< mrpt::maps::CPointsMap::Ptr > &  globalObstacles,
double  MAX_PTG_XY_DIST 
)
private

◆ default_heuristic()

cost_t mpp::TPS_Astar::default_heuristic ( const SE2_KinState from,
const SE2orR2_KinState goal 
) const

◆ default_heuristic_R2()

cost_t mpp::TPS_Astar::default_heuristic_R2 ( const SE2_KinState from,
const mrpt::math::TPoint2D &  goal 
) const

◆ default_heuristic_SE2()

cost_t mpp::TPS_Astar::default_heuristic_SE2 ( const SE2_KinState from,
const mrpt::math::TPose2D &  goal 
) const

◆ find_feasible_paths_to_neighbors()

list_paths_to_neighbors_t mpp::TPS_Astar::find_feasible_paths_to_neighbors ( const Node from,
const TrajectoriesAndRobotShape trs,
const SE2orR2_KinState goalState,
const std::vector< mrpt::maps::CPointsMap::Ptr > &  globalObstacles,
double  MAX_XY_OBSTACLES_CLIPPING_DIST,
const nodes_with_desired_speed_t nodesWithSpeed 
)
private

This generates a list of many potential neighbor cells to visit, subject to kinematic and dynamic limitations, and obstacle checking.

◆ getOrCreateNodeByPose()

Node& mpp::TPS_Astar::getOrCreateNodeByPose ( const mpp::SE2_KinState p,
mrpt::graphs::TNodeID &  nextFreeId 
)
inlineprivate

throws on out of grid limits. Returns a ref to the node.

◆ nodeCoordsToAbsIndex()

absolute_cell_index_t mpp::TPS_Astar::nodeCoordsToAbsIndex ( const NodeCoords n) const
inlineprivate

◆ nodeGridCoords() [1/2]

NodeCoords mpp::TPS_Astar::nodeGridCoords ( const mrpt::math::TPose2D &  p) const
inlineprivate

throws on out of grid limits.

◆ nodeGridCoords() [2/2]

NodeCoords mpp::TPS_Astar::nodeGridCoords ( const mrpt::math::TPoint2D &  p) const
inlineprivate

◆ params_as_yaml()

mrpt::containers::yaml mpp::TPS_Astar::params_as_yaml ( )
inlineoverridevirtual

Implements mpp::Planner.

◆ params_from_yaml()

void mpp::TPS_Astar::params_from_yaml ( const mrpt::containers::yaml &  c)
inlineoverridevirtual

Implements mpp::Planner.

◆ plan()

PlannerOutput mpp::TPS_Astar::plan ( const PlannerInput in)
overridevirtual

Implements mpp::Planner.

Member Data Documentation

◆ grid_

mrpt::poses::CPose2DGridTemplate<Node> mpp::TPS_Astar::grid_
private

◆ heuristic

astar_heuristic_t mpp::TPS_Astar::heuristic
Initial value:
[this](const SE2_KinState& from, const SE2orR2_KinState& goal) {
return this->default_heuristic(from, goal);
})

◆ params_

TPS_Astar_Parameters mpp::TPS_Astar::params_

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