00001 /** 00002 \file Robots/LoBot/control/LoTestScanMatching.H 00003 \brief A behaviour for testing the scan matching module using some 00004 test data to see how well the algorithm works. 00005 00006 This file defines a class that uses some test data to see whether or 00007 not the Robolocust implementation of the laser range finder scan 00008 matching algorithm works or not. This behaviour does not affect the 00009 robot in any way; it is, in fact, simply an offline test used to check 00010 the scan matching algorithm. 00011 */ 00012 00013 // //////////////////////////////////////////////////////////////////// // 00014 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2000-2005 // 00015 // by the University of Southern California (USC) and the iLab at USC. // 00016 // See http://iLab.usc.edu for information about this project. // 00017 // //////////////////////////////////////////////////////////////////// // 00018 // Major portions of the iLab Neuromorphic Vision Toolkit are protected // 00019 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency // 00020 // in Visual Environments, and Applications'' by Christof Koch and // 00021 // Laurent Itti, California Institute of Technology, 2001 (patent // 00022 // pending; application number 09/912,225 filed July 23, 2001; see // 00023 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status). // 00024 // //////////////////////////////////////////////////////////////////// // 00025 // This file is part of the iLab Neuromorphic Vision C++ Toolkit. // 00026 // // 00027 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can // 00028 // redistribute it and/or modify it under the terms of the GNU General // 00029 // Public License as published by the Free Software Foundation; either // 00030 // version 2 of the License, or (at your option) any later version. // 00031 // // 00032 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope // 00033 // that it will be useful, but WITHOUT ANY WARRANTY; without even the // 00034 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // 00035 // PURPOSE. See the GNU General Public License for more details. // 00036 // // 00037 // You should have received a copy of the GNU General Public License // 00038 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write // 00039 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, // 00040 // Boston, MA 02111-1307 USA. // 00041 // //////////////////////////////////////////////////////////////////// // 00042 // 00043 // Primary maintainer for this file: mviswana usc edu 00044 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Robots/LoBot/control/LoTestScanMatching.H $ 00045 // $Id: LoTestScanMatching.H 13570 2010-06-16 15:56:00Z mviswana $ 00046 // 00047 00048 #ifndef LOBOT_TEST_SCAN_MATCHING_BEHAVIOUR_DOT_H 00049 #define LOBOT_TEST_SCAN_MATCHING_BEHAVIOUR_DOT_H 00050 00051 //------------------------------ HEADERS -------------------------------- 00052 00053 // lobot headers 00054 #include "Robots/LoBot/control/LoBehavior.H" 00055 #include "Robots/LoBot/misc/factory.hh" 00056 00057 //----------------------------- NAMESPACE ------------------------------- 00058 00059 namespace lobot { 00060 00061 //------------------------- CLASS DEFINITION ---------------------------- 00062 00063 /** 00064 \class lobot::TestScanMatching 00065 \brief A behaviour for testing the laser range finder scan matching 00066 algorithm. 00067 00068 This class implements a behaviour that uses some test data to check 00069 whether the Robolocust's scan matching algorithm works or not. It 00070 reads the test data from a file and feeds that to the scan matching 00071 module. This behaviour does not affect the robot in any way; rather it 00072 is meant to be run standalone and not even on the robot. 00073 */ 00074 class TestScanMatching : public Behavior { 00075 // Prevent copy and assignment 00076 TestScanMatching(const TestScanMatching&) ; 00077 TestScanMatching& operator=(const TestScanMatching&) ; 00078 00079 // Handy type to have around in a derived class 00080 typedef Behavior base ; 00081 00082 // Boilerplate code to make the generic factory design pattern work 00083 friend class subfactory<TestScanMatching, base> ; 00084 typedef register_factory<TestScanMatching, base> my_factory ; 00085 static my_factory register_me ; 00086 00087 /// A private constructor because behaviours are instantiated with an 00088 /// object factory and not directly by clients. 00089 TestScanMatching() ; 00090 00091 /// Some things to do before commencing regular action processing. 00092 void pre_run() ; 00093 00094 /// This method provides the body of the behaviour's main loop. 00095 void action() ; 00096 00097 /// Clean-up. 00098 ~TestScanMatching() ; 00099 } ; 00100 00101 //----------------------------------------------------------------------- 00102 00103 } // end of namespace encapsulating this file's definitions 00104 00105 #endif 00106 00107 /* So things look consistent in everyone's emacs... */ 00108 /* Local Variables: */ 00109 /* indent-tabs-mode: nil */ 00110 /* End: */