abstractrobot.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Robot Group Leipzig * 00003 * martius@informatik.uni-leipzig.de * 00004 * fhesse@informatik.uni-leipzig.de * 00005 * der@informatik.uni-leipzig.de * 00006 * * 00007 * This program is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 2 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 * This program is distributed in the hope that it will be useful, * 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00015 * GNU General Public License for more details. * 00016 * * 00017 * You should have received a copy of the GNU General Public License * 00018 * along with this program; if not, write to the * 00019 * Free Software Foundation, Inc., * 00020 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00021 * * 00022 * $Log: abstractrobot.h,v $ 00023 * Revision 1.3 2006/08/04 15:16:12 martius 00024 * documentation 00025 * 00026 * Revision 1.2 2006/07/14 12:23:57 martius 00027 * selforg becomes HEAD 00028 * 00029 * Revision 1.1.2.2 2006/06/25 16:51:35 martius 00030 * configureable has name and revision 00031 * a robot is configureable by default 00032 * 00033 * Revision 1.1.2.1 2005/11/14 17:37:56 martius 00034 * moved to selforg 00035 * 00036 * Revision 1.11 2005/10/06 17:14:24 martius 00037 * switched to stl lists 00038 * 00039 * Revision 1.10 2005/09/22 12:24:36 martius 00040 * removed global variables 00041 * OdeHandle and GlobalData are used instead 00042 * sensor prepared 00043 * 00044 * Revision 1.9 2005/09/22 07:30:53 martius 00045 * moved color and position into extra modules 00046 * 00047 * Revision 1.8 2005/09/12 00:10:44 martius 00048 * position operators are const 00049 * 00050 * Revision 1.7 2005/08/30 16:53:53 martius 00051 * Position struct has toArray and operators 00052 * 00053 * Revision 1.6 2005/08/29 06:40:35 martius 00054 * added virtual destructor 00055 * 00056 * Revision 1.5 2005/08/22 20:32:45 martius 00057 * robot has a name 00058 * 00059 * Revision 1.4 2005/07/27 13:22:16 martius 00060 * position and color have constructors 00061 * ODEHandle 00062 * 00063 * Revision 1.3 2005/07/18 14:47:41 martius 00064 * world, space, contactgroup are not pointers anymore. 00065 * 00066 * Revision 1.2 2005/07/07 09:27:11 martius 00067 * isGeomInObjectList added 00068 * 00069 * Revision 1.1 2005/06/15 14:20:04 martius 00070 * moved into robots 00071 * * 00072 ***************************************************************************/ 00073 #ifndef __ABSTRACTROBOT_H 00074 #define __ABSTRACTROBOT_H 00075 00076 #include <vector> 00077 00078 #include "trackable.h" 00079 #include "configurable.h" 00080 #include "position.h" 00081 #include "types.h" 00082 00083 /** 00084 * Abstract class (interface) for robot in general 00085 * 00086 * 00087 */ 00088 class AbstractRobot : public Trackable, public Configurable { 00089 public: 00090 00091 /** 00092 * Constructor 00093 * @param name name of the robot 00094 * @param revision revision number of the file (Hint: use CVS variable \verbatim $ID$ \endverbatim ) 00095 */ 00096 AbstractRobot(const std::string& name="abstractRobot", const std::string& revision = "$ID$") 00097 : Configurable(name, revision) { 00098 }; 00099 00100 virtual ~AbstractRobot(){} 00101 00102 /** returns actual sensorvalues 00103 @param sensors sensors scaled to [-1,1] 00104 @param sensornumber length of the sensor array 00105 @return number of actually written sensors 00106 */ 00107 virtual int getSensors(sensor* sensors, int sensornumber)=0; 00108 00109 /** sets actual motorcommands 00110 @param motors motors scaled to [-1,1] 00111 @param motornumber length of the motor array 00112 */ 00113 virtual void setMotors(const motor* motors, int motornumber)=0; 00114 00115 /** returns number of sensors 00116 */ 00117 virtual int getSensorNumber()=0; 00118 00119 /** returns number of motors 00120 */ 00121 virtual int getMotorNumber()=0; 00122 00123 00124 00125 }; 00126 00127 #endif 00128

Generated on Tue Jan 16 02:14:34 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8