omni_global.h

00001
00002 /***************************************************************************
00003  *  omni_global.h - Global position model that operating on a MirrorModel
00004  *
00005  *  Created: Thu Mar 23 22:30:28 2006
00006  *  Copyright  2006-2008  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023
00024 #ifndef __FIREVISION_MODELS_GLOBAL_POSITION_OMNI_GLOBAL_H_
00025 #define __FIREVISION_MODELS_GLOBAL_POSITION_OMNI_GLOBAL_H_
00026 
00027 #include <models/global_position/globalpositionmodel.h>
00028
00029 class MirrorModel;
00030
00031 class OmniGlobal : public GlobalPositionModel
00032 {
00033  public:
00034   // constructor
00035   OmniGlobal(MirrorModel *mirror_model);
00036
00037   virtual void          set_robot_position(float x, float y, float ori);
00038   virtual void          set_position_in_image(unsigned int x, unsigned int y);
00039
00040   virtual float         get_x() const;
00041   virtual float         get_y() const;
00042
00043   virtual void          calc();
00044
00045   virtual bool          is_pos_valid() const;
00046
00047 private:
00048   float                 pose_x;
00049   float                 pose_y;
00050   float                 pose_ori;
00051
00052   float                 ball_x;
00053   float                 ball_y;
00054
00055   MirrorModel          *mirror_model;
00056
00057   unsigned int          image_x;
00058   unsigned int          image_y;
00059
00060 };
00061
00062 #endif
00063