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
31namespace firevision {
32
33class RelativePositionModel;
34
36{
37public:
39 virtual void set_robot_position(float x, float y, float ori);
40 virtual void set_position_in_image(unsigned int x, unsigned int y);
41 virtual float get_x(void) const;
42 virtual float get_y(void) const;
43
44 virtual void calc();
45
46 virtual bool is_pos_valid() const;
47
48private:
49 RelativePositionModel *m_pRelaModel;
50 float m_fPosX;
51 float m_fPosY;
52 float m_fPhi;
53};
54
55} // end namespace firevision
56
57#endif
Calculate global ball position based on a relative position model.
Definition: globfromrel.h:36
virtual void calc()
Calculate position.
Definition: globfromrel.cpp:63
GlobalFromRelativePos(RelativePositionModel *model)
Constructor.
Definition: globfromrel.cpp:41
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:58
virtual float get_y(void) const
Get global y coordinate of object.
Definition: globfromrel.cpp:93
virtual bool is_pos_valid() const
Check if the position is valid.
Definition: globfromrel.cpp:68
virtual void set_robot_position(float x, float y, float ori)
Set the global position of the object.
Definition: globfromrel.cpp:50
virtual float get_x(void) const
Get global x coordinate of object.
Definition: globfromrel.cpp:74
Global Position Model Interface.
Relative Position Model Interface.