cb_base_navigation
global_planner_interface.h
Go to the documentation of this file.
1 /*******************************
2  * *
3  * Author: Rein Appeldoorn *
4  * Date: 2013-03-06 *
5  * *
6  *******************************/
7 
8 #ifndef cb_global_planner_GLOBAL_PLANNER_INTERFACE_
9 #define cb_global_planner_GLOBAL_PLANNER_INTERFACE_
10 
11 #include "global_planner_plugin.h"
12 #include "visualization.h"
13 
15 #include <cb_base_navigation_msgs/PositionConstraint.h>
16 #include <cb_base_navigation_msgs/OrientationConstraint.h>
17 #include <cb_base_navigation_msgs/LocalPlannerActionGoal.h>
18 #include <cb_base_navigation_msgs/CheckPlan.h>
19 #include <cb_base_navigation_msgs/GetPlan.h>
20 
21 #include <geometry_msgs/PoseStamped.h>
22 
23 #include <pluginlib/class_loader.h>
24 
25 #include <ros/publisher.h>
26 #include <ros/service_server.h>
27 #include <ros/subscriber.h>
28 
29 namespace costmap_2d {
30 class Costmap2DROS;
31 }
32 
33 namespace tf2_ros {
34 class Buffer;
35 }
36 
37 namespace cb_global_planner {
38 
40 
41 public:
42 
43  GlobalPlannerInterface(costmap_2d::Costmap2DROS* costmap, tf2_ros::Buffer* tf);
44 
46 
47 private:
48 
50  ros::ServiceServer get_plan_srv_, check_plan_srv_;
51  bool getPlan(cb_base_navigation_msgs::GetPlanRequest& req, cb_base_navigation_msgs::GetPlanResponse& resp);
52  bool checkPlan(cb_base_navigation_msgs::CheckPlanRequest& req, cb_base_navigation_msgs::CheckPlanResponse& resp);
53 
55  ros::Subscriber pose_sub_;
56  void poseCallback(const geometry_msgs::PoseStampedConstPtr& pose);
57  ros::Publisher plan_pub_;
58 
60  boost::shared_ptr<GlobalPlannerPlugin> global_planner_;
61  pluginlib::ClassLoader<GlobalPlannerPlugin> gp_loader_;
62 
65  tf2_ros::Buffer* tf_;
66 
69 
72 
73 };
74 
75 }
76 
77 #endif
cb_global_planner::GlobalPlannerInterface::check_plan_srv_
ros::ServiceServer check_plan_srv_
Definition: global_planner_interface.h:50
std::string
cb_global_planner::GlobalPlannerInterface::checkPlan
bool checkPlan(cb_base_navigation_msgs::CheckPlanRequest &req, cb_base_navigation_msgs::CheckPlanResponse &resp)
Definition: global_planner_interface.cpp:100
cb_global_planner::GlobalPlannerInterface::gp_loader_
pluginlib::ClassLoader< GlobalPlannerPlugin > gp_loader_
Definition: global_planner_interface.h:61
cb_global_planner::GlobalPlannerInterface
Definition: global_planner_interface.h:39
cb_global_planner::GlobalPlannerInterface::GlobalPlannerInterface
GlobalPlannerInterface(costmap_2d::Costmap2DROS *costmap, tf2_ros::Buffer *tf)
Definition: global_planner_interface.cpp:14
cb_global_planner::GlobalPlannerInterface::poseCallback
void poseCallback(const geometry_msgs::PoseStampedConstPtr &pose)
Definition: global_planner_interface.cpp:57
cb_global_planner::GlobalPlannerInterface::costmap_
costmap_2d::Costmap2DROS * costmap_
Costmaps.
Definition: global_planner_interface.h:68
global_planner_plugin.h
cb_global_planner::GlobalPlannerInterface::tf_
tf2_ros::Buffer * tf_
Definition: global_planner_interface.h:65
cb_global_planner::GlobalPlannerInterface::global_frame_
std::string global_frame_
Definition: global_planner_interface.h:64
tf2_ros
Definition: global_planner_interface.h:33
cb_global_planner::Visualization
Definition: global_planner/visualization.h:32
visualization.h
cb_global_planner::GlobalPlannerInterface::get_plan_srv_
ros::ServiceServer get_plan_srv_
Connections to the outside world.
Definition: global_planner_interface.h:50
cb_global_planner::GlobalPlannerInterface::robot_base_frame_
std::string robot_base_frame_
Frame names + Tranforms.
Definition: global_planner_interface.h:64
cb_global_planner::GlobalPlannerInterface::plan_pub_
ros::Publisher plan_pub_
Definition: global_planner_interface.h:57
cb_global_planner::GlobalPlannerInterface::~GlobalPlannerInterface
~GlobalPlannerInterface()
Definition: global_planner_interface.cpp:8
cb_global_planner::GlobalPlannerInterface::global_planner_
boost::shared_ptr< GlobalPlannerPlugin > global_planner_
Planners + loaders.
Definition: global_planner_interface.h:60
cb_global_planner::GlobalPlannerInterface::vis_
Visualization vis_
Visualization.
Definition: global_planner_interface.h:71
cb_global_planner
Definition: a_star_planner.cpp:5
cb_global_planner::GlobalPlannerInterface::pose_sub_
ros::Subscriber pose_sub_
Pose callback and publisher.
Definition: global_planner_interface.h:55
costmap_2d
Messages + Services.
cb_global_planner::GlobalPlannerInterface::getPlan
bool getPlan(cb_base_navigation_msgs::GetPlanRequest &req, cb_base_navigation_msgs::GetPlanResponse &resp)
Definition: global_planner_interface.cpp:114
costmap_2d::Costmap2DROS