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
globfromrel.h
1
2
/***************************************************************************
3
* relvelo.h - A simple velocity model using the relative coordinates and
4
* robot velocity
5
*
6
* Created: Tue Oct 04 15:49:23 2005
7
* Copyright 2005 Tim Niemueller [www.niemueller.de]
8
*
9
****************************************************************************/
10
11
/* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* (at your option) any later version. A runtime exception applies to
15
* this software (see LICENSE.GPL_WRE file mentioned below for details).
16
*
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU Library General Public License for more details.
21
*
22
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
23
*/
24
25
#ifndef __FIREVISION_MODELS_VELOCITY_GLOBALFROMRELATIVE_H_
26
#define __FIREVISION_MODELS_VELOCITY_GLOBALFROMRELATIVE_H_
27
28
#include <fvmodels/velocity/velocitymodel.h>
29
#include <fvmodels/velocity/relvelo.h>
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
VelocityGlobalFromRelative
:
public
VelocityModel
40
{
41
public
:
42
VelocityGlobalFromRelative
(
VelocityModel
* rel_velo_model,
RelativePositionModel
*rel_pos_model);
43
virtual
~
VelocityGlobalFromRelative
();
44
45
virtual
const
char
* getName()
const
;
46
virtual
coordsys_type_t getCoordinateSystem();
47
48
virtual
void
setRobotPosition(
float
x,
float
y,
float
ori, timeval t);
49
virtual
void
setRobotVelocity(
float
vel_x,
float
vel_y, timeval t);
50
virtual
void
setPanTilt(
float
pan,
float
tilt);
51
virtual
void
setTime(timeval t);
52
virtual
void
setTimeNow();
53
virtual
void
getTime(
long
int
*sec,
long
int
*usec);
54
55
virtual
void
getVelocity(
float
*vel_x,
float
*vel_y);
56
57
virtual
float
getVelocityX();
58
virtual
float
getVelocityY();
59
60
virtual
void
calc();
61
virtual
void
reset();
62
63
private
:
64
VelocityModel
*relative_velocity;
65
RelativePositionModel
*relative_position;
66
67
float
robot_ori;
68
float
robot_poseage;
69
70
float
rel_vel_x;
71
float
rel_vel_y;
72
float
rel_dist;
73
float
cos_ori;
74
float
sin_ori;
75
76
float
velocity_x;
77
float
velocity_y;
78
79
float
avg_vx_sum;
80
float
avg_vy_sum;
81
float
avg_vx;
82
float
avg_vy;
83
unsigned
int
avg_vx_num;
84
unsigned
int
avg_vy_num;
85
float
rx;
86
float
ry;
87
float
age_factor;
88
89
/*
90
kalmanFilter2Dim *kalman_filter;
91
92
void applyKalmanFilter();
93
*/
94
};
95
96
}
// end namespace firevision
97
98
#endif
src
libs
fvmodels
velocity
globfromrel.h
Generated by
1.8.3.1