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