25#ifndef _FIREVISION_MODELS_VELOCITY_RELATIVE_H_
26#define _FIREVISION_MODELS_VELOCITY_RELATIVE_H_
28#include <fvmodels/relative_position/relativepositionmodel.h>
29#include <fvmodels/velocity/velocitymodel.h>
30#include <fvutils/base/types.h>
57 unsigned int max_history_length,
58 unsigned int calc_interval);
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;
Relative Position Model Interface.
Calculate velocity from relative positions.
virtual void setPanTilt(float pan, float tilt)
Set pan and tilt.
virtual void reset()
Reset velocity model Must be called if ball is not visible at any time.
virtual void setRobotVelocity(float vel_x, float vel_y, timeval t)
Set robot velocity.
virtual coordsys_type_t getCoordinateSystem()
Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or COORDSYS_ROBOT_WORLD.
virtual void setRobotPosition(float x, float y, float ori, timeval t)
Set robot position.
virtual void setTime(timeval t)
Set current time.
virtual float getVelocityX()
Get velocity of tracked object in X direction.
virtual ~VelocityFromRelative()
Destructor.
VelocityFromRelative(RelativePositionModel *model, unsigned int max_history_length, unsigned int calc_interval)
Constructor.
virtual void getVelocity(float *vel_x, float *vel_y)
Method to retrieve velocity information.
virtual void getTime(long int *sec, long int *usec)
Get time from velocity.
virtual float getVelocityY()
Get velocity of tracked object in X direction.
virtual void calc()
Calculate velocity values from given data This method must be called after all relevent data (set*) h...
virtual const char * getName() const
Get name of velocity model.
virtual void setTimeNow()
Get current time from system.
Velocity model interface.