48 const std::string name,
51 const MoveBaseFlexConfig &config,
52 boost::function<
void()> setup_fn,
53 boost::function<
void()> cleanup_fn)
54 : AbstractPlannerExecution(name, planner_ptr, toAbstract(config), setup_fn, cleanup_fn),
55 costmap_ptr_(costmap_ptr)
68 mbf_abstract_nav::MoveBaseFlexConfig abstract_config;
69 abstract_config.planner_frequency = config.planner_frequency;
70 abstract_config.planner_patience = config.planner_patience;
71 abstract_config.planner_max_retries = config.planner_max_retries;
72 return abstract_config;
76 const geometry_msgs::PoseStamped& goal,
78 std::vector<geometry_msgs::PoseStamped> &plan,
84 boost::unique_lock<costmap_2d::Costmap2D::mutex_t> lock(*(
costmap_ptr_->getCostmap()->getMutex()));
85 return planner_->makePlan(start, goal, tolerance, plan, cost, message);
87 return planner_->makePlan(start, goal, tolerance, plan, cost, message);
CostmapPlannerExecution(const std::string name, const mbf_costmap_core::CostmapPlanner::Ptr &planner_ptr, CostmapPtr &costmap, const MoveBaseFlexConfig &config, boost::function< void()> setup_fn, boost::function< void()> cleanup_fn)
Constructor.
virtual uint32_t makePlan(const geometry_msgs::PoseStamped &start, const geometry_msgs::PoseStamped &goal, double tolerance, std::vector< geometry_msgs::PoseStamped > &plan, double &cost, std::string &message)
Calls the planner plugin to make a plan from the start pose to the goal pose with the given tolerance...
virtual ~CostmapPlannerExecution()
Destructor.
CostmapPtr & costmap_ptr_
Shared pointer to the global planner costmap.
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
bool lock_costmap_
Whether to lock costmap before calling the planner (see issue #4 for details)
mbf_abstract_core::AbstractPlanner::Ptr planner_
mbf_abstract_nav::MoveBaseFlexConfig toAbstract(const MoveBaseFlexConfig &config)