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