Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
omni_relative.h
1
2
/***************************************************************************
3
* omni_ball_relative.h - A simple implementation of a relative omni
4
* relative position model using a MirrorModel
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
* Martin Heracles <Martin.Heracles@rwth-aachen.de>
10
*
11
****************************************************************************/
12
13
/* This program is free software; you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation; either version 2 of the License, or
16
* (at your option) any later version. A runtime exception applies to
17
* this software (see LICENSE.GPL_WRE file mentioned below for details).
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
* GNU Library General Public License for more details.
23
*
24
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
25
*/
26
27
#ifndef __FIREVISION_MODELS_RELATIVE_POSITION_OMNI_RELATIVE_H_
28
#define __FIREVISION_MODELS_RELATIVE_POSITION_OMNI_RELATIVE_H_
29
30
#include <fvmodels/relative_position/relativepositionmodel.h>
31
#include <fvmodels/mirror/mirrormodel.h>
32
33
// include <utils/kalman_filter/ckalman_filter_2dim.h>
34
35
namespace
firevision {
36
#if 0
/* just to make Emacs auto-indent happy */
37
}
38
#endif
39
40
class
OmniRelative
:
public
RelativePositionModel
41
{
42
public
:
43
// constructor
44
OmniRelative
(
MirrorModel
*mirror_model);
45
46
virtual
const
char
* get_name()
const
;
47
virtual
void
set_radius(
float
r);
48
virtual
void
set_center(
float
x,
float
y);
49
virtual
void
set_center(
const
center_in_roi_t
& c);
50
51
virtual
void
set_pan_tilt(
float
pan = 0.0f,
float
tilt = 0.0f);
52
virtual
void
get_pan_tilt(
float
*pan,
float
*tilt)
const
;
53
54
virtual
float
get_distance()
const
;
55
virtual
float
get_x()
const
;
56
virtual
float
get_y()
const
;
57
virtual
float
get_bearing()
const
;
58
virtual
float
get_slope()
const
;
59
virtual
float
get_radius()
const
;
60
61
virtual
void
calc();
62
virtual
void
calc_unfiltered();
63
virtual
void
reset();
64
65
virtual
bool
is_pos_valid()
const
;
66
67
private
:
68
float
DEFAULT_X_VARIANCE;
69
float
DEFAULT_Y_VARIANCE;
70
71
MirrorModel
*mirror_model;
72
73
unsigned
int
image_width;
74
unsigned
int
image_height;
75
76
unsigned
int
image_x;
77
unsigned
int
image_y;
78
79
float
last_x;
80
float
last_y;
81
bool
last_available;
82
float
ball_x;
83
float
ball_y;
84
float
bearing;
85
float
slope;
86
float
distance_ball_motor;
87
float
distance_ball_cam;
88
89
float
avg_x;
90
float
avg_y;
91
float
avg_x_sum;
92
float
avg_y_sum;
93
unsigned
int
avg_x_num;
94
unsigned
int
avg_y_num;
95
float
rx;
96
float
ry;
97
98
//kalmanFilter2Dim *kalman_filter;
99
100
//void applyKalmanFilter();
101
};
102
103
}
// end namespace firevision
104
105
#endif
src
libs
fvmodels
relative_position
omni_relative.h
Generated by
1.8.3.1