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 00032 00033 #ifndef __DIFFDRIVEENCODERREADING_H_ 00034 #define __DIFFDRIVEENCODERREADING_H_ 00035 00036 #ifdef MIP_HOST_APPLE 00037 #include <applePatch.h> 00038 #endif 00039 00040 #include <Time.h> 00041 00042 namespace MipBaselib{ 00043 00044 enum OdomIntegrMethods{ 00045 ODO_INT_METH_EXACT, 00046 ODO_INT_METH_RUNKUT2, 00047 ODO_INT_METH_DIRECT_INT, 00048 ODO_INT_METH_TRAPZ, 00049 ODO_INT_METH_NUM 00050 }; 00051 00052 00057 class DiffDriveEncoderReading{ 00058 public: 00059 long int leftPulses; 00060 long int rightPulses; 00061 Time leftTime; 00062 Time rightTime; 00063 00069 DiffDriveEncoderReading(long int lp=0,long int rp=0,Time lt=Time(0.0),Time rt=Time(0.0)); 00071 DiffDriveEncoderReading(const DiffDriveEncoderReading &p); 00073 DiffDriveEncoderReading& operator=(const DiffDriveEncoderReading& p); 00075 string print(); 00076 }; 00077 } // End of namespace 00078 00079 #endif