00001 // Copyright (C) 2010-2011 Institut de Robotica i Informatica Industrial, CSIC-UPC. 00002 // Author 00003 // All rights reserved. 00004 // 00005 // This file is part of iri-ros-pkg 00006 // iri-ros-pkg is free software: you can redistribute it and/or modify 00007 // it under the terms of the GNU Lesser General Public License as published by 00008 // the Free Software Foundation, either version 3 of the License, or 00009 // at your option) any later version. 00010 // 00011 // This program is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 // GNU Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public License 00017 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 // 00019 // IMPORTANT NOTE: This code has been generated through a script from the 00020 // iri_ros_scripts. Please do NOT delete any comments to guarantee the correctness 00021 // of the scripts. ROS topics can be easly add by using those scripts. Please 00022 // refer to the IRI wiki page for more information: 00023 // http://wikiri.upc.es/index.php/Robotics_Lab 00024 00025 #ifndef _dynamixel_no_gripper_driver_node_h_ 00026 #define _dynamixel_no_gripper_driver_node_h_ 00027 00028 #include <iri_base_driver/iri_base_driver_node.h> 00029 #include "dynamixel_no_gripper_driver.h" 00030 00031 // [publisher subscriber headers] 00032 00033 // [service client headers] 00034 00035 // [action server client headers] 00036 #include <iri_common_drivers_msgs/tool_openAction.h> 00037 #include <iri_action_server/iri_action_server.h> 00038 #include <iri_common_drivers_msgs/tool_closeAction.h> 00039 00057 class DynamixelNoGripperDriverNode : public iri_base_driver::IriBaseNodeDriver<DynamixelNoGripperDriver> 00058 { 00059 private: 00060 bool is_opened_; 00061 bool is_closed_; 00062 00063 // [publisher attributes] 00064 00065 // [subscriber attributes] 00066 00067 // [service attributes] 00068 00069 // [client attributes] 00070 00071 // [action server attributes] 00072 IriActionServer<iri_common_drivers_msgs::tool_openAction> tool_open_aserver_; 00073 void tool_openStartCallback(const iri_common_drivers_msgs::tool_openGoalConstPtr& goal); 00074 void tool_openStopCallback(void); 00075 bool tool_openIsFinishedCallback(void); 00076 bool tool_openHasSucceedCallback(void); 00077 void tool_openGetResultCallback(iri_common_drivers_msgs::tool_openResultPtr& result); 00078 void tool_openGetFeedbackCallback(iri_common_drivers_msgs::tool_openFeedbackPtr& feedback); 00079 IriActionServer<iri_common_drivers_msgs::tool_closeAction> tool_close_aserver_; 00080 void tool_closeStartCallback(const iri_common_drivers_msgs::tool_closeGoalConstPtr& goal); 00081 void tool_closeStopCallback(void); 00082 bool tool_closeIsFinishedCallback(void); 00083 bool tool_closeHasSucceedCallback(void); 00084 void tool_closeGetResultCallback(iri_common_drivers_msgs::tool_closeResultPtr& result); 00085 void tool_closeGetFeedbackCallback(iri_common_drivers_msgs::tool_closeFeedbackPtr& feedback); 00086 00087 // [action client attributes] 00088 00096 void postNodeOpenHook(void); 00097 00098 public: 00116 DynamixelNoGripperDriverNode(ros::NodeHandle& nh); 00117 00124 ~DynamixelNoGripperDriverNode(void); 00125 00126 protected: 00139 void mainNodeThread(void); 00140 00141 // [diagnostic functions] 00142 00153 void addNodeDiagnostics(void); 00154 00155 // [driver test functions] 00156 00166 void addNodeOpenedTests(void); 00167 00177 void addNodeStoppedTests(void); 00178 00188 void addNodeRunningTests(void); 00189 00197 void reconfigureNodeHook(int level); 00198 00199 }; 00200 00201 #endif