topological_move_base_action_layer.h
Go to the documentation of this file.
00001 
00026 #ifndef _TOPOLOGICAL_MOVE_BASE_ACTION_LAYER_H_
00027 #define _TOPOLOGICAL_MOVE_BASE_ACTION_LAYER_H_
00028 
00029 #include <string.h>
00030 
00031 #include <ros/ros.h>
00032 #include <ros/callback_queue.h>
00033 #include <actionlib/client/simple_action_client.h>
00034 #include <move_base_msgs/MoveBaseResult.h>
00035 #include <move_base_msgs/MoveBaseAction.h>
00036 #include <move_base_msgs/MoveBaseFeedback.h>
00037 
00038 #include <topological_tools/topological_action_manager.h>
00039 #include <mdm_library/action_layer.h>
00040 
00041 
00042 namespace topological_tools
00043 {
00047 class TopologicalMoveBaseActionLayer
00048 {
00049 public:
00050     typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;
00051 
00052     TopologicalMoveBaseActionLayer ( const std::string& map_file );
00053     TopologicalMoveBaseActionLayer ( TopologicalMap& tm );
00054 
00055     void addAction ( const std::string& action_name );
00056 
00057     void spin();
00058 protected:
00059     virtual void moveBaseDoneCB ( const actionlib::SimpleClientGoalState& state,
00060                                   const move_base_msgs::MoveBaseResultConstPtr& result ) {};
00061     virtual void moveBaseActiveCB () {};
00062     virtual void moveBaseFeedbackCB ( const move_base_msgs::MoveBaseFeedbackConstPtr& feedback ) {};
00063 
00064 private:
00065     void moveToLabel ( const std::string& connection_label );
00066 
00067     ros::CallbackQueue actions_cb_queue_;
00068     ros::CallbackQueue predicates_cb_queue_;
00069 
00070     mdm_library::ActionLayer al_;
00071     TopologicalActionManager tam_;
00072     MoveBaseClient move_base_client_;
00073 };
00074 }
00075 
00076 #endif


topological_tools
Author(s): Joao Messias
autogenerated on Wed Aug 26 2015 12:28:47