Fawkes API Fawkes Development Version
omni_global.h
1
2/***************************************************************************
3 * omni_global.h - Global position model that operating on a MirrorModel
4 *
5 * Created: Thu Mar 23 22:30:28 2006
6 * Copyright 2006-2008 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version. A runtime exception applies to
14 * this software (see LICENSE.GPL_WRE file mentioned below for details).
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22 */
23
24#ifndef _FIREVISION_MODELS_GLOBAL_POSITION_OMNI_GLOBAL_H_
25#define _FIREVISION_MODELS_GLOBAL_POSITION_OMNI_GLOBAL_H_
26
27#include <fvmodels/global_position/globalpositionmodel.h>
28
29namespace firevision {
30
31class MirrorModel;
32
34{
35public:
36 // constructor
37 OmniGlobal(MirrorModel *mirror_model);
38
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
42 virtual float get_x() const;
43 virtual float get_y() const;
44
45 virtual void calc();
46
47 virtual bool is_pos_valid() const;
48
49private:
50 float pose_x;
51 float pose_y;
52 float pose_ori;
53
54 float ball_x;
55 float ball_y;
56
57 MirrorModel *mirror_model;
58
59 unsigned int image_x;
60 unsigned int image_y;
61};
62
63} // end namespace firevision
64
65#endif
Global Position Model Interface.
Mirror model interface.
Definition: mirrormodel.h:32
Omni vision global position model.
Definition: omni_global.h:34
virtual void set_position_in_image(unsigned int x, unsigned int y)
Set the position of the object as recognized in the image.
Definition: omni_global.cpp:45
virtual void calc()
Calculate position.
Definition: omni_global.cpp:72
virtual bool is_pos_valid() const
Check if the position is valid.
Definition: omni_global.cpp:84
virtual void set_robot_position(float x, float y, float ori)
Set the global position of the object.
Definition: omni_global.cpp:52
virtual float get_x() const
Get global x coordinate of object.
Definition: omni_global.cpp:66
virtual float get_y() const
Get global y coordinate of object.
Definition: omni_global.cpp:60
OmniGlobal(MirrorModel *mirror_model)
Constructor.
Definition: omni_global.cpp:37