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 _laser_people_detection_fusion_alg_node_h_ 00026 #define _laser_people_detection_fusion_alg_node_h_ 00027 00028 #include <iri_base_algorithm/iri_base_algorithm.h> 00029 #include "laser_people_detection_fusion_alg.h" 00030 00031 // [publisher subscriber headers] 00032 #include <iri_nav_msgs/PoseWithCovarianceStampedArray.h> 00033 #include <geometry_msgs/PoseStamped.h> 00034 00035 // [service client headers] 00036 00037 // [action server client headers] 00038 00039 #include <tf/transform_listener.h> 00040 00045 class LaserPeopleDetectionFusionAlgNode : public algorithm_base::IriBaseAlgorithm<LaserPeopleDetectionFusionAlgorithm> 00046 { 00047 private: 00048 // [publisher attributes] 00049 ros::Publisher people_publisher_; 00050 iri_nav_msgs::PoseWithCovarianceStampedArray PoseWithCovarianceStampedArray_msg_; 00051 00052 // [subscriber attributes] 00053 ros::Subscriber people1_subscriber_; 00054 void people1_callback(const iri_nav_msgs::PoseWithCovarianceStampedArray::ConstPtr& msg); 00055 CMutex people1_mutex_; 00056 00057 iri_nav_msgs::PoseWithCovarianceStampedArray people1_; 00058 bool people1ready; 00059 00060 ros::Subscriber people2_subscriber_; 00061 void people2_callback(const iri_nav_msgs::PoseWithCovarianceStampedArray::ConstPtr& msg); 00062 CMutex people2_mutex_; 00063 00064 iri_nav_msgs::PoseWithCovarianceStampedArray people2_; 00065 bool people2ready; 00066 00067 // [service attributes] 00068 00069 // [client attributes] 00070 00071 // [action server attributes] 00072 00073 // [action client attributes] 00074 00075 tf::TransformListener tf_listener_; 00076 std::string target_frame_; 00077 std::string fixed_frame_; 00078 00079 public: 00086 LaserPeopleDetectionFusionAlgNode(void); 00087 00094 ~LaserPeopleDetectionFusionAlgNode(void); 00095 00096 protected: 00109 void mainNodeThread(void); 00110 00123 void node_config_update(Config &config, uint32_t level); 00124 00131 void addNodeDiagnostics(void); 00132 00133 // [diagnostic functions] 00134 00135 // [test functions] 00136 }; 00137 00138 #endif