Robotsystem of the Robot Group Leipzig: axisorientationsensor.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- File List
- File Members

# axisorientationsensor.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: axisorientationsensor.h,v $
    00026  *   Revision 1.4  2006/12/21 11:42:10  martius
    00027  *   sensors have dimension to sense
    00028  *   axissensors have finer settings
    00029  *
    00030  *   Revision 1.3  2006/12/11 18:25:08  martius
    00031  *   memory freed
    00032  *
    00033  *   Revision 1.2  2006/08/11 15:45:38  martius
    00034  *   *** empty log message ***
    00035  *
    00036  *   Revision 1.1  2006/08/08 17:03:27  martius
    00037  *   new sensors model
    00038  *
    00039  *                                                                 *
    00040  ***************************************************************************/
    00041 #ifndef __AXISORIENTATIONSENSOR_H
    00042 #define __AXISORIENTATIONSENSOR_H
    00043
    00044 #include "sensor.h"
    00045
    00046 namespace lpzrobots {
    00047
    00048   /** Class for sensing the axis orienation of a primitive (robot)
    00049   */
    00050   class AxisOrientationSensor : public Sensor {
    00051   public:
    00052     /// Sensor mode
    00053     enum Mode { OnlyZAxis, ///< Z axis in word coordinated (Dimension select components of this vector)
    00054                 ZProjection, ///< z-component of each axis (Dimension select components of this vector)
    00055                 Axis ///< for each dimension one orienation vector, i.e. for X | Y | Z it is a 3x3 rotation matrix
    00056     };
    00057
    00058     /**
    00059        @param mode how to measure the axis orientation
    00060        @param dimensions bit mask for the dimensions to sense. Default: X | Y | Z (all dimensions)
    00061        @see Sensor::Dimensions
    00062        @see Mode
    00063      */
    00064     AxisOrientationSensor(Mode mode, short dimensions = X | Y | Z );
    00065     virtual ~AxisOrientationSensor() {}
    00066
    00067     virtual void init(Primitive* own);
    00068     virtual int getSensorNumber() const;
    00069
    00070     virtual bool sense(const GlobalData& globaldata);
    00071     virtual std::list<sensor> get() const;
    00072     virtual int get(sensor* sensors, int length) const;
    00073
    00074   private:
    00075     Mode mode;
    00076     short dimensions;
    00077     Primitive* own;
    00078   };
    00079
    00080
    00081 }
    00082
    00083 #endif