MIRA
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
MetricPlannerBase Class Referenceabstract

Base class for implementations of metric planners like Dijkstra and E*. More...

#include <pilot/MetricPlannerBase.h>

Inheritance diagram for MetricPlannerBase:
Inheritance graph
[legend]

Public Types

enum  Status {
  OUT_OF_GRID, VALID, INVALID, WAVEFRONT,
  OUTDATED, GOAL, OBSTACLE
}
 Planner status of a fixed position (planner map cell) More...
 
typedef std::vector< Point2fCarrot
 
typedef std::function< float(int x, int y, float r)> CostFn
 Type declaration for a cost function to be used with setGoal(const Polygon2i, ...) or setGoal(const Polygon2f, ...). More...
 
enum  Flags
 
typedef std::multimap< std::string, std::string > ChannelNameMapping
 
typedef std::map< std::string, StatusChannelStatusMap
 
typedef std::map< std::string, StatusStatusMap
 

Public Member Functions

 MetricPlannerBase (bool useDoubleBuffer=false, bool persistentDoubleBuffer=false)
 
virtual ~MetricPlannerBase ()
 
template<typename Reflector >
void reflect (Reflector &r)
 
virtual void setOnewayMap (const maps::OccupancyGrid &onewayMap)
 Implementation of AbstractMetricPlanner::setOnewayMap(). More...
 
void setUseDoubleBuffer (bool useDoubleBuffer)
 Enable/disable double buffer. More...
 
void setPersistentDoubleBuffer (bool persistentDoubleBuffer)
 Enable/disable persistent double buffer (i.e. not reset when setting goal) More...
 
virtual Point2f getGradient (const Point2f &worldPos) const
 Implementation of AbstractMetricPlanner::getGradient(const Point2f&) More...
 
Point2f getGradientMap (const Point2i &mapPos) const
 Returns the gradient for a position in map coordinates. More...
 
virtual Point2f getCurrentGradientMap (const Point2i &mapPos) const
 Returns the gradient for a position in map coordinates from current costs. More...
 
virtual void update (const maps::CostMap &map, const maps::DirtyRegions &dirty)
 Implementation of AbstractMetricPlanner::update(const maps::CostMap&, const maps::DirtyRegions&) More...
 
virtual double infinity () const
 Implementation of AbstractMetricPlanner::infinity(). More...
 
double getValue (const Point2f &worldPos, bool ignoreDoubleBuffer=false) const
 Implementation of AbstractMetricPlanner::getValue(const Point2f&, bool) More...
 
double getValueMap (const Point2i &mapPos, bool ignoreDoubleBuffer=false) const
 Returns the cost value at position (in map coordinates) in the planner map. More...
 
virtual double getCurrentValueMap (const Point2i &mapPos) const =0
 Returns the cost value at position (in map coordinates) in the current planner map. More...
 
virtual double getValueFiltered (const Point2f &worldPos, bool ignoreDoubleBuffer=false) const
 Implementation of AbstractMetricPlanner::getValueFiltered(const Point2f&, bool) More...
 
virtual Carrot getCarrot (const Point2f &pos, int maxCount, float maxDistance=1e10f) const
 Implementation of AbstractMetricPlanner::getCarrot(const Point2f&, int, float) More...
 
virtual Carrot getCurrentCarrot (const Point2f &pos, int maxCount, float maxDistance=1e10f) const =0
 Return the optimal path to the goal, starting at pos, based on the current planner map. More...
 
virtual Carrot getDoubleBufferCarrot (const Point2f &pos, int maxCount, float maxDistance=1e10f) const
 Return the optimal path to the goal, starting at pos, based on the double buffer. More...
 
virtual Pose2 getCurrentGoal (const Point2f &pos) const
 Implementation of AbstractMetricPlanner::getCurrentGoal(const Point2f&) More...
 
Point2i world2map (const Point2f &p) const
 Implementation of AbstractMetricPlanner::world2map(const Point2f&) More...
 
Point2f map2world (const Point2i &p) const
 Implementation of AbstractMetricPlanner::world2map(const Point2i&) More...
 
float getCellSize () const
 Implementation of AbstractMetricPlanner::getCellSize() More...
 
Rect2f getRegion () const
 Implementation of AbstractMetricPlanner::getRegion() More...
 
Rect2i getMapRegion () const
 Implementation of AbstractMetricPlanner::getMapRegion() More...
 
bool getUseDoubleBuffer () const
 Double buffer enabled? More...
 
bool getPersistentDoubleBuffer () const
 Persistent double buffer enabled (i.e. not reset on setting goal)? More...
 
Duration getAccumulatedPlanningTime () const
 Implementation of AbstractMetricPlanner::getAccumulatedPlanningTime() More...
 
void setGoal (const Point2f &goal, float radius, bool clearDoubleBuffer=true, bool prepareNew=true)
 Implementation of AbstractMetricPlanner::setGoal(const Point2f&, float, bool, bool) More...
 
void setGoal (const Polygon2i &polygon, int radius=1, bool clearDoubleBuffer=true, bool prepareNew=true)
 Implementation of AbstractMetricPlanner::setGoal(const Polygon2i&, int, bool, bool) More...
 
void setGoal (const Polygon2f &polygon, float radius=0.1f, bool clearDoubleBuffer=true, bool prepareNew=true)
 Implementation of AbstractMetricPlanner::setGoal(const Polygon2f&, float, bool, bool) More...
 
void setGoal (const Polygon2i &polygon, int radius, CostFn &costFn, bool clearDoubleBuffer=true, bool prepareNew=true)
 Implementation of AbstractMetricPlanner::setGoal(const Polygon2i&, int, CostFn, bool, bool) More...
 
void setGoal (const Polygon2f &polygon, float radius, CostFn &costFn, bool clearDoubleBuffer=true, bool prepareNew=true)
 Implementation of AbstractMetricPlanner::setGoal(const Polygon2f&, float, CostFn, bool, bool) More...
 
float defaultCostFn (int x, int y, float r)
 A default cost function which is always returning r (radius) More...
 
void plan (const Point2f &pos, Duration plantime)
 Implementation of AbstractMetricPlanner::plan(const Point2f&, Duration) More...
 
bool havePlan () const
 Implementation of AbstractMetricPlanner::havePlan() More...
 
bool havePlanSinceUpdate () const
 Implementation of AbstractMetricPlanner::havePlanSinceUpdate() More...
 
Time lastValidPlan () const
 Implementation of AbstractMetricPlanner::lastValidPlan() More...
 
void planTime (Duration plantime)
 Implementation of AbstractMetricPlanner::planTime(Duration) More...
 
void planSteps (int steps)
 Implementation of AbstractMetricPlanner::planSteps(int) More...
 
void resetPlanningTimeout ()
 Implementation of AbstractMetricPlanner::resetPlanningTimeout() More...
 
maps::CostMap getNavFunction (bool ignoreDoubleBuffer=false) const
 Implementation of AbstractMetricPlanner::getNavFunction(bool) More...
 
virtual maps::CostMap getCurrentNavFunction () const =0
 Creates a deep copy of the current navigation function that contains the accumulated costs from each cell to the goal as a potential field (not from double buffer). More...
 
maps::GridMap< uint8, 3 > dumpNavStatus (bool useDoubleBuffer=false, bool costsInGoalRegion=true)
 Implementation of AbstractMetricPlanner::dumpNavStatus(bool, bool) More...
 
maps::GridMap< uint8, 3 > showNavFunctionNearGoal ()
 Implementation of AbstractMetricPlanner::showNavFunctionNearGoal() More...
 
Status getStatus (const Point2f &p) const
 Implementation of AbstractMetricPlanner::getStatus(const Point2f&) More...
 
virtual Status getStatusMap (const Point2i &p) const
 Base class just returns whether p is in the map (VALID) or out (OUT_OF_GRID) Subclasses should override to give a more detailed status. More...
 
void initialize (Authority *parent)
 
void update (const maps::CostMap &map)
 Update the planning context with the current costmap (entire area). More...
 
virtual void setRobotPosition (const Point2f &robotPos)
 Set the current robot position in planner (world position) Base implementation is empty. More...
 
virtual bool hasValidGoal () const =0
 Check if the internal planner has a goal. More...
 
virtual bool haveWork () const =0
 Low level planning interface. More...
 
virtual void planStep ()=0
 Low level planning interface. More...
 
Status::StatusMode getStatus () const
 
Class const & getClass () const
 
void enableSubscriberCallbacks (bool enable)
 
StatusManagergetStatusManager ()
 
void setHeartbeatInterval (const Duration &interval)
 
void setName (const std::string &name)
 
Duration getHeartbeatInterval () const
 
void heartbeat ()
 
bool hasHeartbeatTimeout () const
 
void bootup (const std::string &message, const std::string &trText="")
 
void bootupFinished ()
 
void recoverFinished ()
 
void recover (const std::string &message, const std::string &trText="")
 
void ok (const std::string &category="")
 
bool warning (const std::string &category, const std::string &message, const std::string &trText="")
 
bool error (const std::string &category, const std::string &message, const std::string &trText="")
 
bool setStatus (Status::StatusMode mode, const std::string &category, const std::string &message, const std::string &trText="")
 
StatusMap getStatusMap () const
 
StatusManager::StatusMap getStatusMap () override
 
void checkin (const ResourceName &fullname, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (const ResourceName &ns, const std::string &name, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (Authority &iParent, const ResourceName &ns, const std::string &name)
 
void checkin (Authority &iParent, const std::string &name)
 
void checkin (const ResourceName &fullname, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (const ResourceName &ns, const std::string &name, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (Authority &iParent, const ResourceName &ns, const std::string &name)
 
void checkin (Authority &iParent, const std::string &name)
 
void checkout ()
 
void checkout ()
 
void validate () const
 
void validate () const
 
void startWithParent (bool start)
 
void startWithParent (bool start)
 
AuthorityRuntimePtr getRuntime ()
 
AuthorityRuntimePtr getRuntime ()
 
std::set< Authority *> getChildren ()
 
std::set< Authority *> getChildren ()
 
void addImmediateHandler (DiagnosticRunnablePtr runnable)
 
void addImmediateHandler (DiagnosticRunnablePtr runnable)
 
void addImmediateHandlerFunction (F &&fn)
 
void addImmediateHandlerFunction (F &&fn)
 
void addFinalizeHandler (DiagnosticRunnablePtr runnable)
 
void addFinalizeHandler (DiagnosticRunnablePtr runnable)
 
void addFinalizeHandlerFunction (F &&fn)
 
void addFinalizeHandlerFunction (F &&fn)
 
TimerPtr createTimer (Duration period, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Time time, TimerCallback callback)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &), Class *obj)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &))
 
TimerPtr createTimer (Duration period, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Time time, TimerCallback callback)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &), Class *obj)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &))
 
void removeTimer (TimerPtr timer)
 
void removeTimer (TimerPtr timer)
 
void start () override
 
void start () override
 
void stop () override
 
void stop () override
 
bool spin (const Duration &maxWait=Duration::infinity())
 
bool spin (const Duration &maxWait=Duration::infinity())
 
bool hasWork (Time horizon=Time::now()) const
 
bool hasWork (Time horizon=Time::now()) const
 
bool hasUnrecoverableFailure () const override
 
bool hasUnrecoverableFailure () const override
 
bool isStarted () const override
 
bool isStarted () const override
 
bool isRunning () const override
 
bool isRunning () const override
 
std::string resolveName (const std::string &name) const
 
std::string resolveName (const std::string &name) const
 
std::string resolveServiceName (const std::string &name) const
 
std::string resolveServiceName (const std::string &name) const
 
Channel< T > publish (const std::string &channelID)
 
Channel< T > publish (const std::string &channelID, const Typename &type)
 
Channel< T > publish (const std::string &channelID)
 
Channel< T > publish (const std::string &channelID, const Typename &type)
 
void unpublish (const std::string &channelID)
 
void unpublish (const std::string &channelID)
 
Channel< T > subscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > subscribeInterval (const std::string &channelID, boost::function< void(ChannelReadInterval< T >)> fn, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), Class *obj, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, boost::function< void(ChannelReadInterval< T >)> fn, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), Class *obj, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, boost::function< void(ChannelRead< T >)>, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, boost::function< void(ChannelRead< T >)>, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
ChannelRead< T > waitForData (Channel< T > channel, Duration timeout=Duration::infinity()) const
 
ChannelRead< T > waitForData (Channel< T > channel, Duration timeout=Duration::infinity()) const
 
void unsubscribe (const std::string &channelID)
 
void unsubscribe (const std::string &channelID)
 
void unsubscribe (const std::string &channelID)
 
void unsubscribe (const std::string &channelID)
 
Channel< T > getChannel (const std::string &channelID)
 
Channel< T > getChannel (const std::string &channelID)
 
bool isSubscribedOn (const std::string &channelID) const
 
bool isSubscribedOn (const std::string &channelID) const
 
 MIRA_DEPRECATED ("Please use isSubscribedOn() instead", bool hasSubscribedOn(const std::string &channelID) const)
 
 MIRA_DEPRECATED ("Please use isSubscribedOn() instead", bool hasSubscribedOn(const std::string &channelID) const)
 
bool hasPublished (const std::string &channelID) const
 
bool hasPublished (const std::string &channelID) const
 
bool doesChannelExist (const std::string &channelID) const
 
bool doesChannelExist (const std::string &channelID) const
 
bool waitForChannel (const std::string &channelID, const Duration &timeout=Duration::infinity()) const
 
bool waitForChannel (const std::string &channelID, const Duration &timeout=Duration::infinity()) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, Duration timeout=Duration::invalid()) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID, Duration timeout=Duration::invalid()) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, Duration timeout=Duration::invalid()) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID, Duration timeout=Duration::invalid()) const
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time))
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time))
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time=Time()) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID) const
 
Transform getTransform (const TransformDesc &desc, const Time &time, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &time=Time()) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime) const
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time=Time()) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID) const
 
Transform getTransform (const TransformDesc &desc, const Time &time, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &time=Time()) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime) const
 
FrameworkTransformerNodegetTransformNode (const std::string &frameID) const
 
FrameworkTransformerNodegetTransformNode (const std::string &frameID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
void publishTransform (const std::string &frameID, const Transform &transform, const Time &time) const
 
void publishTransform (const std::string &frameID, const Transform &transform, const Time &time) const
 
void publishTransformIndirect (const std::string &frameID, const std::string &targetID, const std::string &sourceID, const Transform &transform, const Time &time, Filter &&filter=NearestNeighborInterpolator()) const
 
void publishTransformIndirect (const std::string &frameID, const std::string &targetID, const std::string &sourceID, const Transform &transform, const Time &time, Filter &&filter=NearestNeighborInterpolator()) const
 
void addTransformLink (const std::string &childID, const std::string &parentID) const
 
void addTransformLink (const std::string &childID, const std::string &parentID, FrameworkTransformerNode::Type type) const
 
void addTransformLink (const std::string &childID, const std::string &parentID) const
 
void addTransformLink (const std::string &childID, const std::string &parentID, FrameworkTransformerNode::Type type) const
 
void publishService (const std::string &name, Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void publishService (Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void publishService (const std::string &name, Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void publishService (Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void unpublishService ()
 
void unpublishService (const std::string &name)
 
void unpublishService ()
 
void unpublishService (const std::string &name)
 
RPCFuture< R > callService (const std::string &iService, const std::string &method, ARGS &&... args) const
 
RPCFuture< R > callService (const std::string &iService, const std::string &method, ARGS &&... args) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const json::Value &jsonRequest) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &jsonString) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const json::Value &params=json::Value()) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const std::string &params) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const RPCCallDefinition &rpc) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const json::Value &jsonRequest) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &jsonString) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const json::Value &params=json::Value()) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const std::string &params) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const RPCCallDefinition &rpc) const
 
ServiceCall< F > createServiceCall (const std::string &service, std::string method, bool waitTillExists=true, bool showBootupMsg=true)
 
ServiceCall< F > createServiceCall (const std::string &service, std::string method, bool waitTillExists=true, bool showBootupMsg=true)
 
bool existsService (const std::string &name) const
 
bool existsService (const std::string &name) const
 
bool implementsInterface (const std::string &name, const std::string &interface) const
 
bool implementsInterface (const std::string &name, const std::string &interface) const
 
bool waitForService (const std::string &name, Duration timeout=Duration::invalid()) const
 
bool waitForService (const std::string &name, Duration timeout=Duration::invalid()) const
 
std::string waitForServiceInterface (const std::string &interface, Duration timeout=Duration::invalid()) const
 
std::string waitForServiceInterface (const std::string &interface, Duration timeout=Duration::invalid()) const
 
std::list< std::string > queryServicesForInterface (const std::string &interface) const
 
std::list< std::string > queryServicesForInterface (const std::string &interface) const
 
void registerCallbackForInterface (const std::string &interface, ServiceInterfaceHandler::Callback cb)
 
void registerCallbackForInterface (const std::string &interface, void(Class::*f)(const std::string &, const std::string &), Class *obj)
 
void registerCallbackForInterface (const std::string &interface, ServiceInterfaceHandler::Callback cb)
 
void registerCallbackForInterface (const std::string &interface, void(Class::*f)(const std::string &, const std::string &), Class *obj)
 
boost::shared_ptr< PropertyNodegetProperties () override
 
boost::shared_ptr< PropertyNodegetProperties () override
 
std::set< std::string > getPublishedChannels () override
 
std::set< std::string > getPublishedChannels () override
 
std::set< std::string > getSubscribedChannels () override
 
std::set< std::string > getSubscribedChannels () override
 
std::set< std::string > getServiceInterfaces () override
 
std::set< std::string > getServiceInterfaces () override
 
ChannelNameMapping getPublishedChannelNames () override
 
ChannelNameMapping getPublishedChannelNames () override
 
ChannelNameMapping getSubscribedChannelNames () override
 
ChannelNameMapping getSubscribedChannelNames () override
 
ChannelStatusMap getSubscribedChannelStatus () override
 
ChannelStatusMap getSubscribedChannelStatus () override
 
std::string getNamespace () const
 
std::string getNamespace () const
 
std::string getGlobalName () const
 
std::string getGlobalName () const
 
std::string getGlobalID () const
 
std::string getGlobalID () const
 
std::string getID () const
 
std::string getID () const
 
std::string getName () const
 
std::string getName () const
 
const AuthorityDescriptiongetDescription () const
 
const AuthorityDescriptiongetDescription () const
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Public Attributes

 NORMAL
 
 ANONYMOUS
 
 HIDDEN
 
 INVISIBLE_PUBLISHER_SUBSCRIBER
 
 INTERNAL
 
 INDEPENDENT_SUBSCRIBER_THREAD
 
 INDEPENDENT_RPC_THREAD
 
 NO_MAIN_THREAD
 

Protected Types

typedef std::map< std::string, RWAccessFlagsRWAccessMap
 
typedef std::list< AbstractChannelSubscriberPtrSubscribePtrList
 

Protected Member Functions

virtual bool isValid () const
 Return whether planner is properly initialized and able to calculate a path (when a goal is set) More...
 
virtual void reset ()
 Re-initialize internal structures. More...
 
virtual void resetDoubleBuffer (bool createNew)
 Set the entire double buffer to infinity. More...
 
virtual void copyDoubleBuffer ()=0
 Copy entire field of internally calculated cost values to mDoubleBuffer. More...
 
void prepareNewGoal (bool clearDoubleBuffer)
 Call removeGoals() and reset all status and timing data related to planning on the current goal. More...
 
virtual void removeGoals ()=0
 Remove all set goals. More...
 
virtual void addGoal (const Point2i &p, float cost)=0
 Add a goal cell with a certain cost (e.g. More...
 
virtual void freeCell (const Point2i &p)=0
 Mark a cell as free in the planner's internal cost function representation. More...
 
virtual void dirtyCell (const Point2i &p, double value)=0
 Update a cell's cost map value in the planner's internal cost function representation. More...
 
AbstractMetricPlanner::Carrot getCarrotFromMap (const maps::CostMap &map, const Point2f &pos, int maxCount, float maxDistance) const
 Calculate a path through the given costmap, starting at pos and following the gradient computed by computeStableGradientFromMap. More...
 
int computeStableGradientFromMap (const maps::CostMap &map, int ix, int iy, double baseVal, double stepsize, double &dx, double &dy, double &gx, double &gy) const
 
virtual Img8U1 getStatusField () const
 Return the result of getStatusMap(const Point2i&) over the entire map area. More...
 
double filteredCorner (double self, double xnb, double ynb, double diagnb) const
 Fix infinite (invalid) values by replacing with finite neighbour values, if available. More...
 
virtual void initialize ()
 Called in initialize(parent). More...
 
virtual Class const & internalGetClass () const=0
 
Channel< T > toProxy (ConcreteChannel< T > *channel)
 
void setChannelReadAccess (const std::string &channelID)
 
void setChannelWriteAccess (const std::string &channelID)
 
void removeChannelReadAccess (const std::string &channelID)
 
void removeChannelWriteAccess (const std::string &channelID)
 
void insertChannelNameMapping (AbstractAuthority::ChannelNameMapping &map, const std::string &local, const std::string &global)
 
void eraseChannelNameMapping (AbstractAuthority::ChannelNameMapping &map, const std::string &local, const std::string &global)
 
void remotePublishService (const std::string &service) const
 
PropertyTree getPropertiesRPC ()
 
void setProperty (const std::string &property, const std::string &value)
 
std::string getProperty (const std::string &property) const
 
void setPropertyJSON (const std::string &property, const json::Value &value)
 
json::Value getPropertyJSON (const std::string &property) const
 

Protected Attributes

Size2i mSize
 
maps::CostMap mCostMap
 
maps::CostMap mDoubleBuffer
 
Time mLastPlan
 
Time mLastValidPlan
 
Duration mAccumulatedPlanningTime
 
Duration mMaxPlanningTime
 
Duration mPathLostTimeout
 
bool mHadValidPlan
 
bool mHadValidPlanSinceUpdate
 
bool mPathLostReported
 
float mNavfscale
 
bool mHasPointGoal
 
Point2f mPointGoal
 
Point2i mPointGoalCell
 
Eigen::VectorXf mPointGoalPyrBorder
 
Eigen::VectorXf mPointGoalPyrSlope
 
bool mUseDoubleBuffer
 
bool mGetCarrotFromDoubleBuffer
 
bool mDoubleBufferValid
 
bool mPersistentDoubleBuffer
 
AuthorityDescription mDescription
 
boost::optional< StatusmBootUpStatus
 
boost::optional< StatusmRecoverStatus
 
Duration mHeartbeatInterval
 
boost::optional< TimemLastHeartbeat
 
StatusMap mStatusMap
 
std::string mName
 

Detailed Description

Base class for implementations of metric planners like Dijkstra and E*.

Member Typedef Documentation

◆ Carrot

typedef std::vector<Point2f> Carrot
inherited

◆ CostFn

typedef std::function<float(int x, int y, float r)> CostFn
inherited

Type declaration for a cost function to be used with setGoal(const Polygon2i, ...) or setGoal(const Polygon2f, ...).

CostFn is a function taking parameters int x, int y and float r (a cell's coordinates and distance to goal). The function must return a float value which is the initial cost for cell <x,y>. The distance r is given in cells, and the returned initial costs/distance must be returned in cells (not meter).

Member Enumeration Documentation

◆ Status

enum Status
inherited

Planner status of a fixed position (planner map cell)

Enumerator
OUT_OF_GRID 
VALID 
INVALID 
WAVEFRONT 
OUTDATED 
GOAL 
OBSTACLE 

Constructor & Destructor Documentation

◆ MetricPlannerBase()

MetricPlannerBase ( bool  useDoubleBuffer = false,
bool  persistentDoubleBuffer = false 
)

◆ ~MetricPlannerBase()

virtual ~MetricPlannerBase ( )
inlinevirtual

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ setOnewayMap()

virtual void setOnewayMap ( const maps::OccupancyGrid onewayMap)
inlinevirtual

Implementation of AbstractMetricPlanner::setOnewayMap().

Override in subclasses if you want to support planning with oneway road restrictions.

Implements AbstractMetricPlanner.

◆ setUseDoubleBuffer()

void setUseDoubleBuffer ( bool  useDoubleBuffer)
inline

Enable/disable double buffer.

◆ setPersistentDoubleBuffer()

void setPersistentDoubleBuffer ( bool  persistentDoubleBuffer)
inline

Enable/disable persistent double buffer (i.e. not reset when setting goal)

◆ getGradient()

virtual Point2f getGradient ( const Point2f worldPos) const
virtual

Implementation of AbstractMetricPlanner::getGradient(const Point2f&)

Implements AbstractMetricPlanner.

◆ getGradientMap()

Point2f getGradientMap ( const Point2i mapPos) const

Returns the gradient for a position in map coordinates.

◆ getCurrentGradientMap()

virtual Point2f getCurrentGradientMap ( const Point2i mapPos) const
virtual

Returns the gradient for a position in map coordinates from current costs.

◆ update() [1/2]

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

◆ infinity()

virtual double infinity ( ) const
virtual

Implementation of AbstractMetricPlanner::infinity().

Default implementation returns plannerDefaultInfinity(), sub classes can provide their own.

Implements AbstractMetricPlanner.

Reimplemented in EstarPlanner.

◆ getValue()

double getValue ( const Point2f worldPos,
bool  ignoreDoubleBuffer = false 
) const
virtual

Implementation of AbstractMetricPlanner::getValue(const Point2f&, bool)

Implements AbstractMetricPlanner.

◆ getValueMap()

double getValueMap ( const Point2i mapPos,
bool  ignoreDoubleBuffer = false 
) const

Returns the cost value at position (in map coordinates) in the planner map.

By default the value is taken from the double buffer (if enabled), to ensure the returned value is valid, even while planning is in progress. This can be suppressed by ignoreDoubleBuffer=true.

◆ getCurrentValueMap()

virtual double getCurrentValueMap ( const Point2i mapPos) const
pure virtual

Returns the cost value at position (in map coordinates) in the current planner map.

Implemented in EstarPlanner.

◆ getValueFiltered()

virtual double getValueFiltered ( const Point2f worldPos,
bool  ignoreDoubleBuffer = false 
) const
virtual

Implementation of AbstractMetricPlanner::getValueFiltered(const Point2f&, bool)

Implements AbstractMetricPlanner.

◆ getCarrot()

virtual Carrot getCarrot ( const Point2f pos,
int  maxCount,
float  maxDistance = 1e10f 
) const
virtual

Implementation of AbstractMetricPlanner::getCarrot(const Point2f&, int, float)

Implements AbstractMetricPlanner.

◆ getCurrentCarrot()

virtual Carrot getCurrentCarrot ( const Point2f pos,
int  maxCount,
float  maxDistance = 1e10f 
) const
pure virtual

Return the optimal path to the goal, starting at pos, based on the current planner map.

See AbstractMetricPlanner::getCarrot(worldPos, ignoreDoubleBuffer)

Implemented in EstarPlanner.

◆ getDoubleBufferCarrot()

virtual Carrot getDoubleBufferCarrot ( const Point2f pos,
int  maxCount,
float  maxDistance = 1e10f 
) const
virtual

Return the optimal path to the goal, starting at pos, based on the double buffer.

See AbstractMetricPlanner::getCarrot(worldPos, ignoreDoubleBuffer)

◆ getCurrentGoal()

virtual Pose2 getCurrentGoal ( const Point2f pos) const
virtual

Implementation of AbstractMetricPlanner::getCurrentGoal(const Point2f&)

Implements AbstractMetricPlanner.

◆ world2map()

Point2i world2map ( const Point2f p) const
inlinevirtual

Implementation of AbstractMetricPlanner::world2map(const Point2f&)

Note
The point is not checked against exceeding the map boundaries.
Exceptions
XLogical,ifno costmap was created yet.

Implements AbstractMetricPlanner.

◆ map2world()

Point2f map2world ( const Point2i p) const
inlinevirtual

Implementation of AbstractMetricPlanner::world2map(const Point2i&)

Exceptions
XLogical,ifno costmap was created yet.

Implements AbstractMetricPlanner.

◆ getCellSize()

float getCellSize ( ) const
inlinevirtual

Implementation of AbstractMetricPlanner::getCellSize()

Exceptions
XLogical,ifno costmap was created yet.

Implements AbstractMetricPlanner.

◆ getRegion()

Rect2f getRegion ( ) const
inlinevirtual

Implementation of AbstractMetricPlanner::getRegion()

Exceptions
XLogical,ifno costmap was created yet.

Implements AbstractMetricPlanner.

◆ getMapRegion()

Rect2i getMapRegion ( ) const
inlinevirtual

Implementation of AbstractMetricPlanner::getMapRegion()

Exceptions
XLogical,ifno costmap was created yet.

Implements AbstractMetricPlanner.

◆ getUseDoubleBuffer()

bool getUseDoubleBuffer ( ) const
inline

Double buffer enabled?

◆ getPersistentDoubleBuffer()

bool getPersistentDoubleBuffer ( ) const
inline

Persistent double buffer enabled (i.e. not reset on setting goal)?

◆ getAccumulatedPlanningTime()

Duration getAccumulatedPlanningTime ( ) const
inlinevirtual

◆ setGoal() [1/5]

void setGoal ( const Point2f goal,
float  radius,
bool  clearDoubleBuffer = true,
bool  prepareNew = true 
)
virtual

◆ setGoal() [2/5]

void setGoal ( const Polygon2i polygon,
int  radius = 1,
bool  clearDoubleBuffer = true,
bool  prepareNew = true 
)
virtual

◆ setGoal() [3/5]

void setGoal ( const Polygon2f polygon,
float  radius = 0.1f,
bool  clearDoubleBuffer = true,
bool  prepareNew = true 
)
virtual

◆ setGoal() [4/5]

void setGoal ( const Polygon2i polygon,
int  radius,
CostFn costFn,
bool  clearDoubleBuffer = true,
bool  prepareNew = true 
)
virtual

Implementation of AbstractMetricPlanner::setGoal(const Polygon2i&, int, CostFn, bool, bool)

Implements AbstractMetricPlanner.

◆ setGoal() [5/5]

void setGoal ( const Polygon2f polygon,
float  radius,
CostFn costFn,
bool  clearDoubleBuffer = true,
bool  prepareNew = true 
)
virtual

Implementation of AbstractMetricPlanner::setGoal(const Polygon2f&, float, CostFn, bool, bool)

Implements AbstractMetricPlanner.

◆ defaultCostFn()

float defaultCostFn ( int  x,
int  y,
float  r 
)

A default cost function which is always returning r (radius)

◆ isValid()

virtual bool isValid ( ) const
protectedvirtual

Return whether planner is properly initialized and able to calculate a path (when a goal is set)

Reimplemented in EstarPlanner.

◆ reset()

virtual void reset ( )
protectedvirtual

Re-initialize internal structures.

Reimplemented in EstarPlanner.

◆ resetDoubleBuffer()

virtual void resetDoubleBuffer ( bool  createNew)
protectedvirtual

Set the entire double buffer to infinity.

If createNew = true, create a new double buffer array first (with size matching the costmap).

◆ copyDoubleBuffer()

virtual void copyDoubleBuffer ( )
protectedpure virtual

Copy entire field of internally calculated cost values to mDoubleBuffer.

Implemented in EstarPlanner.

◆ prepareNewGoal()

void prepareNewGoal ( bool  clearDoubleBuffer)
protected

Call removeGoals() and reset all status and timing data related to planning on the current goal.

If clearDoubleBuffer = true (and double buffer is active and not persistent), reset and invalidate current double buffer.

◆ removeGoals()

virtual void removeGoals ( )
protectedpure virtual

Remove all set goals.

Implemented in EstarPlanner.

◆ addGoal()

virtual void addGoal ( const Point2i p,
float  cost 
)
protectedpure virtual

Add a goal cell with a certain cost (e.g.

for goal regions, costs may be set to increase from inside to edge of the region).

Implemented in EstarPlanner.

◆ freeCell()

virtual void freeCell ( const Point2i p)
protectedpure virtual

Mark a cell as free in the planner's internal cost function representation.

Implemented in EstarPlanner.

◆ dirtyCell()

virtual void dirtyCell ( const Point2i p,
double  value 
)
protectedpure virtual

Update a cell's cost map value in the planner's internal cost function representation.

Implemented in EstarPlanner.

◆ getCarrotFromMap()

AbstractMetricPlanner::Carrot getCarrotFromMap ( const maps::CostMap map,
const Point2f pos,
int  maxCount,
float  maxDistance 
) const
protected

Calculate a path through the given costmap, starting at pos and following the gradient computed by computeStableGradientFromMap.

Stops when path exceeds maxCount steps or a distance of maxDistance from pos, or when it reaches the goal.

◆ computeStableGradientFromMap()

int computeStableGradientFromMap ( const maps::CostMap map,
int  ix,
int  iy,
double  baseVal,
double  stepsize,
double &  dx,
double &  dy,
double &  gx,
double &  gy 
) const
protected

◆ plan()

void plan ( const Point2f pos,
Duration  plantime 
)
virtual

◆ havePlan()

bool havePlan ( ) const
inlinevirtual

◆ havePlanSinceUpdate()

bool havePlanSinceUpdate ( ) const
inlinevirtual

◆ lastValidPlan()

Time lastValidPlan ( ) const
inlinevirtual

◆ planTime()

void planTime ( Duration  plantime)
virtual

◆ planSteps()

void planSteps ( int  steps)
virtual

◆ resetPlanningTimeout()

void resetPlanningTimeout ( )
virtual

◆ getNavFunction()

maps::CostMap getNavFunction ( bool  ignoreDoubleBuffer = false) const
virtual

Implementation of AbstractMetricPlanner::getNavFunction(bool)

Implements AbstractMetricPlanner.

◆ getCurrentNavFunction()

virtual maps::CostMap getCurrentNavFunction ( ) const
pure virtual

Creates a deep copy of the current navigation function that contains the accumulated costs from each cell to the goal as a potential field (not from double buffer).

Implemented in EstarPlanner.

◆ dumpNavStatus()

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

◆ showNavFunctionNearGoal()

maps::GridMap<uint8,3> showNavFunctionNearGoal ( )
virtual

◆ getStatus()

Status getStatus ( const Point2f p) const
virtual

Implementation of AbstractMetricPlanner::getStatus(const Point2f&)

Implements AbstractMetricPlanner.

◆ getStatusMap()

virtual Status getStatusMap ( const Point2i p) const
virtual

Base class just returns whether p is in the map (VALID) or out (OUT_OF_GRID) Subclasses should override to give a more detailed status.

Reimplemented in EstarPlanner.

◆ getStatusField()

virtual Img8U1 getStatusField ( ) const
protectedvirtual

Return the result of getStatusMap(const Point2i&) over the entire map area.

If a subclass overrides getStatusMap, it should also override getStatusField.

Reimplemented in EstarPlanner.

◆ filteredCorner()

double filteredCorner ( double  self,
double  xnb,
double  ynb,
double  diagnb 
) const
protected

Fix infinite (invalid) values by replacing with finite neighbour values, if available.

This is applied to each of the values in a 2x2 patch before interpolating from them the value at an arbitrary exact position inbetween.

◆ initialize() [1/2]

void initialize ( Authority parent)
inherited

◆ initialize() [2/2]

virtual void initialize ( )
inlineprotectedvirtualinherited

Called in initialize(parent).

Default implementation is empty, can be overwritten in subclasses.

◆ update() [2/2]

void update ( const maps::CostMap map)
inherited

Update the planning context with the current costmap (entire area).

Calls update(map, {mapArea}) for the actual work.

◆ setRobotPosition()

virtual void setRobotPosition ( const Point2f robotPos)
inlinevirtualinherited

Set the current robot position in planner (world position) Base implementation is empty.

◆ hasValidGoal()

virtual bool hasValidGoal ( ) const
pure virtualinherited

Check if the internal planner has a goal.

This can be false even after calling setGoal() e.g. if the entire goal region was occupied by obstacles (which might warrant trying to set the goal again after updating the map).

Implemented in EstarPlanner.

◆ haveWork()

virtual bool haveWork ( ) const
pure virtualinherited

Low level planning interface.

Returns true, if more planning can be done.

Implemented in EstarPlanner.

◆ planStep()

virtual void planStep ( )
pure virtualinherited

Low level planning interface.

Performs a single iteration in wavefront propagation.

Implemented in EstarPlanner.

Member Data Documentation

◆ mSize

Size2i mSize
protected

◆ mCostMap

maps::CostMap mCostMap
protected

◆ mDoubleBuffer

maps::CostMap mDoubleBuffer
protected

◆ mLastPlan

Time mLastPlan
protected

◆ mLastValidPlan

Time mLastValidPlan
protected

◆ mAccumulatedPlanningTime

Duration mAccumulatedPlanningTime
protected

◆ mMaxPlanningTime

Duration mMaxPlanningTime
protected

◆ mPathLostTimeout

Duration mPathLostTimeout
protected

◆ mHadValidPlan

bool mHadValidPlan
protected

◆ mHadValidPlanSinceUpdate

bool mHadValidPlanSinceUpdate
protected

◆ mPathLostReported

bool mPathLostReported
protected

◆ mNavfscale

float mNavfscale
protected

◆ mHasPointGoal

bool mHasPointGoal
protected

◆ mPointGoal

Point2f mPointGoal
protected

◆ mPointGoalCell

Point2i mPointGoalCell
protected

◆ mPointGoalPyrBorder

Eigen::VectorXf mPointGoalPyrBorder
protected

◆ mPointGoalPyrSlope

Eigen::VectorXf mPointGoalPyrSlope
protected

◆ mUseDoubleBuffer

bool mUseDoubleBuffer
protected

◆ mGetCarrotFromDoubleBuffer

bool mGetCarrotFromDoubleBuffer
protected

◆ mDoubleBufferValid

bool mDoubleBufferValid
protected

◆ mPersistentDoubleBuffer

bool mPersistentDoubleBuffer
protected

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