VelocityFromGlobal Class Reference
Velocity from global positions. More...
#include <models/velocity/globvelo.h>

Public Member Functions | |
| VelocityFromGlobal (GlobalPositionModel *model, unsigned int history_length, unsigned int calc_interval) | |
| Constructor. | |
| virtual | ~VelocityFromGlobal () |
| Destructor. | |
| virtual const char * | getName () const |
| Get name of velocity model. | |
| virtual void | setRobotPosition (float x, float y, float ori, timeval t) |
| Set robot position. | |
| virtual void | setRobotVelocity (float vel_x, float vel_y, timeval t) |
| Set robot velocity. | |
| virtual void | setPanTilt (float pan, float tilt) |
| Set pan and tilt. | |
| virtual void | setTime (timeval t) |
| Set current time. | |
| virtual void | setTimeNow () |
| Get current time from system. | |
| virtual void | getTime (long int *sec, long int *usec) |
| Get time from velocity. | |
| virtual void | getVelocity (float *vel_x, float *vel_y) |
| Method to retrieve velocity information. | |
| virtual float | getVelocityX () |
| Get velocity of tracked object in X direction. | |
| 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*) has been set. | |
| virtual void | reset () |
| Reset velocity model Must be called if ball is not visible at any time. | |
| virtual coordsys_type_t | getCoordinateSystem () |
| Returns the used coordinate system, must be either COORDSYS_ROBOT_CART or COORDSYS_ROBOT_WORLD. | |
Detailed Description
Velocity from global positions.Definition at line 36 of file globvelo.h.
Constructor & Destructor Documentation
| VelocityFromGlobal::VelocityFromGlobal | ( | GlobalPositionModel * | model, | |
| unsigned int | history_length, | |||
| unsigned int | calc_interval | |||
| ) |
Constructor.
- Parameters:
-
model global position model history_length maximum history length calc_interval calculation interval
Definition at line 39 of file globvelo.cpp.
| VelocityFromGlobal::~VelocityFromGlobal | ( | ) | [virtual] |
Member Function Documentation
| void VelocityFromGlobal::calc | ( | ) | [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 VelocityModel.
Definition at line 155 of file globvelo.cpp.
References GlobalPositionModel::get_x(), and GlobalPositionModel::get_y().
| coordsys_type_t VelocityFromGlobal::getCoordinateSystem | ( | ) | [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 )
Implements VelocityModel.
Definition at line 222 of file globvelo.cpp.
| const char * VelocityFromGlobal::getName | ( | void | ) | const [virtual] |
Get name of velocity model.
- Returns:
- name of velocity model
Implements VelocityModel.
Definition at line 215 of file globvelo.cpp.
| void VelocityFromGlobal::getTime | ( | long int * | sec, | |
| long int * | usec | |||
| ) | [virtual] |
Get time from velocity.
- Parameters:
-
sec contains seconds since the epoch upon return (Unix timestamp) usec contains microseconds upon return
Implements VelocityModel.
Definition at line 120 of file globvelo.cpp.
| void VelocityFromGlobal::getVelocity | ( | float * | vel_x, | |
| float * | vel_y | |||
| ) | [virtual] |
Method to retrieve velocity information.
- Parameters:
-
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 VelocityModel.
Definition at line 128 of file globvelo.cpp.
| float VelocityFromGlobal::getVelocityX | ( | ) | [virtual] |
Get velocity of tracked object in X direction.
- Returns:
- velocity in m/s.
Implements VelocityModel.
Definition at line 140 of file globvelo.cpp.
| float VelocityFromGlobal::getVelocityY | ( | ) | [virtual] |
Get velocity of tracked object in X direction.
- Returns:
- velocity in m/s.
Implements VelocityModel.
Definition at line 147 of file globvelo.cpp.
| void VelocityFromGlobal::reset | ( | void | ) | [virtual] |
Reset velocity model Must be called if ball is not visible at any time.
Implements VelocityModel.
Definition at line 208 of file globvelo.cpp.
| void VelocityFromGlobal::setPanTilt | ( | float | pan, | |
| float | tilt | |||
| ) | [virtual] |
Set pan and tilt.
- Parameters:
-
pan pan tilt tilt
Implements VelocityModel.
Definition at line 81 of file globvelo.cpp.
| void VelocityFromGlobal::setRobotPosition | ( | float | x, | |
| float | y, | |||
| float | ori, | |||
| timeval | t | |||
| ) | [virtual] |
Set robot position.
- Parameters:
-
x x y y ori ori t timestamp of the pose information
Implements VelocityModel.
Definition at line 87 of file globvelo.cpp.
References fawkes::time_diff_sec().
| void VelocityFromGlobal::setRobotVelocity | ( | float | vel_x, | |
| float | vel_y, | |||
| timeval | t | |||
| ) | [virtual] |
Set robot velocity.
- Parameters:
-
vel_x robot velocity in x direction vel_y robot velocity in y direction t timestamp of the velocity information
Implements VelocityModel.
Definition at line 99 of file globvelo.cpp.
| void VelocityFromGlobal::setTime | ( | timeval | t | ) | [virtual] |
Set current time.
- Parameters:
-
t time
Implements VelocityModel.
Definition at line 105 of file globvelo.cpp.
| void VelocityFromGlobal::setTimeNow | ( | ) | [virtual] |
Get current time from system.
Implements VelocityModel.
Definition at line 113 of file globvelo.cpp.
The documentation for this class was generated from the following files:
- src/firevision/models/velocity/globvelo.h
- src/firevision/models/velocity/globvelo.cpp

