Fawkes API
Fawkes Development Version
|
Velocity from global positions. More...
#include <>>
Public Member Functions | |
VelocityFromGlobal (GlobalPositionModel *model, unsigned int history_length, unsigned int calc_interval) | |
Constructor. More... | |
virtual | ~VelocityFromGlobal () |
Destructor. More... | |
virtual const char * | getName () const |
Get name of velocity model. More... | |
virtual void | setRobotPosition (float x, float y, float ori, timeval t) |
Set robot position. More... | |
virtual void | setRobotVelocity (float vel_x, float vel_y, timeval t) |
Set robot velocity. More... | |
virtual void | setPanTilt (float pan, float tilt) |
Set pan and tilt. More... | |
virtual void | setTime (timeval t) |
Set current time. More... | |
virtual void | setTimeNow () |
Get current time from system. More... | |
virtual void | getTime (long int *sec, long int *usec) |
Get time from velocity. More... | |
virtual void | getVelocity (float *vel_x, float *vel_y) |
Method to retrieve velocity information. More... | |
virtual float | getVelocityX () |
Get velocity of tracked object in X direction. More... | |
virtual float | getVelocityY () |
Get velocity of tracked object in X direction. More... | |
virtual void | calc () |
Calculate velocity values from given data This method must be called after all relevent data (set*) has been set. More... | |
virtual void | reset () |
Reset velocity model Must be called if ball is not visible at any time. More... | |
virtual coordsys_type_t | getCoordinateSystem () |
Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or COORDSYS_ROBOT_WORLD. More... | |
![]() | |
virtual | ~VelocityModel () |
Virtual empty destructor. More... | |
Velocity from global positions.
Definition at line 40 of file globvelo.h.
firevision::VelocityFromGlobal::VelocityFromGlobal | ( | GlobalPositionModel * | model, |
unsigned int | history_length, | ||
unsigned int | calc_interval | ||
) |
Constructor.
model | global position model |
history_length | maximum history length |
calc_interval | calculation interval |
Definition at line 44 of file globvelo.cpp.
|
virtual |
Destructor.
Definition at line 80 of file globvelo.cpp.
|
virtual |
Calculate velocity values from given data This method must be called after all relevent data (set*) has been set.
After calc() the velocity values can be retrieved
Implements firevision::VelocityModel.
Definition at line 160 of file globvelo.cpp.
References firevision::GlobalPositionModel::get_x(), and firevision::GlobalPositionModel::get_y().
|
virtual |
Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or COORDSYS_ROBOT_WORLD.
ROBOT denotes velocities relative to the robot (which can be tramsformed to global velocities by: glob_vel_x = rel_vel_x * cos( robot_ori ) - rel_vel_y * sin( robot_ori ) WORLD denotes velocities in the robot coordinate system glob_vel_y = rel_vel_x * sin( robot_ori ) + rel_vel_y * cos( robot_ori )
ROBOT denotes velocities relative to the robot (which can be tramsformed to global velocities by: glob_vel_x = rel_vel_x * cos( robot_ori ) - rel_vel_y * sin( robot_ori ) WORLD denotes velocities in the robot coordinate system glob_vel_y = rel_vel_x * sin( robot_ori ) + rel_vel_y * cos( robot_ori )
Implements firevision::VelocityModel.
Definition at line 227 of file globvelo.cpp.
|
virtual |
Get name of velocity model.
Implements firevision::VelocityModel.
Definition at line 220 of file globvelo.cpp.
|
virtual |
Get time from velocity.
sec | contains seconds since the epoch upon return (Unix timestamp) |
usec | contains microseconds upon return |
Implements firevision::VelocityModel.
Definition at line 125 of file globvelo.cpp.
|
virtual |
Method to retrieve velocity information.
vel_x | If not NULL contains velocity in X direction after call |
vel_y | If not NULL contains velocity in Y direction after call |
Implements firevision::VelocityModel.
Definition at line 133 of file globvelo.cpp.
|
virtual |
Get velocity of tracked object in X direction.
Implements firevision::VelocityModel.
Definition at line 145 of file globvelo.cpp.
|
virtual |
Get velocity of tracked object in X direction.
Implements firevision::VelocityModel.
Definition at line 152 of file globvelo.cpp.
|
virtual |
Reset velocity model Must be called if ball is not visible at any time.
Implements firevision::VelocityModel.
Definition at line 213 of file globvelo.cpp.
|
virtual |
Set pan and tilt.
pan | pan |
tilt | tilt |
Implements firevision::VelocityModel.
Definition at line 86 of file globvelo.cpp.
|
virtual |
Set robot position.
x | x |
y | y |
ori | ori |
t | timestamp of the pose information |
Implements firevision::VelocityModel.
Definition at line 92 of file globvelo.cpp.
References fawkes::time_diff_sec().
|
virtual |
Set robot velocity.
vel_x | robot velocity in x direction |
vel_y | robot velocity in y direction |
t | timestamp of the velocity information |
Implements firevision::VelocityModel.
Definition at line 104 of file globvelo.cpp.
|
virtual |
Set current time.
t | time |
Implements firevision::VelocityModel.
Definition at line 110 of file globvelo.cpp.
|
virtual |
Get current time from system.
Implements firevision::VelocityModel.
Definition at line 118 of file globvelo.cpp.