Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
mbf_costmap_nav::CostmapNavigationServer Class Reference

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>

Inheritance diagram for mbf_costmap_nav::CostmapNavigationServer:
Inheritance graph
[legend]

Public Types

typedef boost::shared_ptr< CostmapNavigationServerPtr
 

Public Member Functions

 CostmapNavigationServer (const TFPtr &tf_listener_ptr)
 Constructor. More...
 
virtual void stop ()
 
virtual ~CostmapNavigationServer ()
 Destructor. More...
 
- Public Member Functions inherited from mbf_abstract_nav::AbstractNavigationServer
 AbstractNavigationServer (const TFPtr &tf_listener_ptr)
 
virtual void callActionExePath (ActionServerExePath::GoalHandle goal_handle)
 
virtual void callActionGetPath (ActionServerGetPath::GoalHandle goal_handle)
 
virtual void callActionMoveBase (ActionServerMoveBase::GoalHandle goal_handle)
 
virtual void callActionRecovery (ActionServerRecovery::GoalHandle goal_handle)
 
virtual void cancelActionExePath (ActionServerExePath::GoalHandle goal_handle)
 
virtual void cancelActionGetPath (ActionServerGetPath::GoalHandle goal_handle)
 
virtual void cancelActionMoveBase (ActionServerMoveBase::GoalHandle goal_handle)
 
virtual void cancelActionRecovery (ActionServerRecovery::GoalHandle goal_handle)
 
virtual void initializeServerComponents ()
 
virtual void startActionServers ()
 
virtual ~AbstractNavigationServer ()
 

Private Member Functions

bool callServiceCheckPathCost (mbf_msgs::CheckPath::Request &request, mbf_msgs::CheckPath::Response &response)
 Callback method for the check_path_cost service. More...
 
bool callServiceCheckPointCost (mbf_msgs::CheckPoint::Request &request, mbf_msgs::CheckPoint::Response &response)
 Callback method for the check_point_cost service. More...
 
bool callServiceCheckPoseCost (mbf_msgs::CheckPose::Request &request, mbf_msgs::CheckPose::Response &response)
 Callback method for the check_pose_cost service. More...
 
bool callServiceClearCostmaps (std_srvs::Empty::Request &request, std_srvs::Empty::Response &response)
 Callback method for the make_plan service. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual mbf_abstract_core::AbstractController::Ptr loadControllerPlugin (const std::string &controller_type)
 Loads the plugin associated with the given controller type parameter. More...
 
virtual mbf_abstract_core::AbstractPlanner::Ptr loadPlannerPlugin (const std::string &planner_type)
 Loads the plugin associated with the given planner_type parameter. More...
 
virtual mbf_abstract_core::AbstractRecovery::Ptr loadRecoveryPlugin (const std::string &recovery_type)
 Loads a Recovery plugin associated with given recovery type parameter. More...
 
virtual mbf_abstract_nav::AbstractControllerExecution::Ptr newControllerExecution (const std::string &plugin_name, const mbf_abstract_core::AbstractController::Ptr &plugin_ptr)
 Create a new controller execution. More...
 
virtual mbf_abstract_nav::AbstractPlannerExecution::Ptr newPlannerExecution (const std::string &plugin_name, const mbf_abstract_core::AbstractPlanner::Ptr &plugin_ptr)
 Create a new planner execution. More...
 
virtual mbf_abstract_nav::AbstractRecoveryExecution::Ptr newRecoveryExecution (const std::string &plugin_name, const mbf_abstract_core::AbstractRecovery::Ptr &plugin_ptr)
 Create a new recovery behavior execution. More...
 
void reconfigure (mbf_costmap_nav::MoveBaseFlexConfig &config, uint32_t level)
 Reconfiguration method called by dynamic reconfigure. More...
 

Private Attributes

ros::ServiceServer check_path_cost_srv_
 Service Server for the check_path_cost service. More...
 
ros::ServiceServer check_point_cost_srv_
 Service Server for the check_point_cost service. More...
 
ros::ServiceServer check_pose_cost_srv_
 Service Server for the check_pose_cost service. More...
 
ros::ServiceServer clear_costmaps_srv_
 Service Server for the clear_costmap service. More...
 
StringToMap controller_name_to_costmap_ptr_
 Maps the controller names to the costmap ptr. More...
 
pluginlib::ClassLoader< mbf_costmap_core::CostmapControllercontroller_plugin_loader_
 
mbf_costmap_nav::MoveBaseFlexConfig default_config_
 the default parameter configuration save More...
 
DynamicReconfigureServerCostmapNav dsrv_costmap_
 Dynamic reconfigure server for the mbf_costmap2d_specific part. More...
 
const CostmapWrapper::Ptr global_costmap_ptr_
 Shared pointer to the common global costmap. More...
 
mbf_costmap_nav::MoveBaseFlexConfig last_config_
 last configuration save More...
 
const CostmapWrapper::Ptr local_costmap_ptr_
 Shared pointer to the common local costmap. More...
 
pluginlib::ClassLoader< nav_core::BaseLocalPlannernav_core_controller_plugin_loader_
 
pluginlib::ClassLoader< nav_core::BaseGlobalPlannernav_core_planner_plugin_loader_
 
pluginlib::ClassLoader< nav_core::RecoveryBehaviornav_core_recovery_plugin_loader_
 
StringToMap planner_name_to_costmap_ptr_
 Maps planner names to the costmap ptr. More...
 
pluginlib::ClassLoader< mbf_costmap_core::CostmapPlannerplanner_plugin_loader_
 
pluginlib::ClassLoader< mbf_costmap_core::CostmapRecoveryrecovery_plugin_loader_
 
bool setup_reconfigure_
 true, if the dynamic reconfigure has been setup More...
 

Additional Inherited Members

- Protected Member Functions inherited from mbf_abstract_nav::AbstractNavigationServer
virtual void reconfigure (mbf_abstract_nav::MoveBaseFlexConfig &config, uint32_t level)
 
virtual void startDynamicReconfigureServer ()
 
bool transformPlanToGlobalFrame (std::vector< geometry_msgs::PoseStamped > &plan, std::vector< geometry_msgs::PoseStamped > &global_plan)
 
- Protected Attributes inherited from mbf_abstract_nav::AbstractNavigationServer
ActionServerExePathPtr action_server_exe_path_ptr_
 
ActionServerGetPathPtr action_server_get_path_ptr_
 
ActionServerMoveBasePtr action_server_move_base_ptr_
 
ActionServerRecoveryPtr action_server_recovery_ptr_
 
boost::mutex configuration_mutex_
 
ControllerAction controller_action_
 
AbstractPluginManager< mbf_abstract_core::AbstractControllercontroller_plugin_manager_
 
mbf_abstract_nav::MoveBaseFlexConfig default_config_
 
DynamicReconfigureServer dsrv_
 
std::string global_frame_
 
ros::Publisher goal_pub_
 
mbf_abstract_nav::MoveBaseFlexConfig last_config_
 
MoveBaseAction move_base_action_
 
PlannerAction planner_action_
 
AbstractPluginManager< mbf_abstract_core::AbstractPlannerplanner_plugin_manager_
 
ros::NodeHandle private_nh_
 
RecoveryAction recovery_action_
 
AbstractPluginManager< mbf_abstract_core::AbstractRecoveryrecovery_plugin_manager_
 
std::string robot_frame_
 
mbf_utility::RobotInformation robot_info_
 
bool setup_reconfigure_
 
const TFPtr tf_listener_ptr_
 
ros::Duration tf_timeout_
 
ros::Publisher vel_pub_
 

Detailed Description

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 88 of file costmap_navigation_server.h.

Member Typedef Documentation

◆ Ptr

Definition at line 92 of file costmap_navigation_server.h.

Constructor & Destructor Documentation

◆ CostmapNavigationServer()

mbf_costmap_nav::CostmapNavigationServer::CostmapNavigationServer ( const TFPtr tf_listener_ptr)

Constructor.

Parameters
tf_listener_ptrShared pointer to a common TransformListener

Definition at line 156 of file costmap_navigation_server.cpp.

◆ ~CostmapNavigationServer()

mbf_costmap_nav::CostmapNavigationServer::~CostmapNavigationServer ( )
virtual

Destructor.

Definition at line 194 of file costmap_navigation_server.cpp.

Member Function Documentation

◆ callServiceCheckPathCost()

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.

Parameters
requestRequest object, see the mbf_msgs/CheckPath service definition file.
responseResponse object, see the mbf_msgs/CheckPath service definition file.
Returns
true, if the service completed successfully, false otherwise

Definition at line 679 of file costmap_navigation_server.cpp.

◆ callServiceCheckPointCost()

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.

Parameters
requestRequest object, see the mbf_msgs/CheckPoint service definition file.
responseResponse object, see the mbf_msgs/CheckPoint service definition file.
Returns
true, if the service completed successfully, false otherwise

Definition at line 479 of file costmap_navigation_server.cpp.

◆ callServiceCheckPoseCost()

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.

Parameters
requestRequest object, see the mbf_msgs/CheckPose service definition file.
responseResponse object, see the mbf_msgs/CheckPose service definition file.
Returns
true, if the service completed successfully, false otherwise

Definition at line 556 of file costmap_navigation_server.cpp.

◆ callServiceClearCostmaps()

bool mbf_costmap_nav::CostmapNavigationServer::callServiceClearCostmaps ( std_srvs::Empty::Request &  request,
std_srvs::Empty::Response &  response 
)
private

Callback method for the make_plan service.

Parameters
requestEmpty request object.
responseEmpty response object.
Returns
true, if the service completed successfully, false otherwise

Definition at line 822 of file costmap_navigation_server.cpp.

◆ initializeControllerPlugin()

bool mbf_costmap_nav::CostmapNavigationServer::initializeControllerPlugin ( const std::string &  name,
const mbf_abstract_core::AbstractController::Ptr controller_ptr 
)
privatevirtual

Initializes the controller plugin with its name, a pointer to the TransformListener and pointer to the costmap.

Parameters
nameThe name of the controller
controller_ptrpointer to the controller object which corresponds to the name param
Returns
true if init succeeded, false otherwise

Implements mbf_abstract_nav::AbstractNavigationServer.

Definition at line 337 of file costmap_navigation_server.cpp.

◆ initializePlannerPlugin()

bool mbf_costmap_nav::CostmapNavigationServer::initializePlannerPlugin ( const std::string &  name,
const mbf_abstract_core::AbstractPlanner::Ptr planner_ptr 
)
privatevirtual

Initializes the controller plugin with its name and pointer to the costmap.

Parameters
nameThe name of the planner
planner_ptrpointer to the planner object which corresponds to the name param
Returns
true if init succeeded, false otherwise

Implements mbf_abstract_nav::AbstractNavigationServer.

Definition at line 284 of file costmap_navigation_server.cpp.

◆ initializeRecoveryPlugin()

bool mbf_costmap_nav::CostmapNavigationServer::initializeRecoveryPlugin ( const std::string &  name,
const mbf_abstract_core::AbstractRecovery::Ptr behavior_ptr 
)
privatevirtual

Initializes a recovery behavior plugin with its name and pointers to the global and local costmaps.

Parameters
nameThe name of the recovery behavior
behavior_ptrpointer to the recovery behavior object which corresponds to the name param
Returns
true if init succeeded, false otherwise

Implements mbf_abstract_nav::AbstractNavigationServer.

Definition at line 401 of file costmap_navigation_server.cpp.

◆ loadControllerPlugin()

mbf_abstract_core::AbstractController::Ptr mbf_costmap_nav::CostmapNavigationServer::loadControllerPlugin ( const std::string &  controller_type)
privatevirtual

Loads the plugin associated with the given controller type parameter.

Parameters
controller_typeThe type of the controller plugin
Returns
A shared pointer to a new loaded controller, if the controller plugin was loaded successfully, an empty pointer otherwise.

Implements mbf_abstract_nav::AbstractNavigationServer.

Definition at line 306 of file costmap_navigation_server.cpp.

◆ loadPlannerPlugin()

mbf_abstract_core::AbstractPlanner::Ptr mbf_costmap_nav::CostmapNavigationServer::loadPlannerPlugin ( const std::string &  planner_type)
privatevirtual

Loads the plugin associated with the given planner_type parameter.

Parameters
planner_typeThe type of the planner plugin to load.
Returns
true, if the local planner plugin was successfully loaded.

Implements mbf_abstract_nav::AbstractNavigationServer.

Definition at line 252 of file costmap_navigation_server.cpp.

◆ loadRecoveryPlugin()

mbf_abstract_core::AbstractRecovery::Ptr mbf_costmap_nav::CostmapNavigationServer::loadRecoveryPlugin ( const std::string &  recovery_type)
privatevirtual

Loads a Recovery plugin associated with given recovery type parameter.

Parameters
recovery_nameThe name of the Recovery plugin
Returns
A shared pointer to a Recovery plugin, if the plugin was loaded successfully, an empty pointer otherwise.

Implements mbf_abstract_nav::AbstractNavigationServer.

Definition at line 364 of file costmap_navigation_server.cpp.

◆ newControllerExecution()

mbf_abstract_nav::AbstractControllerExecution::Ptr mbf_costmap_nav::CostmapNavigationServer::newControllerExecution ( const std::string &  plugin_name,
const mbf_abstract_core::AbstractController::Ptr plugin_ptr 
)
privatevirtual

Create a new controller execution.

Parameters
plugin_nameName of the controller to use.
plugin_ptrShared pointer to the plugin to use.
Returns
Shared pointer to a new ControllerExecution.

Reimplemented from mbf_abstract_nav::AbstractNavigationServer.

Definition at line 228 of file costmap_navigation_server.cpp.

◆ newPlannerExecution()

mbf_abstract_nav::AbstractPlannerExecution::Ptr mbf_costmap_nav::CostmapNavigationServer::newPlannerExecution ( const std::string &  plugin_name,
const mbf_abstract_core::AbstractPlanner::Ptr plugin_ptr 
)
privatevirtual

Create a new planner execution.

Parameters
plugin_nameName of the planner to use.
plugin_ptrShared pointer to the plugin to use.
Returns
Shared pointer to a new PlannerExecution.

Reimplemented from mbf_abstract_nav::AbstractNavigationServer.

Definition at line 217 of file costmap_navigation_server.cpp.

◆ newRecoveryExecution()

mbf_abstract_nav::AbstractRecoveryExecution::Ptr mbf_costmap_nav::CostmapNavigationServer::newRecoveryExecution ( const std::string &  plugin_name,
const mbf_abstract_core::AbstractRecovery::Ptr plugin_ptr 
)
privatevirtual

Create a new recovery behavior execution.

Parameters
plugin_nameName of the recovery behavior to run.
plugin_ptrShared pointer to the plugin to use
Returns
Shared pointer to a new RecoveryExecution.

Reimplemented from mbf_abstract_nav::AbstractNavigationServer.

Definition at line 239 of file costmap_navigation_server.cpp.

◆ reconfigure()

void mbf_costmap_nav::CostmapNavigationServer::reconfigure ( mbf_costmap_nav::MoveBaseFlexConfig &  config,
uint32_t  level 
)
private

Reconfiguration method called by dynamic reconfigure.

Parameters
configConfiguration parameters. See the MoveBaseFlexConfig definition.
levelbit mask, which parameters are set.

Definition at line 441 of file costmap_navigation_server.cpp.

◆ stop()

void mbf_costmap_nav::CostmapNavigationServer::stop ( )
virtual

Reimplemented from mbf_abstract_nav::AbstractNavigationServer.

Definition at line 433 of file costmap_navigation_server.cpp.

Member Data Documentation

◆ check_path_cost_srv_

ros::ServiceServer mbf_costmap_nav::CostmapNavigationServer::check_path_cost_srv_
private

Service Server for the check_path_cost service.

Definition at line 274 of file costmap_navigation_server.h.

◆ check_point_cost_srv_

ros::ServiceServer mbf_costmap_nav::CostmapNavigationServer::check_point_cost_srv_
private

Service Server for the check_point_cost service.

Definition at line 268 of file costmap_navigation_server.h.

◆ check_pose_cost_srv_

ros::ServiceServer mbf_costmap_nav::CostmapNavigationServer::check_pose_cost_srv_
private

Service Server for the check_pose_cost service.

Definition at line 271 of file costmap_navigation_server.h.

◆ clear_costmaps_srv_

ros::ServiceServer mbf_costmap_nav::CostmapNavigationServer::clear_costmaps_srv_
private

Service Server for the clear_costmap service.

Definition at line 277 of file costmap_navigation_server.h.

◆ controller_name_to_costmap_ptr_

StringToMap mbf_costmap_nav::CostmapNavigationServer::controller_name_to_costmap_ptr_
private

Maps the controller names to the costmap ptr.

Definition at line 265 of file costmap_navigation_server.h.

◆ controller_plugin_loader_

pluginlib::ClassLoader<mbf_costmap_core::CostmapController> mbf_costmap_nav::CostmapNavigationServer::controller_plugin_loader_
private

Definition at line 238 of file costmap_navigation_server.h.

◆ default_config_

mbf_costmap_nav::MoveBaseFlexConfig mbf_costmap_nav::CostmapNavigationServer::default_config_
private

the default parameter configuration save

Definition at line 250 of file costmap_navigation_server.h.

◆ dsrv_costmap_

DynamicReconfigureServerCostmapNav mbf_costmap_nav::CostmapNavigationServer::dsrv_costmap_
private

Dynamic reconfigure server for the mbf_costmap2d_specific part.

Definition at line 244 of file costmap_navigation_server.h.

◆ global_costmap_ptr_

const CostmapWrapper::Ptr mbf_costmap_nav::CostmapNavigationServer::global_costmap_ptr_
private

Shared pointer to the common global costmap.

Definition at line 259 of file costmap_navigation_server.h.

◆ last_config_

mbf_costmap_nav::MoveBaseFlexConfig mbf_costmap_nav::CostmapNavigationServer::last_config_
private

last configuration save

Definition at line 247 of file costmap_navigation_server.h.

◆ local_costmap_ptr_

const CostmapWrapper::Ptr mbf_costmap_nav::CostmapNavigationServer::local_costmap_ptr_
private

Shared pointer to the common local costmap.

Definition at line 256 of file costmap_navigation_server.h.

◆ nav_core_controller_plugin_loader_

pluginlib::ClassLoader<nav_core::BaseLocalPlanner> mbf_costmap_nav::CostmapNavigationServer::nav_core_controller_plugin_loader_
private

Definition at line 239 of file costmap_navigation_server.h.

◆ nav_core_planner_plugin_loader_

pluginlib::ClassLoader<nav_core::BaseGlobalPlanner> mbf_costmap_nav::CostmapNavigationServer::nav_core_planner_plugin_loader_
private

Definition at line 241 of file costmap_navigation_server.h.

◆ nav_core_recovery_plugin_loader_

pluginlib::ClassLoader<nav_core::RecoveryBehavior> mbf_costmap_nav::CostmapNavigationServer::nav_core_recovery_plugin_loader_
private

Definition at line 237 of file costmap_navigation_server.h.

◆ planner_name_to_costmap_ptr_

StringToMap mbf_costmap_nav::CostmapNavigationServer::planner_name_to_costmap_ptr_
private

Maps planner names to the costmap ptr.

Definition at line 262 of file costmap_navigation_server.h.

◆ planner_plugin_loader_

pluginlib::ClassLoader<mbf_costmap_core::CostmapPlanner> mbf_costmap_nav::CostmapNavigationServer::planner_plugin_loader_
private

Definition at line 240 of file costmap_navigation_server.h.

◆ recovery_plugin_loader_

pluginlib::ClassLoader<mbf_costmap_core::CostmapRecovery> mbf_costmap_nav::CostmapNavigationServer::recovery_plugin_loader_
private

Definition at line 236 of file costmap_navigation_server.h.

◆ setup_reconfigure_

bool mbf_costmap_nav::CostmapNavigationServer::setup_reconfigure_
private

true, if the dynamic reconfigure has been setup

Definition at line 253 of file costmap_navigation_server.h.


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


mbf_costmap_nav
Author(s): Sebastian Pütz
autogenerated on Mon Feb 28 2022 22:49:55