MIRA
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
MetricCostmapTopoMapPlanner Class Reference

Hybrid metric-topological planner for 2D costmaps. More...

#include <planner/MetricCostmapTopoMapPlanner.h>

Classes

class  IEventListener
 
struct  NextSubGoal
 
struct  NodePosition
 
struct  PlannerContext
 

Public Types

typedef PlannerContextPlannerContextPtr
 
typedef std::list< NodePositionNodePositionList
 
typedef boost::function< void(mira::pilot::AbstractMetricPlannerPtr, bool)> UpdateGoalFn
 

Public Member Functions

 MetricCostmapTopoMapPlanner ()
 
template<typename Reflector >
void reflect (Reflector &r)
 
bool isInFinalApproach () const
 Returns true, if the robot is within the goal node and driving directly to the goal. More...
 
bool isActive () const
 
double getValue (const Point2f &worldPos) const
 
double getValueFiltered (const Point2f &worldPos) const
 
mira::pilot::AbstractMetricPlanner::Carrot getCarrot (const Point2f &pos, int count, float length=1e10f) const
 
void resetCostMaps ()
 Reset all cost maps to the inital values. More...
 
void setEventListener (IEventListener *listener)
 
PlannerContextPtr getCurrentPlanner ()
 
PlannerContextPtr getNextPlanner ()
 
mira::maps::GridMap< double > getNavFunction (bool ignoreDoubleBuffer=false)
 
mira::maps::GridMap< uint8, 3 > dumpNavStatus (bool actualMap=false, bool costsInGoalRegion=true)
 
void initialize (TopoMapPtr map, Authority *authority)
 initializes the planner with the given topo map More...
 
void setGoal (const NodePositionList &goalNodes, UpdateGoalFn updateGoalFn)
 
void update (const maps::CostMap &map)
 update the planning context with the current costmap (entire area) More...
 
void update (const maps::CostMap &map, const maps::DirtyRegions &dirty)
 update the planning context with the current costmap (dirty regions only) More...
 
bool havePlan () const
 Returns true if we have or have had a valid to the set goal. More...
 
void plan (const mira::maps::CostMap &curCostmap, const Point2f &robotPos, const NodePositionList &localizedNodes, Duration plantime)
 
void clearGoal ()
 
void setAdditionalLinkCosts (const std::string &fromGWName, const std::string &toGWName, double costs)
 
void resetAllAdditionalLinkCosts ()
 
void setDebugMarkerChannel (Channel< mira::model::Marker > c)
 
void setDebugNextSubGoalChannel (Channel< NextSubGoal > c)
 

Static Public Member Functions

static void printNextSubGoal (const NextSubGoal &nsg, const std::string &name)
 

Friends

struct ResetCostMapsVisitor
 

Detailed Description

Hybrid metric-topological planner for 2D costmaps.

Member Typedef Documentation

◆ PlannerContextPtr

◆ NodePositionList

typedef std::list<NodePosition> NodePositionList

◆ UpdateGoalFn

typedef boost::function<void(mira::pilot::AbstractMetricPlannerPtr, bool)> UpdateGoalFn

Constructor & Destructor Documentation

◆ MetricCostmapTopoMapPlanner()

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ printNextSubGoal()

static void printNextSubGoal ( const NextSubGoal nsg,
const std::string &  name 
)
static

◆ isInFinalApproach()

bool isInFinalApproach ( ) const
inline

Returns true, if the robot is within the goal node and driving directly to the goal.

◆ isActive()

bool isActive ( ) const

◆ getValue()

double getValue ( const Point2f worldPos) const

◆ getValueFiltered()

double getValueFiltered ( const Point2f worldPos) const

◆ getCarrot()

mira::pilot::AbstractMetricPlanner::Carrot getCarrot ( const Point2f pos,
int  count,
float  length = 1e10f 
) const

◆ resetCostMaps()

void resetCostMaps ( )

Reset all cost maps to the inital values.

All cost maps, which were updated due to a replanning, will be discarded.

◆ setEventListener()

void setEventListener ( IEventListener listener)
inline

◆ getCurrentPlanner()

PlannerContextPtr getCurrentPlanner ( )
inline

◆ getNextPlanner()

PlannerContextPtr getNextPlanner ( )
inline

◆ getNavFunction()

mira::maps::GridMap<double> getNavFunction ( bool  ignoreDoubleBuffer = false)

◆ dumpNavStatus()

mira::maps::GridMap<uint8,3> dumpNavStatus ( bool  actualMap = false,
bool  costsInGoalRegion = true 
)

◆ initialize()

void initialize ( TopoMapPtr  map,
Authority authority 
)

initializes the planner with the given topo map

◆ setGoal()

void setGoal ( const NodePositionList goalNodes,
UpdateGoalFn  updateGoalFn 
)

◆ update() [1/2]

void update ( const maps::CostMap &  map)

update the planning context with the current costmap (entire area)

◆ update() [2/2]

void update ( const maps::CostMap &  map,
const maps::DirtyRegions &  dirty 
)

update the planning context with the current costmap (dirty regions only)

◆ havePlan()

bool havePlan ( ) const

Returns true if we have or have had a valid to the set goal.

◆ plan()

void plan ( const mira::maps::CostMap &  curCostmap,
const Point2f robotPos,
const NodePositionList localizedNodes,
Duration  plantime 
)

◆ clearGoal()

void clearGoal ( )

◆ setAdditionalLinkCosts()

void setAdditionalLinkCosts ( const std::string &  fromGWName,
const std::string &  toGWName,
double  costs 
)
inline

◆ resetAllAdditionalLinkCosts()

void resetAllAdditionalLinkCosts ( )
inline

◆ setDebugMarkerChannel()

void setDebugMarkerChannel ( Channel< mira::model::Marker >  c)
inline

◆ setDebugNextSubGoalChannel()

void setDebugNextSubGoalChannel ( Channel< NextSubGoal c)
inline

Friends And Related Function Documentation

◆ ResetCostMapsVisitor

friend struct ResetCostMapsVisitor
friend

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