velocitymodel.cpp

00001
00002 /***************************************************************************
00003  *  velocitymodel.cpp - Abstract class defining a velocity model
00004  *
00005  *  Generated: 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 <models/velocity/velocitymodel.h>
00025 
00026 /** @class VelocityModel <models/velocity/velocitymodel.h>
00027  * Velocity model interface.
00028  *
00029  *
00030  * @fn const char *  VelocityModel::getName() const
00031  * Get name of velocity model
00032  * @return name of velocity model
00033  *
00034  * @fn void     VelocityModel::setPanTilt(float pan, float tilt)
00035  * Set pan and tilt.
00036  * @param pan pan
00037  * @param tilt tilt
00038  *
00039  * @fn void  VelocityModel::setRobotPosition(float x, float y, float ori, timeval t)
00040  * Set robot position.
00041  * @param x x
00042  * @param y y
00043  * @param ori ori
00044  * @param t timestamp of the pose information
00045  *
00046  * @fn void  VelocityModel::setRobotVelocity(float vel_x, float vel_y, timeval t)
00047  * Set robot velocity.
00048  * @param vel_x robot velocity in x direction
00049  * @param vel_y robot velocity in y direction
00050  * @param t timestamp of the velocity information
00051  *
00052  * @fn void  VelocityModel::setTime(timeval t)
00053  * Set current time.
00054  * @param t time
00055  *
00056  * @fn void  VelocityModel::setTimeNow()
00057  * Get current time from system.
00058  *
00059  * @fn void  VelocityModel::getTime(long int *sec, long int *usec)
00060  * Get time from velocity.
00061  * @param sec contains seconds since the epoch upon return (Unix timestamp)
00062  * @param usec contains microseconds upon return
00063  *
00064  * @fn void  VelocityModel::getVelocity(float *vel_x, float *vel_y)
00065  * Method to retrieve velocity information
00066  * @param vel_x If not NULL contains velocity in X direction after call
00067  * @param vel_y If not NULL contains velocity in Y direction after call
00068  *
00069  * @fn float VelocityModel::getVelocityX()
00070  * Get velocity of tracked object in X direction.
00071  * @return velocity in m/s.
00072  *
00073  * @fn float VelocityModel::getVelocityY()
00074  * Get velocity of tracked object in X direction.
00075  * @return velocity in m/s.
00076  *
00077  * @fn void VelocityModel::calc()
00078  * Calculate velocity values from given data
00079  * This method must be called after all relevent data (set*) has been
00080  * set. After calc() the velocity values can be retrieved
00081  *
00082  * @fn void VelocityModel::reset()
00083  * Reset velocity model
00084  * Must be called if ball is not visible at any time
00085  *
00086  * @fn coordsys_type_t VelocityModel::getCoordinateSystem()
00087  * Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or
00088  * COORDSYS_ROBOT_WORLD. ROBOT denotes velocities relative to the robot
00089  * (which can be tramsformed to global velocities by:
00090  * glob_vel_x = rel_vel_x * cos( robot_ori ) - rel_vel_y * sin( robot_ori )
00091  * WORLD denotes velocities in the robot coordinate system
00092  * glob_vel_y = rel_vel_x * sin( robot_ori ) + rel_vel_y * cos( robot_ori )
00093  */
00094 
00095 /** Virtual empty destructor. */
00096 VelocityModel::~VelocityModel()
00097 {
00098 }