Project: engagement_recognition License: BSD Dependencies:
Used by:
None |
engagement_recognition/src/recognition/lib/engagement_params.hGo to the documentation of this file.00001 /* 00002 * Software License Agreement (BSD License) 00003 * 00004 * Copyright (c) 2010, Worcester Polytechnic Institute 00005 * All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions 00009 * are met: 00010 * 00011 * * Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * * Redistributions in binary form must reproduce the above 00014 * copyright notice, this list of conditions and the following 00015 * disclaimer in the documentation and/or other materials provided 00016 * with the distribution. 00017 * * Neither the name of Worcester Polytechnic Institute. nor the names 00018 * of its contributors may be used to endorse or promote products 00019 * derived from this software without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00022 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00023 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00024 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00025 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00026 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00027 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00028 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00029 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00030 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00031 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00032 * POSSIBILITY OF SUCH DAMAGE. 00033 */ 00034 #ifndef _ENGAGEMENT_PARAMS_H 00035 #define _ENGAGEMENT_PARAMS_H 00036 00037 #include <ros/ros.h> 00038 #include "engagement_declarations.h" 00039 00049 class EngagementParams 00050 { 00051 private: 00053 static EngagementParams *param_; 00054 00056 bool retrieved_parameters_; 00057 00059 bool degraded_; 00060 00062 int verbosity_; 00063 00065 unsigned long start_time_; 00066 00068 int recog_bg_color_; 00070 int recog_fg_color_; 00072 int ap_bg_color_; 00074 int ap_fg_color_; 00076 int bc_bg_color_; 00078 int bc_fg_color_; 00080 int dg_bg_color_; 00082 int dg_fg_color_; 00084 int mfg_bg_color_; 00086 int mfg_fg_color_; 00088 int actor_bg_color_; 00090 int actor_fg_color_; 00092 int state_bg_color_; 00094 int state_fg_color_; 00096 int sema_bg_color_; 00098 int sema_fg_color_; 00099 00101 std::string log_file_; 00102 00104 std::string log_directory_; 00105 00109 EngagementParams(); 00110 00116 static EngagementParams *getParams(); 00117 00119 ros::NodeHandle *base_handle_; 00121 ros::NodeHandle *vision_handle_; 00123 ros::NodeHandle *collab_handle_; 00125 ros::NodeHandle *performing_handle_; 00127 ros::NodeHandle *recog_handle_; 00129 ros::NodeHandle *recog_human_handle_; 00131 ros::NodeHandle *recog_robot_handle_; 00132 00134 ros::NodeHandle *internal_handle_; 00135 00137 ros::NodeHandle *conf_handle_; 00139 ros::NodeHandle *conf_dir_gaze_handle_; 00141 ros::NodeHandle *conf_mf_gaze_handle_; 00143 ros::NodeHandle *conf_adjacency_pair_handle_; 00145 ros::NodeHandle *conf_backchannel_handle_; 00146 public: 00150 static void destroy(); 00151 00158 static void retrieveParameters(bool force = false); 00159 00165 static bool isDegraded(); 00166 00172 static int getVerbosity(); 00173 00179 static std::string getLogFile(); 00180 00186 static std::string getLogDirectory(); 00187 00193 static void setStartTime(unsigned long val); 00194 00200 static unsigned long getStartTime(); 00201 00205 static void createNodeHandles(); 00206 00210 static void destroyNodeHandles(); 00211 00217 static ros::NodeHandle *getBaseHandle(); 00218 00224 static ros::NodeHandle *getInternalHandle(); 00225 00231 static ros::NodeHandle *getConfHandle(); 00232 00238 static ros::NodeHandle *getVisionHandle(); 00239 00245 static ros::NodeHandle *getCollabHandle(); 00246 00252 static ros::NodeHandle *getPerformingHandle(); 00253 00259 static ros::NodeHandle *getRecogHandle(); 00260 00266 static ros::NodeHandle *getRecogHumanHandle(); 00267 00273 static ros::NodeHandle *getRecogRobotHandle(); 00274 00280 static ros::NodeHandle *getConfDirGazeHandle(); 00281 00287 static ros::NodeHandle *getConfMFGazeHandle(); 00288 00294 static ros::NodeHandle *getConfAdjacencyPairHandle(); 00295 00301 static ros::NodeHandle *getConfBackchannelHandle(); 00302 00309 static const char *getRecogTag(); 00310 00316 static const char *getAPTag(); 00317 00323 static const char *getBCTag(); 00324 00331 static const char *getDGTag(std::string object); 00332 00338 static const char *getMFGTag(); 00339 00346 static const char *getActorTag(std::string actor); 00347 00353 static const char *getSemaphoreTag(); 00354 00361 static const char *getStateTag(std::string name); 00362 00369 static const char *getObjectTag(std::string object); 00370 }; 00371 00372 #endif // _ENGAGEMENT_PARAMS_H |