The CostmapNavigationServer makes Move Base Flex backwards compatible to the old move_base. It combines the execution classes which use the nav_core/BaseLocalPlanner, nav_core/BaseCostmapPlanner and the nav_core/RecoveryBehavior base classes as plugin interfaces. These plugin interface are the same for the old move_base. More...
#include <costmap_navigation_server.h>
Public Types | |
typedef boost::shared_ptr < costmap_2d::Costmap2DROS > | CostmapPtr |
typedef boost::shared_ptr < CostmapNavigationServer > | Ptr |
Public Member Functions | |
CostmapNavigationServer (const TFPtr &tf_listener_ptr) | |
Constructor. | |
virtual void | stop () |
virtual | ~CostmapNavigationServer () |
Destructor. | |
Private Member Functions | |
bool | callServiceCheckPathCost (mbf_msgs::CheckPath::Request &request, mbf_msgs::CheckPath::Response &response) |
Callback method for the check_path_cost service. | |
bool | callServiceCheckPointCost (mbf_msgs::CheckPoint::Request &request, mbf_msgs::CheckPoint::Response &response) |
Callback method for the check_point_cost service. | |
bool | callServiceCheckPoseCost (mbf_msgs::CheckPose::Request &request, mbf_msgs::CheckPose::Response &response) |
Callback method for the check_pose_cost service. | |
bool | callServiceClearCostmaps (std_srvs::Empty::Request &request, std_srvs::Empty::Response &response) |
Callback method for the make_plan service. | |
void | checkActivateCostmaps () |
Check whether the costmaps should be activated. | |
void | checkDeactivateCostmaps () |
Check whether the costmaps should and could be deactivated. | |
void | deactivateCostmaps (const ros::TimerEvent &event) |
Timer-triggered deactivation of both costmaps. | |
virtual bool | initializeControllerPlugin (const std::string &name, const mbf_abstract_core::AbstractController::Ptr &controller_ptr) |
Initializes the controller plugin with its name, a pointer to the TransformListener and pointer to the costmap. | |
virtual bool | initializePlannerPlugin (const std::string &name, const mbf_abstract_core::AbstractPlanner::Ptr &planner_ptr) |
Initializes the controller plugin with its name and pointer to the costmap. | |
virtual bool | initializeRecoveryPlugin (const std::string &name, const mbf_abstract_core::AbstractRecovery::Ptr &behavior_ptr) |
Initializes a recovery behavior plugin with its name and pointers to the global and local costmaps. | |
virtual mbf_abstract_core::AbstractController::Ptr | loadControllerPlugin (const std::string &controller_type) |
Loads the plugin associated with the given controller type parameter. | |
virtual mbf_abstract_core::AbstractPlanner::Ptr | loadPlannerPlugin (const std::string &planner_type) |
Loads the plugin associated with the given planner_type parameter. | |
virtual mbf_abstract_core::AbstractRecovery::Ptr | loadRecoveryPlugin (const std::string &recovery_type) |
Loads a Recovery plugin associated with given recovery type parameter. | |
virtual mbf_abstract_nav::AbstractControllerExecution::Ptr | newControllerExecution (const std::string name, const mbf_abstract_core::AbstractController::Ptr plugin_ptr) |
shared pointer to a new ControllerExecution | |
virtual mbf_abstract_nav::AbstractPlannerExecution::Ptr | newPlannerExecution (const std::string name, const mbf_abstract_core::AbstractPlanner::Ptr plugin_ptr) |
shared pointer to a new PlannerExecution | |
virtual mbf_abstract_nav::AbstractRecoveryExecution::Ptr | newRecoveryExecution (const std::string name, const mbf_abstract_core::AbstractRecovery::Ptr plugin_ptr) |
shared pointer to a new RecoveryExecution | |
void | reconfigure (mbf_costmap_nav::MoveBaseFlexConfig &config, uint32_t level) |
Reconfiguration method called by dynamic reconfigure. | |
Private Attributes | |
boost::mutex | check_costmaps_mutex_ |
Start/stop costmaps mutex; concurrent calls to start can lead to segfault. | |
ros::ServiceServer | check_path_cost_srv_ |
Service Server for the check_path_cost service. | |
ros::ServiceServer | check_point_cost_srv_ |
Service Server for the check_point_cost service. | |
ros::ServiceServer | check_pose_cost_srv_ |
Service Server for the check_pose_cost service. | |
ros::ServiceServer | clear_costmaps_srv_ |
Service Server for the clear_costmap service. | |
pluginlib::ClassLoader < mbf_costmap_core::CostmapController > | controller_plugin_loader_ |
uint16_t | costmaps_users_ |
keep track of plugins using costmaps | |
mbf_costmap_nav::MoveBaseFlexConfig | default_config_ |
the default parameter configuration save | |
DynamicReconfigureServerCostmapNav | dsrv_costmap_ |
Dynamic reconfigure server for the mbf_costmap2d_specific part. | |
CostmapPtr | global_costmap_ptr_ |
Shared pointer to the common global costmap. | |
mbf_costmap_nav::MoveBaseFlexConfig | last_config_ |
last configuration save | |
CostmapPtr | local_costmap_ptr_ |
Shared pointer to the common local costmap. | |
pluginlib::ClassLoader < nav_core::BaseLocalPlanner > | nav_core_controller_plugin_loader_ |
pluginlib::ClassLoader < nav_core::BaseGlobalPlanner > | nav_core_planner_plugin_loader_ |
pluginlib::ClassLoader < nav_core::RecoveryBehavior > | nav_core_recovery_plugin_loader_ |
pluginlib::ClassLoader < mbf_costmap_core::CostmapPlanner > | planner_plugin_loader_ |
pluginlib::ClassLoader < mbf_costmap_core::CostmapRecovery > | recovery_plugin_loader_ |
bool | setup_reconfigure_ |
true, if the dynamic reconfigure has been setup | |
bool | shutdown_costmaps_ |
Stop updating costmaps when not planning or controlling, if true. | |
ros::Duration | shutdown_costmaps_delay_ |
costmpas delayed shutdown delay | |
ros::Timer | shutdown_costmaps_timer_ |
costmpas delayed shutdown timer |
The CostmapNavigationServer makes Move Base Flex backwards compatible to the old move_base. It combines the execution classes which use the nav_core/BaseLocalPlanner, nav_core/BaseCostmapPlanner and the nav_core/RecoveryBehavior base classes as plugin interfaces. These plugin interface are the same for the old move_base.
Definition at line 78 of file costmap_navigation_server.h.
typedef boost::shared_ptr<costmap_2d::Costmap2DROS> mbf_costmap_nav::CostmapNavigationServer::CostmapPtr |
Definition at line 82 of file costmap_navigation_server.h.
typedef boost::shared_ptr<CostmapNavigationServer> mbf_costmap_nav::CostmapNavigationServer::Ptr |
Definition at line 84 of file costmap_navigation_server.h.
mbf_costmap_nav::CostmapNavigationServer::CostmapNavigationServer | ( | const TFPtr & | tf_listener_ptr | ) |
Constructor.
tf_listener_ptr | Shared pointer to a common TransformListener |
Definition at line 58 of file costmap_navigation_server.cpp.
Destructor.
Definition at line 333 of file costmap_navigation_server.cpp.
bool mbf_costmap_nav::CostmapNavigationServer::callServiceCheckPathCost | ( | mbf_msgs::CheckPath::Request & | request, |
mbf_msgs::CheckPath::Response & | response | ||
) | [private] |
Callback method for the check_path_cost service.
request | Request object, see the mbf_msgs/CheckPath service definition file. |
response | Response object, see the mbf_msgs/CheckPath service definition file. |
Definition at line 589 of file costmap_navigation_server.cpp.
bool mbf_costmap_nav::CostmapNavigationServer::callServiceCheckPointCost | ( | mbf_msgs::CheckPoint::Request & | request, |
mbf_msgs::CheckPoint::Response & | response | ||
) | [private] |
Callback method for the check_point_cost service.
request | Request object, see the mbf_msgs/CheckPoint service definition file. |
response | Response object, see the mbf_msgs/CheckPoint service definition file. |
Definition at line 387 of file costmap_navigation_server.cpp.
bool mbf_costmap_nav::CostmapNavigationServer::callServiceCheckPoseCost | ( | mbf_msgs::CheckPose::Request & | request, |
mbf_msgs::CheckPose::Response & | response | ||
) | [private] |
Callback method for the check_pose_cost service.
request | Request object, see the mbf_msgs/CheckPose service definition file. |
response | Response object, see the mbf_msgs/CheckPose service definition file. |
Definition at line 465 of file costmap_navigation_server.cpp.
bool mbf_costmap_nav::CostmapNavigationServer::callServiceClearCostmaps | ( | std_srvs::Empty::Request & | request, |
std_srvs::Empty::Response & | response | ||
) | [private] |
Callback method for the make_plan service.
request | Empty request object. |
response | Empty response object. |
Definition at line 732 of file costmap_navigation_server.cpp.
void mbf_costmap_nav::CostmapNavigationServer::checkActivateCostmaps | ( | ) | [private] |
Check whether the costmaps should be activated.
Definition at line 746 of file costmap_navigation_server.cpp.
void mbf_costmap_nav::CostmapNavigationServer::checkDeactivateCostmaps | ( | ) | [private] |
Check whether the costmaps should and could be deactivated.
Definition at line 763 of file costmap_navigation_server.cpp.
void mbf_costmap_nav::CostmapNavigationServer::deactivateCostmaps | ( | const ros::TimerEvent & | event | ) | [private] |
Timer-triggered deactivation of both costmaps.
Definition at line 776 of file costmap_navigation_server.cpp.
bool mbf_costmap_nav::CostmapNavigationServer::initializeControllerPlugin | ( | const std::string & | name, |
const mbf_abstract_core::AbstractController::Ptr & | controller_ptr | ||
) | [private, virtual] |
Initializes the controller plugin with its name, a pointer to the TransformListener and pointer to the costmap.
name | The name of the controller |
controller_ptr | pointer to the controller object which corresponds to the name param |
Implements mbf_abstract_nav::AbstractNavigationServer.
Definition at line 230 of file costmap_navigation_server.cpp.
bool mbf_costmap_nav::CostmapNavigationServer::initializePlannerPlugin | ( | const std::string & | name, |
const mbf_abstract_core::AbstractPlanner::Ptr & | planner_ptr | ||
) | [private, virtual] |
Initializes the controller plugin with its name and pointer to the costmap.
name | The name of the planner |
planner_ptr | pointer to the planner object which corresponds to the name param |
Implements mbf_abstract_nav::AbstractNavigationServer.
Definition at line 178 of file costmap_navigation_server.cpp.
bool mbf_costmap_nav::CostmapNavigationServer::initializeRecoveryPlugin | ( | const std::string & | name, |
const mbf_abstract_core::AbstractRecovery::Ptr & | behavior_ptr | ||
) | [private, virtual] |
Initializes a recovery behavior plugin with its name and pointers to the global and local costmaps.
name | The name of the recovery behavior |
behavior_ptr | pointer to the recovery behavior object which corresponds to the name param |
Implements mbf_abstract_nav::AbstractNavigationServer.
Definition at line 292 of file costmap_navigation_server.cpp.
mbf_abstract_core::AbstractController::Ptr mbf_costmap_nav::CostmapNavigationServer::loadControllerPlugin | ( | const std::string & | controller_type | ) | [private, virtual] |
Loads the plugin associated with the given controller type parameter.
controller_type | The type of the controller plugin |
Implements mbf_abstract_nav::AbstractNavigationServer.
Definition at line 199 of file costmap_navigation_server.cpp.
mbf_abstract_core::AbstractPlanner::Ptr mbf_costmap_nav::CostmapNavigationServer::loadPlannerPlugin | ( | const std::string & | planner_type | ) | [private, virtual] |
Loads the plugin associated with the given planner_type parameter.
planner_type | The type of the planner plugin to load. |
Implements mbf_abstract_nav::AbstractNavigationServer.
Definition at line 146 of file costmap_navigation_server.cpp.
mbf_abstract_core::AbstractRecovery::Ptr mbf_costmap_nav::CostmapNavigationServer::loadRecoveryPlugin | ( | const std::string & | recovery_type | ) | [private, virtual] |
Loads a Recovery plugin associated with given recovery type parameter.
recovery_name | The name of the Recovery plugin |
Implements mbf_abstract_nav::AbstractNavigationServer.
Definition at line 255 of file costmap_navigation_server.cpp.
mbf_abstract_nav::AbstractControllerExecution::Ptr mbf_costmap_nav::CostmapNavigationServer::newControllerExecution | ( | const std::string | name, |
const mbf_abstract_core::AbstractController::Ptr | plugin_ptr | ||
) | [private, virtual] |
shared pointer to a new ControllerExecution
Reimplemented from mbf_abstract_nav::AbstractNavigationServer.
Definition at line 115 of file costmap_navigation_server.cpp.
mbf_abstract_nav::AbstractPlannerExecution::Ptr mbf_costmap_nav::CostmapNavigationServer::newPlannerExecution | ( | const std::string | name, |
const mbf_abstract_core::AbstractPlanner::Ptr | plugin_ptr | ||
) | [private, virtual] |
shared pointer to a new PlannerExecution
Reimplemented from mbf_abstract_nav::AbstractNavigationServer.
Definition at line 102 of file costmap_navigation_server.cpp.
mbf_abstract_nav::AbstractRecoveryExecution::Ptr mbf_costmap_nav::CostmapNavigationServer::newRecoveryExecution | ( | const std::string | name, |
const mbf_abstract_core::AbstractRecovery::Ptr | plugin_ptr | ||
) | [private, virtual] |
shared pointer to a new RecoveryExecution
Reimplemented from mbf_abstract_nav::AbstractNavigationServer.
Definition at line 131 of file costmap_navigation_server.cpp.
void mbf_costmap_nav::CostmapNavigationServer::reconfigure | ( | mbf_costmap_nav::MoveBaseFlexConfig & | config, |
uint32_t | level | ||
) | [private] |
Reconfiguration method called by dynamic reconfigure.
config | Configuration parameters. See the MoveBaseFlexConfig definition. |
level | bit mask, which parameters are set. |
Definition at line 337 of file costmap_navigation_server.cpp.
void mbf_costmap_nav::CostmapNavigationServer::stop | ( | ) | [virtual] |
Reimplemented from mbf_abstract_nav::AbstractNavigationServer.
Definition at line 324 of file costmap_navigation_server.cpp.
boost::mutex mbf_costmap_nav::CostmapNavigationServer::check_costmaps_mutex_ [private] |
Start/stop costmaps mutex; concurrent calls to start can lead to segfault.
Definition at line 273 of file costmap_navigation_server.h.
Service Server for the check_path_cost service.
Definition at line 261 of file costmap_navigation_server.h.
Service Server for the check_point_cost service.
Definition at line 255 of file costmap_navigation_server.h.
Service Server for the check_pose_cost service.
Definition at line 258 of file costmap_navigation_server.h.
Service Server for the clear_costmap service.
Definition at line 264 of file costmap_navigation_server.h.
pluginlib::ClassLoader<mbf_costmap_core::CostmapController> mbf_costmap_nav::CostmapNavigationServer::controller_plugin_loader_ [private] |
Definition at line 231 of file costmap_navigation_server.h.
uint16_t mbf_costmap_nav::CostmapNavigationServer::costmaps_users_ [private] |
keep track of plugins using costmaps
Definition at line 268 of file costmap_navigation_server.h.
mbf_costmap_nav::MoveBaseFlexConfig mbf_costmap_nav::CostmapNavigationServer::default_config_ [private] |
the default parameter configuration save
Reimplemented from mbf_abstract_nav::AbstractNavigationServer.
Definition at line 243 of file costmap_navigation_server.h.
DynamicReconfigureServerCostmapNav mbf_costmap_nav::CostmapNavigationServer::dsrv_costmap_ [private] |
Dynamic reconfigure server for the mbf_costmap2d_specific part.
Definition at line 237 of file costmap_navigation_server.h.
Shared pointer to the common global costmap.
Definition at line 252 of file costmap_navigation_server.h.
mbf_costmap_nav::MoveBaseFlexConfig mbf_costmap_nav::CostmapNavigationServer::last_config_ [private] |
last configuration save
Reimplemented from mbf_abstract_nav::AbstractNavigationServer.
Definition at line 240 of file costmap_navigation_server.h.
Shared pointer to the common local costmap.
Definition at line 249 of file costmap_navigation_server.h.
pluginlib::ClassLoader<nav_core::BaseLocalPlanner> mbf_costmap_nav::CostmapNavigationServer::nav_core_controller_plugin_loader_ [private] |
Definition at line 232 of file costmap_navigation_server.h.
pluginlib::ClassLoader<nav_core::BaseGlobalPlanner> mbf_costmap_nav::CostmapNavigationServer::nav_core_planner_plugin_loader_ [private] |
Definition at line 234 of file costmap_navigation_server.h.
pluginlib::ClassLoader<nav_core::RecoveryBehavior> mbf_costmap_nav::CostmapNavigationServer::nav_core_recovery_plugin_loader_ [private] |
Definition at line 230 of file costmap_navigation_server.h.
pluginlib::ClassLoader<mbf_costmap_core::CostmapPlanner> mbf_costmap_nav::CostmapNavigationServer::planner_plugin_loader_ [private] |
Definition at line 233 of file costmap_navigation_server.h.
pluginlib::ClassLoader<mbf_costmap_core::CostmapRecovery> mbf_costmap_nav::CostmapNavigationServer::recovery_plugin_loader_ [private] |
Definition at line 229 of file costmap_navigation_server.h.
bool mbf_costmap_nav::CostmapNavigationServer::setup_reconfigure_ [private] |
true, if the dynamic reconfigure has been setup
Reimplemented from mbf_abstract_nav::AbstractNavigationServer.
Definition at line 246 of file costmap_navigation_server.h.
bool mbf_costmap_nav::CostmapNavigationServer::shutdown_costmaps_ [private] |
Stop updating costmaps when not planning or controlling, if true.
Definition at line 267 of file costmap_navigation_server.h.
costmpas delayed shutdown delay
Definition at line 270 of file costmap_navigation_server.h.
costmpas delayed shutdown timer
Definition at line 269 of file costmap_navigation_server.h.