25 #ifndef __FIREVISION_MODELS_VELOCITY_RELATIVE_H_ 26 #define __FIREVISION_MODELS_VELOCITY_RELATIVE_H_ 28 #include <fvmodels/velocity/velocitymodel.h> 29 #include <fvmodels/relative_position/relativepositionmodel.h> 31 #include <fvutils/base/types.h> 61 virtual const char *
getName()
const;
65 virtual void setPanTilt(
float pan,
float tilt);
66 virtual void setTime(timeval t);
68 virtual void getTime(
long int *sec,
long int *usec);
70 virtual void getVelocity(
float *vel_x,
float *vel_y);
83 float robot_rel_vel_x;
84 float robot_rel_vel_y;
85 timeval robot_rel_vel_t;
86 timeval vel_last_time;
89 std::list<vel_postime_t *> ball_history;
90 std::list<vel_postime_t *>::iterator bh_it;
94 unsigned int max_history_length;
95 unsigned int calc_interval;
108 float last_proj_error_x;
109 float last_proj_error_y;
110 float proj_time_diff_sec;
120 unsigned int avg_vx_num;
121 unsigned int avg_vy_num;
Calculate velocity from relative positions.
virtual float getVelocityX()
Get velocity of tracked object in X direction.
virtual void getVelocity(float *vel_x, float *vel_y)
Method to retrieve velocity information.
virtual const char * getName() const
Get name of velocity model.
virtual void setTime(timeval t)
Set current time.
Velocity model interface.
virtual void setRobotPosition(float x, float y, float ori, timeval t)
Set robot position.
virtual float getVelocityY()
Get velocity of tracked object in X direction.
virtual void setTimeNow()
Get current time from system.
Relative Position Model Interface.
VelocityFromRelative(RelativePositionModel *model, unsigned int max_history_length, unsigned int calc_interval)
Constructor.
virtual void getTime(long int *sec, long int *usec)
Get time from velocity.
virtual void setPanTilt(float pan, float tilt)
Set pan and tilt.
virtual coordsys_type_t getCoordinateSystem()
Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or COORDSYS_ROBOT_WORLD.
virtual void reset()
Reset velocity model Must be called if ball is not visible at any time.
virtual void calc()
Calculate velocity values from given data This method must be called after all relevent data (set*) h...
virtual ~VelocityFromRelative()
Destructor.
virtual void setRobotVelocity(float vel_x, float vel_y, timeval t)
Set robot velocity.