VelocityModel Class Reference
Velocity model interface. More...
#include <models/velocity/velocitymodel.h>

Public Member Functions | |
| virtual | ~VelocityModel () |
| Virtual empty destructor. | |
| virtual const char * | getName () const =0 |
| Get name of velocity model. | |
| virtual void | setPanTilt (float pan, float tilt)=0 |
| Set pan and tilt. | |
| virtual void | setRobotPosition (float x, float y, float ori, timeval t)=0 |
| Set robot position. | |
| virtual void | setRobotVelocity (float vel_x, float vel_y, timeval t)=0 |
| Set robot velocity. | |
| virtual void | setTime (timeval t)=0 |
| Set current time. | |
| virtual void | setTimeNow ()=0 |
| Get current time from system. | |
| virtual void | getTime (long int *sec, long int *usec)=0 |
| Get time from velocity. | |
| virtual void | getVelocity (float *vel_x, float *vel_y)=0 |
| Method to retrieve velocity information. | |
| virtual float | getVelocityX ()=0 |
| Get velocity of tracked object in X direction. | |
| virtual float | getVelocityY ()=0 |
| Get velocity of tracked object in X direction. | |
| virtual void | calc ()=0 |
| Calculate velocity values from given data This method must be called after all relevent data (set*) has been set. | |
| virtual void | reset ()=0 |
| Reset velocity model Must be called if ball is not visible at any time. | |
| virtual coordsys_type_t | getCoordinateSystem ()=0 |
| Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or COORDSYS_ROBOT_WORLD. | |
Detailed Description
Velocity model interface.Definition at line 30 of file velocitymodel.h.
Constructor & Destructor Documentation
| VelocityModel::~VelocityModel | ( | ) | [virtual] |
Member Function Documentation
| void VelocityModel::calc | ( | ) | [pure virtual] |
Calculate velocity values from given data This method must be called after all relevent data (set*) has been set.
After calc() the velocity values can be retrieved
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
| coordsys_type_t VelocityModel::getCoordinateSystem | ( | ) | [pure virtual] |
Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or COORDSYS_ROBOT_WORLD.
ROBOT denotes velocities relative to the robot (which can be tramsformed to global velocities by: glob_vel_x = rel_vel_x * cos( robot_ori ) - rel_vel_y * sin( robot_ori ) WORLD denotes velocities in the robot coordinate system glob_vel_y = rel_vel_x * sin( robot_ori ) + rel_vel_y * cos( robot_ori )
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
Referenced by VelocityGlobalFromRelative::VelocityGlobalFromRelative().
| const char * VelocityModel::getName | ( | void | ) | const [pure virtual] |
Get name of velocity model.
- Returns:
- name of velocity model
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
| void VelocityModel::getTime | ( | long int * | sec, | |
| long int * | usec | |||
| ) | [pure virtual] |
Get time from velocity.
- Parameters:
-
sec contains seconds since the epoch upon return (Unix timestamp) usec contains microseconds upon return
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
| void VelocityModel::getVelocity | ( | float * | vel_x, | |
| float * | vel_y | |||
| ) | [pure virtual] |
Method to retrieve velocity information.
- Parameters:
-
vel_x If not NULL contains velocity in X direction after call vel_y If not NULL contains velocity in Y direction after call
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
Referenced by VelocityGlobalFromRelative::calc().
| float VelocityModel::getVelocityX | ( | ) | [pure virtual] |
Get velocity of tracked object in X direction.
- Returns:
- velocity in m/s.
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
| float VelocityModel::getVelocityY | ( | ) | [pure virtual] |
Get velocity of tracked object in X direction.
- Returns:
- velocity in m/s.
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
| void VelocityModel::reset | ( | void | ) | [pure virtual] |
Reset velocity model Must be called if ball is not visible at any time.
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
| void VelocityModel::setPanTilt | ( | float | pan, | |
| float | tilt | |||
| ) | [pure virtual] |
Set pan and tilt.
- Parameters:
-
pan pan tilt tilt
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
| void VelocityModel::setRobotPosition | ( | float | x, | |
| float | y, | |||
| float | ori, | |||
| timeval | t | |||
| ) | [pure virtual] |
Set robot position.
- Parameters:
-
x x y y ori ori t timestamp of the pose information
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
| void VelocityModel::setRobotVelocity | ( | float | vel_x, | |
| float | vel_y, | |||
| timeval | t | |||
| ) | [pure virtual] |
Set robot velocity.
- Parameters:
-
vel_x robot velocity in x direction vel_y robot velocity in y direction t timestamp of the velocity information
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
| void VelocityModel::setTime | ( | timeval | t | ) | [pure virtual] |
Set current time.
- Parameters:
-
t time
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
| void VelocityModel::setTimeNow | ( | ) | [pure virtual] |
Get current time from system.
Implemented in VelocityGlobalFromRelative, VelocityFromGlobal, and VelocityFromRelative.
The documentation for this class was generated from the following files:
- src/firevision/models/velocity/velocitymodel.h
- src/firevision/models/velocity/velocitymodel.cpp

