LoRegistry.C

Go to the documentation of this file.
00001 /**
00002    \file Robots/LoBot/misc/LoRegistry.C
00003 
00004    \brief This file acts as a central repository for the registration of
00005    the factories used to create the different locust models, integration
00006    algorithms, etc. supported by the Lobot/Robolocust project.
00007 */
00008 
00009 // //////////////////////////////////////////////////////////////////// //
00010 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2000-2005   //
00011 // by the University of Southern California (USC) and the iLab at USC.  //
00012 // See http://iLab.usc.edu for information about this project.          //
00013 // //////////////////////////////////////////////////////////////////// //
00014 // Major portions of the iLab Neuromorphic Vision Toolkit are protected //
00015 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
00016 // in Visual Environments, and Applications'' by Christof Koch and      //
00017 // Laurent Itti, California Institute of Technology, 2001 (patent       //
00018 // pending; application number 09/912,225 filed July 23, 2001; see      //
00019 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status).     //
00020 // //////////////////////////////////////////////////////////////////// //
00021 // This file is part of the iLab Neuromorphic Vision C++ Toolkit.       //
00022 //                                                                      //
00023 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can   //
00024 // redistribute it and/or modify it under the terms of the GNU General  //
00025 // Public License as published by the Free Software Foundation; either  //
00026 // version 2 of the License, or (at your option) any later version.     //
00027 //                                                                      //
00028 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope  //
00029 // that it will be useful, but WITHOUT ANY WARRANTY; without even the   //
00030 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
00031 // PURPOSE.  See the GNU General Public License for more details.       //
00032 //                                                                      //
00033 // You should have received a copy of the GNU General Public License    //
00034 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write   //
00035 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,   //
00036 // Boston, MA 02111-1307 USA.                                           //
00037 // //////////////////////////////////////////////////////////////////// //
00038 //
00039 // Primary maintainer for this file: mviswana usc edu
00040 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Robots/LoBot/misc/LoRegistry.C $
00041 // $Id: LoRegistry.C 14305 2010-12-08 21:17:33Z mviswana $
00042 //
00043 
00044 //------------------------------ HEADERS --------------------------------
00045 
00046 // Robot behaviours
00047 #include "Robots/LoBot/control/LoForward.H"
00048 #include "Robots/LoBot/control/LoEmergencyStop.H"
00049 #include "Robots/LoBot/control/LoExtricate.H"
00050 #include "Robots/LoBot/control/LoLGMDExtricateSimple.H"
00051 #include "Robots/LoBot/control/LoLGMDExtricateEMD.H"
00052 #include "Robots/LoBot/control/LoLGMDExtricateVFF.H"
00053 #include "Robots/LoBot/control/LoLGMDExtricateTTI.H"
00054 #include "Robots/LoBot/control/LoCalibrateLET.H"
00055 #include "Robots/LoBot/control/LoOpenPath.H"
00056 #include "Robots/LoBot/control/LoSurvey.H"
00057 #include "Robots/LoBot/control/LoGoal.H"
00058 #include "Robots/LoBot/control/LoTrack.H"
00059 #include "Robots/LoBot/control/LoBumpCounter.H"
00060 #include "Robots/LoBot/control/LoMonitorDZone.H"
00061 #include "Robots/LoBot/control/LoCountdown.H"
00062 #include "Robots/LoBot/control/LoMetrics.H"
00063 #include "Robots/LoBot/control/LoRenderResults.H"
00064 #include "Robots/LoBot/control/LoTestScanMatching.H"
00065 #include "Robots/LoBot/control/LoVFH.H"
00066 #include "Robots/LoBot/control/LoRemoteControl.H"
00067 
00068 // Robot platforms
00069 #include "Robots/LoBot/io/LoRCCar.H"
00070 #include "Robots/LoBot/io/LoRoombaCM.H"
00071 
00072 // Locust LGMD models
00073 #include "Robots/LoBot/lgmd/gabbiani/LoGabbiani.H"
00074 #include "Robots/LoBot/lgmd/rind/LoStafford.H"
00075 
00076 // Other lobot headers
00077 #include "Robots/LoBot/misc/LoRegistry.H"
00078 
00079 //------------------------------ MACROS ---------------------------------
00080 
00081 /*
00082    To make things uniform/easy/nice/etc., each Robolocust class that is
00083    created using a factory defines a private type called my_factory and a
00084    static data member of type my_factory called register_me. To register
00085    the class's factory, we will have to define that class's register_me
00086    static data member in this central registry using a statement of the
00087    form:
00088 
00089       class_name::my_factory class_name::register_me(ID) ;
00090 
00091    where ID is the string ID used to create instances of the class. All
00092    the string IDs are #defined in LoRegistry.H.
00093 
00094    The following macro takes a class name and the string ID for that
00095    class and spits out a statement like the one shown above to define the
00096    register_me static data member of the given class.
00097 */
00098 #define LOBOT_REGISTER(class_name, string_id) \
00099            class_name::my_factory class_name::register_me(string_id)
00100 
00101 //----------------------------- NAMESPACE -------------------------------
00102 
00103 namespace lobot {
00104 
00105 //--------------------------- LOCUST MODELS -----------------------------
00106 
00107 LOBOT_REGISTER(GabbianiModel, LOLM_GABBIANI) ;
00108 LOBOT_REGISTER(StaffordModel, LOLM_STAFFORD) ;
00109 
00110 //-------------------------- ROBOT PLATFORMS ----------------------------
00111 
00112 LOBOT_REGISTER(RCCar,    LORP_RC_CAR) ;
00113 LOBOT_REGISTER(RoombaCM, LORP_ROOMBA_CM) ;
00114 
00115 //------------------------- ROBOT BEHAVIOURS ----------------------------
00116 
00117 LOBOT_REGISTER(Forward,             LOBE_FORWARD) ;
00118 LOBOT_REGISTER(EmergencyStop,       LOBE_EMERGENCY_STOP) ;
00119 LOBOT_REGISTER(Extricate,           LOBE_EXTRICATE) ;
00120 LOBOT_REGISTER(LGMDExtricateSimple, LOBE_LGMD_EXTRICATE_SIMPLE) ;
00121 LOBOT_REGISTER(LGMDExtricateEMD,    LOBE_LGMD_EXTRICATE_EMD) ;
00122 LOBOT_REGISTER(LGMDExtricateVFF,    LOBE_LGMD_EXTRICATE_VFF) ;
00123 LOBOT_REGISTER(LGMDExtricateTTI,    LOBE_LGMD_EXTRICATE_TTI) ;
00124 LOBOT_REGISTER(CalibrateLET,        LOBE_CALIBRATE_LET) ;
00125 LOBOT_REGISTER(OpenPath,            LOBE_OPEN_PATH) ;
00126 LOBOT_REGISTER(Survey,              LOBE_SURVEY) ;
00127 LOBOT_REGISTER(Goal,                LOBE_GOAL) ;
00128 LOBOT_REGISTER(Track,               LOBE_TRACK) ;
00129 LOBOT_REGISTER(BumpCounter,         LOBE_BUMP_COUNTER) ;
00130 LOBOT_REGISTER(MonitorDZone,        LOBE_MONITOR_DZONE) ;
00131 LOBOT_REGISTER(Countdown,           LOBE_COUNTDOWN) ;
00132 LOBOT_REGISTER(Metrics,             LOBE_METRICS) ;
00133 LOBOT_REGISTER(RenderResults,       LOBE_RENDER_RESULTS) ;
00134 LOBOT_REGISTER(TestScanMatching,    LOBE_TEST_SCAN_MATCHING) ;
00135 LOBOT_REGISTER(VFH,                 LOBE_VFH) ;
00136 LOBOT_REGISTER(RemoteControl,       LOBE_REMOTE_CONTROL) ;
00137 
00138 //-----------------------------------------------------------------------
00139 
00140 } // end of namespace encapsulating this file's definitions
00141 
00142 /* So things look consistent in everyone's emacs... */
00143 /* Local Variables: */
00144 /* indent-tabs-mode: nil */
00145 /* End: */
Generated on Sun May 8 08:41:31 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3