00001 00028 #ifndef COB_LOOKAT_DRIVER_H 00029 #define COB_LOOKAT_DRIVER_H 00030 00031 #include <ros/ros.h> 00032 00033 #include <std_msgs/Float64MultiArray.h> 00034 #include <sensor_msgs/JointState.h> 00035 00036 class CobLookatDriver 00037 { 00038 public: 00039 CobLookatDriver() {;} 00040 ~CobLookatDriver(); 00041 00042 bool initialize(); 00043 void run(); 00044 00045 void update_state(); 00046 void publish_state(); 00047 void command_vel_cb(const std_msgs::Float64MultiArray::ConstPtr& msg); 00048 00049 00050 ros::NodeHandle nh_; 00051 00052 00053 double update_rate_; 00054 ros::Time last_update_; 00055 00056 unsigned int dof_; 00057 std::vector<std::string> joints_; 00058 00059 std::vector<double> current_pos_; 00060 std::vector<double> current_vel_; 00061 00062 ros::Subscriber command_vel_sub_; 00063 ros::Publisher jointstate_pub_; 00064 }; 00065 00066 #endif 00067