00001 // ---------------------------------------------------------------------------- 00002 // 00003 // $Id$ 00004 // 00005 // Copyright 2008, 2009, 2010, 2011, 2012 Antonio Franchi and Paolo Stegagno 00006 // 00007 // This file is part of MIP. 00008 // 00009 // MIP is free software: you can redistribute it and/or modify 00010 // it under the terms of the GNU General Public License as published by 00011 // the Free Software Foundation, either version 3 of the License, or 00012 // (at your option) any later version. 00013 // 00014 // MIP is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 // GNU General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU General Public License 00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>. 00021 // 00022 // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it 00023 // 00024 // ---------------------------------------------------------------------------- 00025 00026 00033 00034 00035 00036 00037 #ifndef __KHEPERAIII_H_ 00038 #define __KHEPERAIII_H_ 00039 00040 #include <CommonOptions.h> 00041 00042 #include "MobileRob.h" 00043 #include "URG04LXmm.h" 00044 #include "Korebot.h" 00045 00046 #include "TCRT5000.h" 00047 #include "TCRT5000Ground.h" 00048 00049 namespace MipResources{ 00051 /* @{ */ 00052 00053 class KheperaIII : public MobileRob{ 00054 private: 00055 static const ResourcePlate _plate = MR_KHIII_RES; 00056 /* PROMEMO from abstract class */ 00057 /* MobileRobPar *_par; */ 00058 /* MobileRobVar *_var; */ 00059 /* RangeSens *_rangeSens; */ 00060 /* Unicycle *_unicycle;*/ 00061 MobileRobPar *_kheperaIIIPar; 00062 MobileRobVar *_kheperaIIIVar; 00063 00064 // onboard sensors 00065 URG04LXmm *_urg04lx; 00066 Korebot *_korebotMot; 00067 00068 TCRT5000 *_tcrt5000; 00069 TCRT5000Ground *_tcrt5000Ground; 00070 00071 public: 00072 00074 ResourcePlate getPlate() const { 00075 return _plate; 00076 } 00077 00079 KheperaIII(int argc, const char* argv[]); 00080 00082 ~KheperaIII(); 00083 00085 int totalScanNum(){ 00086 return _urg04lx->totScans() ; 00087 } 00088 00090 int totScans(int lastTakenScan){ 00091 return _urg04lx->totScans(); 00092 } 00093 00095 virtual void turnLaserOn(){ 00096 _urg04lx->_cmd->on(); 00097 } 00098 }; 00099 00100 /* @} */ 00101 00102 };// end namespace MipResources{ 00103 00104 00105 #endif 00106 00107 00108 00109 00110