Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * velocitymodel.cpp - Abstract class defining a velocity model 00004 * 00005 * Created: Thu Mar 29 17:02:09 2007 00006 * Copyright 2005-2007 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #include <fvmodels/velocity/velocitymodel.h> 00025 00026 namespace firevision { 00027 #if 0 /* just to make Emacs auto-indent happy */ 00028 } 00029 #endif 00030 00031 /** @class VelocityModel <fvmodels/velocity/velocitymodel.h> 00032 * Velocity model interface. 00033 * 00034 * 00035 * @fn const char * VelocityModel::getName() const 00036 * Get name of velocity model 00037 * @return name of velocity model 00038 * 00039 * @fn void VelocityModel::setPanTilt(float pan, float tilt) 00040 * Set pan and tilt. 00041 * @param pan pan 00042 * @param tilt tilt 00043 * 00044 * @fn void VelocityModel::setRobotPosition(float x, float y, float ori, timeval t) 00045 * Set robot position. 00046 * @param x x 00047 * @param y y 00048 * @param ori ori 00049 * @param t timestamp of the pose information 00050 * 00051 * @fn void VelocityModel::setRobotVelocity(float vel_x, float vel_y, timeval t) 00052 * Set robot velocity. 00053 * @param vel_x robot velocity in x direction 00054 * @param vel_y robot velocity in y direction 00055 * @param t timestamp of the velocity information 00056 * 00057 * @fn void VelocityModel::setTime(timeval t) 00058 * Set current time. 00059 * @param t time 00060 * 00061 * @fn void VelocityModel::setTimeNow() 00062 * Get current time from system. 00063 * 00064 * @fn void VelocityModel::getTime(long int *sec, long int *usec) 00065 * Get time from velocity. 00066 * @param sec contains seconds since the epoch upon return (Unix timestamp) 00067 * @param usec contains microseconds upon return 00068 * 00069 * @fn void VelocityModel::getVelocity(float *vel_x, float *vel_y) 00070 * Method to retrieve velocity information 00071 * @param vel_x If not NULL contains velocity in X direction after call 00072 * @param vel_y If not NULL contains velocity in Y direction after call 00073 * 00074 * @fn float VelocityModel::getVelocityX() 00075 * Get velocity of tracked object in X direction. 00076 * @return velocity in m/s. 00077 * 00078 * @fn float VelocityModel::getVelocityY() 00079 * Get velocity of tracked object in X direction. 00080 * @return velocity in m/s. 00081 * 00082 * @fn void VelocityModel::calc() 00083 * Calculate velocity values from given data 00084 * This method must be called after all relevent data (set*) has been 00085 * set. After calc() the velocity values can be retrieved 00086 * 00087 * @fn void VelocityModel::reset() 00088 * Reset velocity model 00089 * Must be called if ball is not visible at any time 00090 * 00091 * @fn coordsys_type_t VelocityModel::getCoordinateSystem() 00092 * Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or 00093 * COORDSYS_ROBOT_WORLD. ROBOT denotes velocities relative to the robot 00094 * (which can be tramsformed to global velocities by: 00095 * glob_vel_x = rel_vel_x * cos( robot_ori ) - rel_vel_y * sin( robot_ori ) 00096 * WORLD denotes velocities in the robot coordinate system 00097 * glob_vel_y = rel_vel_x * sin( robot_ori ) + rel_vel_y * cos( robot_ori ) 00098 */ 00099 00100 /** Virtual empty destructor. */ 00101 VelocityModel::~VelocityModel() 00102 { 00103 } 00104 00105 } // end namespace firevision