24#ifndef _FIREVISION_MODELS_VELOCITY_GLOBAL_H_
25#define _FIREVISION_MODELS_VELOCITY_GLOBAL_H_
27#include <fvmodels/global_position/globalpositionmodel.h>
28#include <fvmodels/velocity/velocitymodel.h>
41 unsigned int history_length,
42 unsigned int calc_interval);
45 virtual const char *
getName()
const;
49 virtual void setPanTilt(
float pan,
float tilt);
50 virtual void setTime(timeval t);
52 virtual void getTime(
long int *sec,
long int *usec);
54 virtual void getVelocity(
float *vel_x,
float *vel_y);
73 std::vector<timeval> last_time;
75 unsigned int history_length;
76 unsigned int calc_interval;
83 std::vector<float> last_x;
84 std::vector<float> last_y;
92 float velocity_total_x;
93 float velocity_total_y;
Global Position Model Interface.
Velocity from global positions.
virtual void getTime(long int *sec, long int *usec)
Get time from velocity.
virtual void calc()
Calculate velocity values from given data This method must be called after all relevent data (set*) h...
virtual void setTimeNow()
Get current time from system.
virtual coordsys_type_t getCoordinateSystem()
Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or COORDSYS_ROBOT_WORLD.
virtual void getVelocity(float *vel_x, float *vel_y)
Method to retrieve velocity information.
virtual void setPanTilt(float pan, float tilt)
Set pan and tilt.
virtual const char * getName() const
Get name of velocity model.
virtual float getVelocityX()
Get velocity of tracked object in X direction.
virtual void setRobotPosition(float x, float y, float ori, timeval t)
Set robot position.
virtual void setTime(timeval t)
Set current time.
virtual float getVelocityY()
Get velocity of tracked object in X direction.
VelocityFromGlobal(GlobalPositionModel *model, unsigned int history_length, unsigned int calc_interval)
Constructor.
virtual ~VelocityFromGlobal()
Destructor.
virtual void setRobotVelocity(float vel_x, float vel_y, timeval t)
Set robot velocity.
virtual void reset()
Reset velocity model Must be called if ball is not visible at any time.
Velocity model interface.