Fawkes API
Fawkes Development Version
|
Relative Position Model Interface. More...
#include <>>
Public Member Functions | |
virtual | ~RelativePositionModel () |
Destructor. More... | |
virtual const char * | get_name (void) const =0 |
Get name of relative position model. More... | |
virtual void | set_radius (float r)=0 |
Set radius of a found circle. More... | |
virtual void | set_center (float x, float y)=0 |
Set center of a found circle. More... | |
virtual void | set_center (const center_in_roi_t &c)=0 |
Set center of a found circle. More... | |
virtual void | set_pan_tilt (float pan, float tilt)=0 |
Set camera pan and tilt. More... | |
virtual void | get_pan_tilt (float *pan, float *tilt) const =0 |
Get camera pan tilt. More... | |
virtual void | set_cam_rotation (float pan, float tilt, float roll=0.f) |
Sets the camera orientation. More... | |
virtual void | get_cam_rotation (float &pan, float &tilt, float &roll) const |
Returns the camera orientation. More... | |
virtual void | set_cam_translation (float height, float rel_x=0.f, float rel_y=0.f) |
Sets the current translation of the camera. More... | |
virtual void | get_cam_translation (float &height, float &rel_x, float &rel_y) const |
Returns the current translation of the camera. More... | |
virtual void | calc ()=0 |
Calculate position data. More... | |
virtual void | calc_unfiltered ()=0 |
Calculate data unfiltered. More... | |
virtual void | reset ()=0 |
Reset all data. More... | |
virtual float | get_distance () const =0 |
Get distance to object. More... | |
virtual float | get_bearing () const =0 |
Get bearing (horizontal angle) to object. More... | |
virtual float | get_slope () const =0 |
Get slope (vertical angle) to object. More... | |
virtual float | get_x () const =0 |
Get relative X coordinate of object. More... | |
virtual float | get_y () const =0 |
Get relative Y coordinate of object. More... | |
virtual bool | is_pos_valid () const =0 |
Check if position is valid. More... | |
Relative Position Model Interface.
This interfaces defines a relative position model.
Definition at line 35 of file relativepositionmodel.h.
|
virtual |
Destructor.
Definition at line 108 of file relativepositionmodel.cpp.
|
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::FrontBallRelativePos, firevision::BoxRelative, firevision::BallTrigoRelativePos, and firevision::OmniRelative.
|
pure virtual |
Calculate data unfiltered.
Same as calc(), but without any filtering (i.e. no Kalman filter).
Implemented in firevision::FrontBallRelativePos, firevision::BoxRelative, firevision::BallTrigoRelativePos, and firevision::OmniRelative.
|
pure virtual |
Get bearing (horizontal angle) to object.
Implemented in firevision::FrontBallRelativePos, firevision::BoxRelative, firevision::BallTrigoRelativePos, and firevision::OmniRelative.
Referenced by firevision::CameraTracker::calc().
|
virtual |
Returns the camera orientation.
pan | pan value (rad) |
tilt | tilt value (rad) |
roll | roll value (rad) |
Definition at line 128 of file relativepositionmodel.cpp.
References get_pan_tilt().
|
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] |
Definition at line 150 of file relativepositionmodel.cpp.
|
pure virtual |
Get distance to object.
Implemented in firevision::FrontBallRelativePos, firevision::BoxRelative, firevision::BallTrigoRelativePos, and firevision::OmniRelative.
|
pure virtual |
Get name of relative position model.
Implemented in firevision::FrontBallRelativePos, firevision::BallTrigoRelativePos, firevision::BoxRelative, and firevision::OmniRelative.
|
pure virtual |
Get camera pan tilt.
pan | contains pan value (rad) upon return |
tilt | contains tilt value (rad) upon return |
Implemented in firevision::FrontBallRelativePos, firevision::BallTrigoRelativePos, firevision::BoxRelative, and firevision::OmniRelative.
Referenced by get_cam_rotation().
|
pure virtual |
Get slope (vertical angle) to object.
Implemented in firevision::FrontBallRelativePos, firevision::BoxRelative, firevision::BallTrigoRelativePos, and firevision::OmniRelative.
Referenced by firevision::CameraTracker::calc().
|
pure virtual |
Get relative X coordinate of object.
Implemented in firevision::FrontBallRelativePos, firevision::BoxRelative, firevision::BallTrigoRelativePos, and firevision::OmniRelative.
Referenced by firevision::GlobalFromRelativePos::get_x(), and firevision::GlobalFromRelativePos::get_y().
|
pure virtual |
Get relative Y coordinate of object.
Implemented in firevision::FrontBallRelativePos, firevision::BoxRelative, firevision::BallTrigoRelativePos, and firevision::OmniRelative.
Referenced by firevision::GlobalFromRelativePos::get_x(), and firevision::GlobalFromRelativePos::get_y().
|
pure virtual |
Check if position is valid.
Implemented in firevision::FrontBallRelativePos, firevision::BoxRelative, firevision::BallTrigoRelativePos, and firevision::OmniRelative.
Referenced by firevision::GlobalFromRelativePos::is_pos_valid().
|
pure virtual |
Reset all data.
This must be called if the object is not visible.
Implemented in firevision::FrontBallRelativePos, firevision::BoxRelative, firevision::BallTrigoRelativePos, and firevision::OmniRelative.
|
virtual |
Sets the camera orientation.
pan | pan value (rad) |
tilt | tilt value (rad) |
roll | roll value (rad) |
Definition at line 118 of file relativepositionmodel.cpp.
|
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] |
Definition at line 140 of file relativepositionmodel.cpp.
|
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::FrontBallRelativePos, firevision::BallTrigoRelativePos, firevision::BoxRelative, and firevision::OmniRelative.
|
pure virtual |
Set center of a found circle.
This is especially used for ball position implementations.
c | center |
Implemented in firevision::FrontBallRelativePos, firevision::BallTrigoRelativePos, firevision::BoxRelative, and firevision::OmniRelative.
|
pure virtual |
Set camera pan and tilt.
pan | pan value (rad) |
tilt | tilt value (rad) |
Implemented in firevision::FrontBallRelativePos, firevision::BallTrigoRelativePos, firevision::BoxRelative, and firevision::OmniRelative.
|
pure virtual |
Set radius of a found circle.
This is especially used for ball position implementations.
r | radius |
Implemented in firevision::FrontBallRelativePos, firevision::BoxRelative, firevision::BallTrigoRelativePos, and firevision::OmniRelative.