00001 #ifndef __CONTROLLER_ACTION_NODE__ 00002 #define __CONTROLLER_ACTION_NODE__ 00003 00004 #include <sensor_msgs/JointState.h> 00005 #include <generic_control_toolbox/controller_template.hpp> 00006 #include <stdexcept> 00007 00008 namespace generic_control_toolbox 00009 { 00015 class ControllerActionNode 00016 { 00017 public: 00018 ControllerActionNode(); 00019 ~ControllerActionNode(); 00020 00029 void runController(ControllerBase &controller); 00030 00031 private: 00032 void jointStatesCb(const sensor_msgs::JointState::ConstPtr &msg); 00033 00034 ros::NodeHandle nh_; 00035 sensor_msgs::JointState state_; 00036 ros::Subscriber joint_state_sub_; 00037 ros::Publisher state_pub_; 00038 bool got_first_; 00039 double loop_rate_; 00040 }; 00041 } // namespace generic_control_toolbox 00042 #endif