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
front_ball.h
1
2
/***************************************************************************
3
* front_ball.h - A simple implementation of the relative position model
4
* for the ball in the front vision
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_FRONT_BALL_H_
28
#define __FIREVISION_MODELS_RELATIVE_FRONT_BALL_H_
29
30
#include <fvmodels/relative_position/relativepositionmodel.h>
31
32
// include <utils/kalman_filter/ckalman_filter_2dim.h>
33
34
namespace
firevision {
35
#if 0
/* just to make Emacs auto-indent happy */
36
}
37
#endif
38
39
class
FrontBallRelativePos
:
public
RelativePositionModel
40
{
41
public
:
42
FrontBallRelativePos
(
unsigned
int
image_width,
unsigned
int
image_height,
43
float
camera_height,
44
float
camera_offset_x,
float
camera_offset_y,
45
float
camera_ori,
46
float
horizontal_angle,
float
vertical_angle,
47
float
ball_circumference
48
);
49
50
virtual
const
char
* get_name()
const
;
51
virtual
void
set_radius(
float
r);
52
virtual
void
set_center(
float
x,
float
y);
53
virtual
void
set_center(
const
center_in_roi_t
& c);
54
55
virtual
void
set_pan_tilt(
float
pan = 0.0f,
float
tilt = 0.0f);
56
virtual
void
get_pan_tilt(
float
*pan,
float
*tilt)
const
;
57
58
virtual
void
set_horizontal_angle(
float
angle_deg);
59
virtual
void
set_vertical_angle(
float
angle_deg);
60
61
virtual
float
get_distance()
const
;
62
virtual
float
get_x()
const
;
63
virtual
float
get_y()
const
;
64
virtual
float
get_bearing()
const
;
65
virtual
float
get_slope()
const
;
66
virtual
float
get_radius()
const
;
67
68
virtual
void
calc();
69
virtual
void
calc_unfiltered();
70
virtual
void
reset();
71
72
virtual
bool
is_pos_valid()
const
;
73
74
private
:
75
float
DEFAULT_X_VARIANCE;
76
float
DEFAULT_Y_VARIANCE;
77
78
float
m_fPanRadPerPixel;
79
float
m_fTiltRadPerPixel;
80
float
m_fBallRadius;
// in meter
81
82
float
m_fRadius;
83
center_in_roi_t
m_cirtCenter;
84
float
m_fPan;
85
float
m_fTilt;
86
87
float
horizontal_angle;
88
float
vertical_angle;
89
90
unsigned
int
image_width;
91
unsigned
int
image_height;
92
93
float
camera_height;
94
float
camera_offset_x;
95
float
camera_offset_y;
96
float
camera_orientation;
97
98
float
ball_circumference;
99
100
float
last_x;
101
float
last_y;
102
bool
last_available;
103
float
ball_x;
104
float
ball_y;
105
float
bearing;
106
float
slope;
107
float
distance_ball_motor;
108
float
distance_ball_cam;
109
110
float
avg_x;
111
float
avg_y;
112
float
avg_x_sum;
113
float
avg_y_sum;
114
unsigned
int
avg_x_num;
115
unsigned
int
avg_y_num;
116
float
rx;
117
float
ry;
118
119
float
var_proc_x;
120
float
var_proc_y;
121
float
var_meas_x;
122
float
var_meas_y;
123
// kalmanFilter2Dim *kalman_filter;
124
125
// void applyKalmanFilter();
126
};
127
128
}
// end namespace firevision
129
130
#endif // __FIREVISION_MODELS_RELPOS_BALL_H_
131
src
libs
fvmodels
relative_position
front_ball.h
Generated by
1.8.1.1