Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Khepera.h

Go to the documentation of this file.
00001 /*
00002     Enki - a fast 2D robot simulator
00003     Copyright (C) 1999-2005 Stephane Magnenat <nct@ysagoon.com>
00004     Copyright (C) 2004-2005 Antoine Beyeler <antoine.beyeler@epfl.ch>
00005     Copyright (C) 2005 Laboratory of Intelligent Systems, EPFL, Lausanne
00006     See AUTHORS for details
00007 
00008     This program is free software; the authors of any publication 
00009     arising from research using this software are asked to add the 
00010     following reference:
00011     Enki - a fast 2D robot simulator part of the Teem framework
00012     http://teem.epfl.ch
00013     Stephane Magnenat <stephane.magnenat@epfl.ch>,
00014     Markus Waibel <markus.waibel@epfl.ch>
00015     Laboratory of Intelligent Systems, EPFL, Lausanne.
00016 
00017     You can redistribute this program and/or modify
00018     it under the terms of the GNU General Public License as published by
00019     the Free Software Foundation; either version 2 of the License, or
00020     (at your option) any later version.
00021 
00022     This program is distributed in the hope that it will be useful,
00023     but WITHOUT ANY WARRANTY; without even the implied warranty of
00024     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00025     GNU General Public License for more details.
00026 
00027     You should have received a copy of the GNU General Public License
00028     along with this program; if not, write to the Free Software
00029     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00030 */
00031 
00032 #ifndef __KHEPERA_H
00033 #define __KHEPERA_H
00034 
00035 #include <enki/PhysicalEngine.h>
00036 #include <enki/interactions/IRSensor.h>
00037 #include <enki/interactions/CircularCam.h>
00038 
00043 namespace Enki
00044 {
00046 
00047     class Khepera : public Robot
00048     {
00049     public:
00051         IRSensor infraredSensor0;
00053         IRSensor infraredSensor1;
00055         IRSensor infraredSensor2;
00057         IRSensor infraredSensor3;
00059         IRSensor infraredSensor4;
00061         IRSensor infraredSensor5;
00063         IRSensor infraredSensor6;
00065         IRSensor infraredSensor7;
00067         CircularCam camera;
00068         
00069     public:
00071         double leftSpeed, rightSpeed;
00073         double leftEncoder, rightEncoder;
00074     
00075     protected:
00077         An::Vector oldPos;
00079         double oldAngle;
00080         
00081     public:
00082         enum Capabilities
00083         {
00085             CAPABILITIY_NONE = 0,
00087             CAPABILITIY_BASIC_SENSORS = 0x1,
00089             CAPABILITY_CAMERA = 0x2
00090         };
00091 
00092     public:
00094         Khepera(unsigned capabilities = CAPABILITIY_BASIC_SENSORS);
00096         void step(double dt);
00097         
00099         void resetEncoders();
00100     
00101     };
00102 }
00103 
00104 #endif
00105 

Generated on Mon Oct 24 17:33:58 2005 for Enki by  doxygen 1.4.2