Relative Position Model Interface. More...
#include <models/relative_position/relativepositionmodel.h>

Public Member Functions | |
| virtual | ~RelativePositionModel () |
| Destructor. | |
| virtual const char * | get_name (void) const =0 |
| Get name of relative position model. | |
| virtual void | set_radius (float r)=0 |
| Set radius of a found circle. | |
| virtual void | set_center (float x, float y)=0 |
| Set center of a found circle. | |
| virtual void | set_center (const center_in_roi_t &c)=0 |
| Set center of a found circle. | |
| virtual void | set_pan_tilt (float pan, float tilt)=0 |
| Set camera pan and tilt. | |
| virtual void | get_pan_tilt (float *pan, float *tilt) const =0 |
| Get camera pan tilt. | |
| virtual void | set_cam_rotation (float pan, float tilt, float roll=0.f) |
| Sets the camera orientation. | |
| virtual void | get_cam_rotation (float &pan, float &tilt, float &roll) const |
| Returns the camera orientation. | |
| virtual void | set_cam_translation (float height, float rel_x=0.f, float rel_y=0.f) |
| Sets the current translation of the camera. | |
| virtual void | get_cam_translation (float &height, float &rel_x, float &rel_y) const |
| Returns the current translation of the camera. | |
| virtual void | calc ()=0 |
| Calculate position data. | |
| virtual void | calc_unfiltered ()=0 |
| Calculate data unfiltered. | |
| virtual void | reset ()=0 |
| Reset all data. | |
| virtual float | get_distance () const =0 |
| Get distance to object. | |
| virtual float | get_bearing () const =0 |
| Get bearing (horizontal angle) to object. | |
| virtual float | get_slope () const =0 |
| Get slope (vertical angle) to object. | |
| virtual float | get_x () const =0 |
| Get relative X coordinate of object. | |
| virtual float | get_y () const =0 |
| Get relative Y coordinate of object. | |
| virtual bool | is_pos_valid () const =0 |
| Check if position is valid. | |
Relative Position Model Interface.
This interfaces defines a relative position model.
Definition at line 35 of file relativepositionmodel.h.
| firevision::RelativePositionModel::~RelativePositionModel | ( | ) | [virtual] |
Destructor.
Definition at line 108 of file relativepositionmodel.cpp.
| void firevision::RelativePositionModel::calc | ( | ) | [pure virtual] |
Calculate position data.
Call this method if all relevant data (set(Radius|Center|PanTilt)) has been set, after this valid data can be retrieved via get*
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
| void firevision::RelativePositionModel::calc_unfiltered | ( | ) | [pure virtual] |
Calculate data unfiltered.
Same as calc(), but without any filtering (i.e. no Kalman filter).
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
| float firevision::RelativePositionModel::get_bearing | ( | void | ) | const [pure virtual] |
Get bearing (horizontal angle) to object.
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
Referenced by firevision::CameraTracker::calc().
| void firevision::RelativePositionModel::get_cam_rotation | ( | float & | pan, | |
| float & | tilt, | |||
| float & | roll | |||
| ) | const [virtual] |
Returns the camera orientation.
| pan | pan value (rad) | |
| tilt | tilt value (rad) | |
| roll | roll value (rad) |
Reimplemented in firevision::BackProjectionPositionModel.
Definition at line 128 of file relativepositionmodel.cpp.
References get_pan_tilt().
| void firevision::RelativePositionModel::get_cam_translation | ( | float & | height, | |
| float & | rel_x, | |||
| float & | rel_y | |||
| ) | const [virtual] |
Returns the current translation of the camera.
| height | height of the camera [m] | |
| rel_x | distance to the center of the robot [m] | |
| rel_y | distance to the center of the robot [m] |
Reimplemented in firevision::BackProjectionPositionModel.
Definition at line 150 of file relativepositionmodel.cpp.
| float firevision::RelativePositionModel::get_distance | ( | ) | const [pure virtual] |
Get distance to object.
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
Referenced by firevision::VelocityFromRelative::calc(), and firevision::VelocityGlobalFromRelative::calc().
| const char * firevision::RelativePositionModel::get_name | ( | void | ) | const [pure virtual] |
Get name of relative position model.
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
| void firevision::RelativePositionModel::get_pan_tilt | ( | float * | pan, | |
| float * | tilt | |||
| ) | const [pure virtual] |
Get camera pan tilt.
| pan | contains pan value (rad) upon return | |
| tilt | contains tilt value (rad) upon return |
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
Referenced by get_cam_rotation().
| float firevision::RelativePositionModel::get_slope | ( | ) | const [pure virtual] |
Get slope (vertical angle) to object.
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
Referenced by firevision::CameraTracker::calc().
| float firevision::RelativePositionModel::get_x | ( | void | ) | const [pure virtual] |
Get relative X coordinate of object.
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
Referenced by firevision::VelocityFromRelative::calc(), firevision::GlobalFromRelativePos::get_x(), and firevision::GlobalFromRelativePos::get_y().
| float firevision::RelativePositionModel::get_y | ( | void | ) | const [pure virtual] |
Get relative Y coordinate of object.
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
Referenced by firevision::VelocityFromRelative::calc(), firevision::GlobalFromRelativePos::get_x(), and firevision::GlobalFromRelativePos::get_y().
| bool firevision::RelativePositionModel::is_pos_valid | ( | ) | const [pure virtual] |
Check if position is valid.
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
Referenced by firevision::GlobalFromRelativePos::is_pos_valid().
| void firevision::RelativePositionModel::reset | ( | ) | [pure virtual] |
Reset all data.
This must be called if the object is not visible.
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
| void firevision::RelativePositionModel::set_cam_rotation | ( | float | pan, | |
| float | tilt, | |||
| float | roll = 0.f | |||
| ) | [virtual] |
Sets the camera orientation.
| pan | pan value (rad) | |
| tilt | tilt value (rad) | |
| roll | roll value (rad) |
Reimplemented in firevision::BackProjectionPositionModel.
Definition at line 118 of file relativepositionmodel.cpp.
| void firevision::RelativePositionModel::set_cam_translation | ( | float | height, | |
| float | rel_x = 0.f, |
|||
| float | rel_y = 0.f | |||
| ) | [virtual] |
Sets the current translation of the camera.
| height | height of the camera [m] | |
| rel_x | distance to the center of the robot [m] | |
| rel_y | distance to the center of the robot [m] |
Reimplemented in firevision::BackProjectionPositionModel.
Definition at line 140 of file relativepositionmodel.cpp.
| void firevision::RelativePositionModel::set_center | ( | const center_in_roi_t & | c | ) | [pure virtual] |
Set center of a found circle.
This is especially used for ball position implementations.
| c | center |
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
| void firevision::RelativePositionModel::set_center | ( | float | x, | |
| float | y | |||
| ) | [pure virtual] |
Set center of a found circle.
This is especially used for ball position implementations.
| x | x position in image (pixels) | |
| y | y position in image (pixels) |
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
| void firevision::RelativePositionModel::set_pan_tilt | ( | float | pan, | |
| float | tilt | |||
| ) | [pure virtual] |
Set camera pan and tilt.
| pan | pan value (rad) | |
| tilt | tilt value (rad) |
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
| void firevision::RelativePositionModel::set_radius | ( | float | r | ) | [pure virtual] |
Set radius of a found circle.
This is especially used for ball position implementations.
| r | radius |
Implemented in firevision::BackProjectionPositionModel, firevision::BallTrigoRelativePos, firevision::BoxRelative, firevision::FrontBallRelativePos, and firevision::OmniRelative.
1.6.1