speedsensor.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 * * 00023 * DESCRIPTION * 00024 * * 00025 * $Log: speedsensor.h,v $ 00026 * Revision 1.1 2006/12/21 11:41:12 martius 00027 * sensor from measuring speed 00028 * 00029 * * 00030 ***************************************************************************/ 00031 #ifndef __SPEEDSENSOR_H 00032 #define __SPEEDSENSOR_H 00033 00034 #include "sensor.h" 00035 00036 namespace lpzrobots { 00037 00038 /** Class for speed sensing of robots. 00039 The sensor values are normalised speeds, either translational or rotational 00040 */ 00041 class SpeedSensor : public Sensor { 00042 public: 00043 00044 /// Sensor mode 00045 enum Mode { Translational, ///< measures translational speed in (Linear velocity) 00046 Rotational, ///< measures roational velocity around the axis 00047 }; 00048 00049 /** 00050 @param maxSpeed maximal speed that is expected used for normalisation of sensor value 00051 @param dimensions bit mask for the dimensions to sense. Default: X | Y | Z (all dimensions) 00052 @see Dimensions 00053 */ 00054 SpeedSensor(double maxSpeed, Mode mode = Translational, short dimensions = X | Y | Z ); 00055 virtual ~SpeedSensor() {} 00056 00057 virtual void init(Primitive* own); 00058 virtual int getSensorNumber() const; 00059 00060 virtual bool sense(const GlobalData& globaldata); 00061 virtual std::list<sensor> get() const; 00062 virtual int get(sensor* sensors, int length) const; 00063 00064 private: 00065 double maxSpeed; 00066 Mode mode; 00067 short dimensions; 00068 Primitive* own; 00069 }; 00070 00071 00072 } 00073 00074 #endif

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