tibi_dabo_hri_teleop_alg.h
Go to the documentation of this file.
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 _tibi_dabo_hri_teleop_alg_h_
00026 #define _tibi_dabo_hri_teleop_alg_h_
00027 
00028 #include <tibi_dabo_hri_teleop/TibiDaboHriTeleopConfig.h>
00029 #include "mutex.h"
00030 
00031 //include tibi_dabo_hri_teleop_alg main library
00032 
00033 extern std::string home_seq;
00034 extern std::string speech_path;
00035 extern std::string motion_path;
00036 
00042 class TibiDaboHriTeleopAlgorithm
00043 {
00044   protected:
00051     CMutex alg_mutex_;
00052 
00053     // private attributes and methods
00054     
00055     // dynamic reconfigure variables
00056     unsigned int desired_home_interval_;
00057     unsigned int desired_speech_interval;
00058     unsigned int desired_repeat_interval_;
00059 
00060     
00061     typedef enum {TTS_=0,LEDS_=1,HEAD_=2,LEFT_ARM_=3,RIGHT_ARM_=4} clients;
00062     static const int NUM_CLIENTS=RIGHT_ARM_-TTS_+1;
00063     
00064     void scan_XML_files(void);
00065     
00066   public:
00073     typedef tibi_dabo_hri_teleop::TibiDaboHriTeleopConfig Config;
00074 
00081     Config config_;
00082 
00091     TibiDaboHriTeleopAlgorithm(void);
00092 
00098     void lock(void) { alg_mutex_.enter(); };
00099 
00105     void unlock(void) { alg_mutex_.exit(); };
00106 
00114     bool try_enter(void) { return alg_mutex_.try_enter(); };
00115 
00127     void config_update(Config& new_cfg, uint32_t level=0);
00128 
00129     // here define all tibi_dabo_hri_teleop_alg interface methods to retrieve and set
00130     // the driver parameters
00131     std::string xml_path;
00132     void load_goal(std::string &filename,std::vector<std::string> &xml_files);
00133 
00134     std::vector<std::string> motion_seq_files_;
00135     std::vector<std::string> speech_files;
00136         std::vector<std::string> speech_filenames;
00137 
00144     ~TibiDaboHriTeleopAlgorithm(void);
00145 };
00146 
00147 #endif


tibi_dabo_hri_teleop
Author(s):
autogenerated on Fri Dec 6 2013 23:16:37