Fawkes API  Fawkes Development Version
firevision::VelocityModel Class Referenceabstract

#include <>>

Inheritance diagram for firevision::VelocityModel:

Public Member Functions

virtual ~VelocityModel ()
 Virtual empty destructor. More...
 
virtual const char * getName () const =0
 
virtual void setPanTilt (float pan, float tilt)=0
 
virtual void setRobotPosition (float x, float y, float ori, timeval t)=0
 
virtual void setRobotVelocity (float vel_x, float vel_y, timeval t)=0
 
virtual void setTime (timeval t)=0
 
virtual void setTimeNow ()=0
 
virtual void getTime (long int *sec, long int *usec)=0
 
virtual void getVelocity (float *vel_x, float *vel_y)=0
 
virtual float getVelocityX ()=0
 
virtual float getVelocityY ()=0
 
virtual void calc ()=0
 Calculate velocity values from given data This method must be called after all relevent data (set*) has been set. More...
 
virtual void reset ()=0
 Reset velocity model Must be called if ball is not visible at any time. More...
 
virtual coordsys_type_t getCoordinateSystem ()=0
 Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or COORDSYS_ROBOT_WORLD. More...
 

Detailed Description

Velocity model interface.

Definition at line 38 of file velocitymodel.h.

Constructor & Destructor Documentation

◆ ~VelocityModel()

firevision::VelocityModel::~VelocityModel ( )
virtual

Virtual empty destructor.

Definition at line 104 of file velocitymodel.cpp.

Member Function Documentation

◆ calc()

void firevision::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

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 firevision::VelocityFromRelative, firevision::VelocityGlobalFromRelative, and firevision::VelocityFromGlobal.

◆ getCoordinateSystem()

coordsys_type_t firevision::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 )

Returns
coordinate system type

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 firevision::VelocityFromRelative, firevision::VelocityFromGlobal, and firevision::VelocityGlobalFromRelative.

Referenced by firevision::VelocityGlobalFromRelative::VelocityGlobalFromRelative().

◆ getName()

const char * firevision::VelocityModel::getName ( ) const
pure virtual

Get name of velocity model

Returns
name of velocity model

Implemented in firevision::VelocityFromRelative, firevision::VelocityFromGlobal, and firevision::VelocityGlobalFromRelative.

◆ getTime()

void firevision::VelocityModel::getTime ( long int *  sec,
long int *  usec 
)
pure virtual

Get time from velocity.

Parameters
seccontains seconds since the epoch upon return (Unix timestamp)
useccontains microseconds upon return

Implemented in firevision::VelocityFromRelative, firevision::VelocityGlobalFromRelative, and firevision::VelocityFromGlobal.

◆ getVelocity()

void firevision::VelocityModel::getVelocity ( float *  vel_x,
float *  vel_y 
)
pure virtual

Method to retrieve velocity information

Parameters
vel_xIf not NULL contains velocity in X direction after call
vel_yIf not NULL contains velocity in Y direction after call

Implemented in firevision::VelocityFromRelative, firevision::VelocityGlobalFromRelative, and firevision::VelocityFromGlobal.

◆ getVelocityX()

float firevision::VelocityModel::getVelocityX ( )
pure virtual

Get velocity of tracked object in X direction.

Returns
velocity in m/s.

Implemented in firevision::VelocityFromRelative, firevision::VelocityGlobalFromRelative, and firevision::VelocityFromGlobal.

◆ getVelocityY()

float firevision::VelocityModel::getVelocityY ( )
pure virtual

Get velocity of tracked object in X direction.

Returns
velocity in m/s.

Implemented in firevision::VelocityFromRelative, firevision::VelocityGlobalFromRelative, and firevision::VelocityFromGlobal.

◆ reset()

void firevision::VelocityModel::reset ( )
pure virtual

Reset velocity model Must be called if ball is not visible at any time.

Reset velocity model Must be called if ball is not visible at any time

Implemented in firevision::VelocityFromRelative, firevision::VelocityGlobalFromRelative, and firevision::VelocityFromGlobal.

◆ setPanTilt()

void firevision::VelocityModel::setPanTilt ( float  pan,
float  tilt 
)
pure virtual

Set pan and tilt.

Parameters
panpan
tilttilt

Implemented in firevision::VelocityFromRelative, firevision::VelocityGlobalFromRelative, and firevision::VelocityFromGlobal.

◆ setRobotPosition()

void firevision::VelocityModel::setRobotPosition ( float  x,
float  y,
float  ori,
timeval  t 
)
pure virtual

Set robot position.

Parameters
xx
yy
oriori
ttimestamp of the pose information

Implemented in firevision::VelocityFromRelative, firevision::VelocityGlobalFromRelative, and firevision::VelocityFromGlobal.

◆ setRobotVelocity()

void firevision::VelocityModel::setRobotVelocity ( float  vel_x,
float  vel_y,
timeval  t 
)
pure virtual

Set robot velocity.

Parameters
vel_xrobot velocity in x direction
vel_yrobot velocity in y direction
ttimestamp of the velocity information

Implemented in firevision::VelocityFromRelative, firevision::VelocityGlobalFromRelative, and firevision::VelocityFromGlobal.

◆ setTime()

void firevision::VelocityModel::setTime ( timeval  t)
pure virtual

◆ setTimeNow()

void firevision::VelocityModel::setTimeNow ( )
pure virtual

The documentation for this class was generated from the following files: