GlobalFromRelativePos Class Reference
Calculate global ball position based on a relative position model. More...
#include <models/global_position/globfromrel.h>

Public Member Functions | |
| GlobalFromRelativePos (RelativePositionModel *model) | |
| Constructor. | |
| virtual void | set_robot_position (float x, float y, float ori) |
| Set the global position of the object. | |
| virtual void | set_position_in_image (unsigned int x, unsigned int y) |
| Set the position of the object as recognized in the image. | |
| virtual float | get_x (void) const |
| Get global x coordinate of object. | |
| virtual float | get_y (void) const |
| Get global y coordinate of object. | |
| virtual void | calc () |
| Calculate position. | |
| virtual bool | is_pos_valid () const |
| Check if the position is valid. | |
Detailed Description
Calculate global ball position based on a relative position model.The relative position model must of course be tied to the ball.
Definition at line 33 of file globfromrel.h.
Constructor & Destructor Documentation
| GlobalFromRelativePos::GlobalFromRelativePos | ( | RelativePositionModel * | model | ) |
Constructor.
- Parameters:
-
model relative position model for the ball.
Definition at line 38 of file globfromrel.cpp.
Member Function Documentation
| void GlobalFromRelativePos::calc | ( | ) | [virtual] |
Calculate position.
From the data set via setRobotPosition() or setPositionInImage() calculate the objects global position.
Implements GlobalPositionModel.
Definition at line 63 of file globfromrel.cpp.
| float GlobalFromRelativePos::get_x | ( | void | ) | const [virtual] |
Get global x coordinate of object.
- Returns:
- x coordinate of object
Implements GlobalPositionModel.
Definition at line 76 of file globfromrel.cpp.
References RelativePositionModel::get_x(), and RelativePositionModel::get_y().
| float GlobalFromRelativePos::get_y | ( | void | ) | const [virtual] |
Get global y coordinate of object.
- Returns:
- y coordinate of object
Implements GlobalPositionModel.
Definition at line 98 of file globfromrel.cpp.
References RelativePositionModel::get_x(), and RelativePositionModel::get_y().
| bool GlobalFromRelativePos::is_pos_valid | ( | ) | const [virtual] |
Check if the position is valid.
- Returns:
- true, if the calculated position is valid, false otherwise
Implements GlobalPositionModel.
Definition at line 69 of file globfromrel.cpp.
References RelativePositionModel::is_pos_valid().
| void GlobalFromRelativePos::set_position_in_image | ( | unsigned int | x, | |
| unsigned int | y | |||
| ) | [virtual] |
Set the position of the object as recognized in the image.
- Parameters:
-
x x coordinate in pixels y y coordinate in pixels
Implements GlobalPositionModel.
Definition at line 57 of file globfromrel.cpp.
| void GlobalFromRelativePos::set_robot_position | ( | float | x, | |
| float | y, | |||
| float | ori | |||
| ) | [virtual] |
Set the global position of the object.
- Parameters:
-
x x coordinate of position y y coordinate of position ori orientation of robot
Implements GlobalPositionModel.
Definition at line 48 of file globfromrel.cpp.
The documentation for this class was generated from the following files:
- src/firevision/models/global_position/globfromrel.h
- src/firevision/models/global_position/globfromrel.cpp

