Fawkes API  Fawkes Development Version
globfromrel.h
1 
2 /***************************************************************************
3  * globfromrel.h - A simple implementation of the global position model for
4  * a ball
5  *
6  * Created: Fri Jun 03 22:56:22 2005
7  * Copyright 2005 Hu Yuxiao <Yuxiao.Hu@rwth-aachen.de>
8  * Tim Niemueller [www.niemueller.de]
9  *
10  ****************************************************************************/
11 
12 /* This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version. A runtime exception applies to
16  * this software (see LICENSE.GPL_WRE file mentioned below for details).
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU Library General Public License for more details.
22  *
23  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
24  */
25 
26 #ifndef __FIREVISION_MODELS_GLOBAL_POSITION_GLOBFROMREL_H_
27 #define __FIREVISION_MODELS_GLOBAL_POSITION_GLOBFROMREL_H_
28 
29 #include <fvmodels/global_position/globalpositionmodel.h>
30 
31 namespace firevision {
32 #if 0 /* just to make Emacs auto-indent happy */
33 }
34 #endif
35 
36 class RelativePositionModel;
37 
39 {
40  public:
42  virtual void set_robot_position(float x, float y, float ori);
43  virtual void set_position_in_image(unsigned int x, unsigned int y);
44  virtual float get_x(void) const;
45  virtual float get_y(void) const;
46 
47  virtual void calc();
48 
49  virtual bool is_pos_valid() const;
50 
51  private:
52  RelativePositionModel *m_pRelaModel;
53  float m_fPosX;
54  float m_fPosY;
55  float m_fPhi;
56 
57 };
58 
59 } // end namespace firevision
60 
61 #endif
GlobalFromRelativePos(RelativePositionModel *model)
Constructor.
Definition: globfromrel.cpp:43
Relative Position Model Interface.
virtual float get_x(void) const
Get global x coordinate of object.
Definition: globfromrel.cpp:81
virtual bool is_pos_valid() const
Check if the position is valid.
Definition: globfromrel.cpp:74
virtual void set_position_in_image(unsigned int x, unsigned int y)
Set the position of the object as recognized in the image.
Definition: globfromrel.cpp:62
virtual void calc()
Calculate position.
Definition: globfromrel.cpp:68
Calculate global ball position based on a relative position model.
Definition: globfromrel.h:38
virtual void set_robot_position(float x, float y, float ori)
Set the global position of the object.
Definition: globfromrel.cpp:53
Global Position Model Interface.
virtual float get_y(void) const
Get global y coordinate of object.