Fawkes API  Fawkes Development Version
velocitymodel.cpp
1 
2 /***************************************************************************
3  * velocitymodel.cpp - Abstract class defining a velocity model
4  *
5  * Created: Thu Mar 29 17:02:09 2007
6  * Copyright 2005-2007 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 #include <fvmodels/velocity/velocitymodel.h>
25 
26 namespace firevision {
27 
28 /** @class VelocityModel <fvmodels/velocity/velocitymodel.h>
29  * Velocity model interface.
30  *
31  *
32  * @fn const char * VelocityModel::getName() const
33  * Get name of velocity model
34  * @return name of velocity model
35  *
36  * @fn void VelocityModel::setPanTilt(float pan, float tilt)
37  * Set pan and tilt.
38  * @param pan pan
39  * @param tilt tilt
40  *
41  * @fn void VelocityModel::setRobotPosition(float x, float y, float ori, timeval t)
42  * Set robot position.
43  * @param x x
44  * @param y y
45  * @param ori ori
46  * @param t timestamp of the pose information
47  *
48  * @fn void VelocityModel::setRobotVelocity(float vel_x, float vel_y, timeval t)
49  * Set robot velocity.
50  * @param vel_x robot velocity in x direction
51  * @param vel_y robot velocity in y direction
52  * @param t timestamp of the velocity information
53  *
54  * @fn void VelocityModel::setTime(timeval t)
55  * Set current time.
56  * @param t time
57  *
58  * @fn void VelocityModel::setTimeNow()
59  * Get current time from system.
60  *
61  * @fn void VelocityModel::getTime(long int *sec, long int *usec)
62  * Get time from velocity.
63  * @param sec contains seconds since the epoch upon return (Unix timestamp)
64  * @param usec contains microseconds upon return
65  *
66  * @fn void VelocityModel::getVelocity(float *vel_x, float *vel_y)
67  * Method to retrieve velocity information
68  * @param vel_x If not NULL contains velocity in X direction after call
69  * @param vel_y If not NULL contains velocity in Y direction after call
70  *
71  * @fn float VelocityModel::getVelocityX()
72  * Get velocity of tracked object in X direction.
73  * @return velocity in m/s.
74  *
75  * @fn float VelocityModel::getVelocityY()
76  * Get velocity of tracked object in X direction.
77  * @return velocity in m/s.
78  *
79  * @fn void VelocityModel::calc()
80  * Calculate velocity values from given data
81  * This method must be called after all relevent data (set*) has been
82  * set. After calc() the velocity values can be retrieved
83  *
84  * @fn void VelocityModel::reset()
85  * Reset velocity model
86  * Must be called if ball is not visible at any time
87  *
88  * @fn coordsys_type_t VelocityModel::getCoordinateSystem()
89  * Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or
90  * COORDSYS_ROBOT_WORLD. ROBOT denotes velocities relative to the robot
91  * (which can be tramsformed to global velocities by:
92  * glob_vel_x = rel_vel_x * cos( robot_ori ) - rel_vel_y * sin( robot_ori )
93  * WORLD denotes velocities in the robot coordinate system
94  * glob_vel_y = rel_vel_x * sin( robot_ori ) + rel_vel_y * cos( robot_ori )
95  */
96 
97 /** Virtual empty destructor. */
99 {
100 }
101 
102 } // end namespace firevision
firevision::VelocityModel::~VelocityModel
virtual ~VelocityModel()
Virtual empty destructor.
Definition: velocitymodel.cpp:104