MIRA
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PathObjective Class Reference

#include <topomap/objective/PathObjective.h>

Inheritance diagram for PathObjective:
Inheritance graph
[legend]

Public Member Functions

template<typename Reflector >
void reflect (Reflector &r)
 
virtual void initialize ()
 
virtual void setTask (boost::shared_ptr< navigation::Task > task)
 
virtual bool inGoalRegion (const Pose2 &iRobotInMap, const Point2f &iGoalInMap, const boost::shared_ptr< navigation::PositionTask > &task)
 
virtual bool reachedTask ()
 
virtual void update ()
 
virtual void plan (Duration plantime)
 
virtual void prepareVote (float lookAheadTime)
 
virtual Vote vote (const mira::robot::PoseVelocityTrajectory &trajectory, float lookAheadTime)
 
virtual bool haveValidPath ()
 Is called in prepareVote() to check if the current path is valid and ready to be used. More...
 
virtual void updateMetricPlannerGoal (mira::pilot::AbstractMetricPlannerPtr planner, bool initial)
 Is called in plan to set or update the goal position, if the goal is moving, e.g. More...
 
void setAdditionalLinkCosts (const std::string &fromGWName, const std::string &toGWName, double costs)
 Define additional costs for a specific link. More...
 
void resetAllAdditionalLinkCosts ()
 Reset all additional gateways costs to zero. More...
 
void waitForInitCostMapUpdate ()
 If called the objective will wait for the next InitCostMap update before updating the path. More...
 

Protected Member Functions

void onInitCostMapChanged (ChannelRead< maps::GridMap< double >> data)
 
virtual bool inGoalHysteresis () const
 
virtual bool causesWork (navigation::TaskPtr task)
 
void clearGoal ()
 
void setGoal (const Point2f &goal, const std::string &frame)
 
void computeLeafCosts (NodePtr node)
 
void localizeGoal (NodePtr node, const std::string &frame, const Point2i &cell, const Point2f &posinmap, MetricCostmapTopoMapPlanner::NodePositionList &nodes)
 
void localizeGoalWorld (NodePtr node, const Point2f &pos, const std::string &goalFrame, MetricCostmapTopoMapPlanner::NodePositionList &nodes, bool stayWithinMapTf)
 

Protected Attributes

TopoMapPtr mTopoMap
 
double mOffset
 
bool mInGoalHysteresis
 
bool mWaitForInitCostMapUpdate
 
Channel< std::vector< std::string > > mLocalizedNodesChannel
 
Channel< maps::GridMap< uint8, 3 > > mDbgNavStatusChannel
 
Channel< mira::model::Marker > mDbgMarkerChannel
 
Channel< MetricCostmapTopoMapPlanner::NextSubGoalmDbgNextSubGoalChannel
 
Channel< std::vector< Point2f > > mPathChannel
 
boost::shared_ptr< navigation::PositionTask > mTask
 
bool mHaveValidPath
 
MetricCostmapTopoMapPlanner mPlanner
 
Channel< maps::GridMap< double > > mInitMapChannel
 
Channel< maps::GridMap< double > > mCurrentMapChannel
 
boost::optional< uint32mLastSequence
 

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ initialize()

virtual void initialize ( )
virtual

◆ setTask()

virtual void setTask ( boost::shared_ptr< navigation::Task >  task)
virtual

◆ inGoalRegion()

virtual bool inGoalRegion ( const Pose2 iRobotInMap,
const Point2f iGoalInMap,
const boost::shared_ptr< navigation::PositionTask > &  task 
)
virtual

◆ reachedTask()

virtual bool reachedTask ( )
virtual

◆ update()

virtual void update ( )
virtual

◆ plan()

virtual void plan ( Duration  plantime)
virtual

◆ prepareVote()

virtual void prepareVote ( float  lookAheadTime)
virtual

◆ vote()

virtual Vote vote ( const mira::robot::PoseVelocityTrajectory &  trajectory,
float  lookAheadTime 
)
virtual

◆ haveValidPath()

virtual bool haveValidPath ( )
virtual

Is called in prepareVote() to check if the current path is valid and ready to be used.

Derived classes can overwrite this method to perform additional checks.

◆ updateMetricPlannerGoal()

virtual void updateMetricPlannerGoal ( mira::pilot::AbstractMetricPlannerPtr  planner,
bool  initial 
)
virtual

Is called in plan to set or update the goal position, if the goal is moving, e.g.

The parameter initial specifies if this is the first call of this method for the goal node.

◆ setAdditionalLinkCosts()

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

Define additional costs for a specific link.

◆ resetAllAdditionalLinkCosts()

void resetAllAdditionalLinkCosts ( )
inline

Reset all additional gateways costs to zero.

◆ waitForInitCostMapUpdate()

void waitForInitCostMapUpdate ( )
inline

If called the objective will wait for the next InitCostMap update before updating the path.

◆ onInitCostMapChanged()

void onInitCostMapChanged ( ChannelRead< maps::GridMap< double >>  data)
protected

◆ inGoalHysteresis()

virtual bool inGoalHysteresis ( ) const
protectedvirtual

◆ causesWork()

virtual bool causesWork ( navigation::TaskPtr  task)
protectedvirtual

◆ clearGoal()

void clearGoal ( )
protected

◆ setGoal()

void setGoal ( const Point2f goal,
const std::string &  frame 
)
protected

◆ computeLeafCosts()

void computeLeafCosts ( NodePtr  node)
protected

◆ localizeGoal()

void localizeGoal ( NodePtr  node,
const std::string &  frame,
const Point2i cell,
const Point2f posinmap,
MetricCostmapTopoMapPlanner::NodePositionList nodes 
)
protected

◆ localizeGoalWorld()

void localizeGoalWorld ( NodePtr  node,
const Point2f pos,
const std::string &  goalFrame,
MetricCostmapTopoMapPlanner::NodePositionList nodes,
bool  stayWithinMapTf 
)
protected

Member Data Documentation

◆ mTopoMap

TopoMapPtr mTopoMap
protected

◆ mOffset

double mOffset
protected

◆ mInGoalHysteresis

bool mInGoalHysteresis
protected

◆ mWaitForInitCostMapUpdate

bool mWaitForInitCostMapUpdate
protected

◆ mLocalizedNodesChannel

Channel<std::vector<std::string> > mLocalizedNodesChannel
protected

◆ mDbgNavStatusChannel

Channel<maps::GridMap<uint8,3> > mDbgNavStatusChannel
protected

◆ mDbgMarkerChannel

Channel<mira::model::Marker> mDbgMarkerChannel
protected

◆ mDbgNextSubGoalChannel

Channel<MetricCostmapTopoMapPlanner::NextSubGoal> mDbgNextSubGoalChannel
protected

◆ mPathChannel

Channel<std::vector<Point2f> > mPathChannel
protected

◆ mTask

boost::shared_ptr<navigation::PositionTask> mTask
protected

◆ mHaveValidPath

bool mHaveValidPath
protected

◆ mPlanner

MetricCostmapTopoMapPlanner mPlanner
protected

◆ mInitMapChannel

Channel<maps::GridMap<double> > mInitMapChannel
protected

◆ mCurrentMapChannel

Channel<maps::GridMap<double> > mCurrentMapChannel
protected

◆ mLastSequence

boost::optional<uint32> mLastSequence
protected

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