Hi, I am using locomove_base in ros-kinetic on ubuntu16.04 and was facing some problem with costmap_clear. My robot is publishing the message of clearing cost but its not clearing the costmap. I even tried adding a subscriber in locomove_base.cpp so that I can clear costmap whenever I need to but the same thing happens the message is being published but costmaps aren't clearing. Is there some other way to clear costmaps manually?
and this is the subscriber I added to clear costmap:
Hi, I am using locomove_base in ros-kinetic on ubuntu16.04 and was facing some problem with costmap_clear. My robot is publishing the message of clearing cost but its not clearing the costmap. I even tried adding a subscriber in locomove_base.cpp so that I can clear costmap whenever I need to but the same thing happens the message is being published but costmaps aren't clearing. Is there some other way to clear costmaps manually? and this is the subscriber I added to clear costmap:
void LocoMoveBase::clearCostmap(const std_msgs::EmptyConstPtr& msg) { ROS_INFO("Clearing costmap....");
TFListenerPtr tf = locomotor_.getTFListener();
recoverybehaviors.clear();
// first, we'll load a recovery behavior to clear the costmap boost::shared_ptr ags_clear(
recoveryloader.createInstance("clear_costmap_recovery/ClearCostmapRecovery"));
ags_clear->initialize("aggressive_reset", tf.get(), planner_costmapros, controller_costmapros);
recoverybehaviors.push_back(ags_clear);
recoverybehaviors[0]->runBehavior(); }
I am attaching the images which show that even after blocking the path costmaps aren't cleaning.