Fawkes API
Fawkes Development Version
|
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>
35 namespace firevision {
37 class VelocityFromGlobal :
public VelocityModel
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;
virtual void getVelocity(float *vel_x, float *vel_y)
virtual void getTime(long int *sec, long int *usec)
virtual coordsys_type_t getCoordinateSystem()
Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or COORDSYS_ROBOT_WORLD.
VelocityFromGlobal(GlobalPositionModel *model, unsigned int history_length, unsigned int calc_interval)
Constructor.
virtual const char * getName() const
virtual void setTimeNow()
virtual void setTime(timeval t)
virtual void setRobotVelocity(float vel_x, float vel_y, timeval t)
virtual void calc()
Calculate velocity values from given data This method must be called after all relevent data (set*) h...
virtual void reset()
Reset velocity model Must be called if ball is not visible at any time.
virtual float getVelocityX()
virtual void setPanTilt(float pan, float tilt)
virtual void setRobotPosition(float x, float y, float ori, timeval t)
virtual ~VelocityFromGlobal()
Destructor.
virtual float getVelocityY()