latest version v1.9 - last update 10 Apr 2010 |
Parent class for all pan tilt units. More...
#include <ltiPanTiltUnit.h>
Classes | |
class | parameters |
the parameters for the class panTiltUnit More... | |
Public Member Functions | |
panTiltUnit () | |
panTiltUnit (const parameters &par) | |
panTiltUnit (const panTiltUnit &other) | |
virtual | ~panTiltUnit () |
virtual const char * | getTypeName () const |
panTiltUnit & | copy (const panTiltUnit &other) |
panTiltUnit & | operator= (const panTiltUnit &other) |
virtual functor * | clone () const =0 |
const parameters & | getParameters () const |
virtual bool | reset ()=0 |
virtual bool | stopPanTilt ()=0 |
virtual bool | setPanTilt (float pan, float tilt)=0 |
bool | setPanTilt (const tpoint< float > &pos) |
virtual bool | setPan (float pan)=0 |
virtual bool | setTilt (float tilt)=0 |
virtual bool | getPanTilt (float &pan, float &tilt) const =0 |
tpoint< float > | getPanTilt () const |
virtual float | getPan () const =0 |
virtual float | getTilt () const =0 |
virtual bool | getMinPanTilt (float &minPan, float &minTilt) const |
tpoint< float > | getMinPanTilt () const |
virtual bool | getMaxPanTilt (float &maxPan, float &maxTilt) const |
tpoint< float > | getMaxPanTilt () const |
virtual float | getMinPan () const |
virtual float | getMaxPan () const |
virtual float | getMinTilt () const |
virtual float | getMaxTilt () const |
Parent class for all pan tilt units.
Inherited classes should use the parameter angleFormat to allow passing the pan and tilt values in either degrees or radians. Please add all values (which can be set) as parameters to allow construction with application specific settings. During operation, value settings using a specific method is more efficient as by setParameters. Pan tilt constants, e.g. the max. pan and tilt, should be defined as constant static parameters.
Please note that the camera may take a little while until a pan or tilt position is reached. Thus the values in the parameters and those returned by the get-methods may differ.
The parameter functionality was reimplemented, following the functor's concept, because of a problem with multiple inheritance, which occures when deriving classed which are both a camera and a panTiltUnit.
lti::panTiltUnit::panTiltUnit | ( | ) |
default constructor
lti::panTiltUnit::panTiltUnit | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::panTiltUnit::panTiltUnit | ( | const panTiltUnit & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::panTiltUnit::~panTiltUnit | ( | ) | [virtual] |
destructor
virtual functor* lti::panTiltUnit::clone | ( | ) | const [pure virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
panTiltUnit& lti::panTiltUnit::copy | ( | const panTiltUnit & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
Reimplemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
virtual float lti::panTiltUnit::getMaxPan | ( | ) | const [virtual] |
tpoint<float> lti::panTiltUnit::getMaxPanTilt | ( | ) | const [inline] |
References lti::tpoint< T >::x, and lti::tpoint< T >::y.
virtual bool lti::panTiltUnit::getMaxPanTilt | ( | float & | maxPan, | |
float & | maxTilt | |||
) | const [virtual] |
get the max.
supported pan and tilt positions as specified by angleFormat
maxPan | the max. pan position | |
maxTilt | the max. tilt position |
virtual float lti::panTiltUnit::getMaxTilt | ( | ) | const [virtual] |
virtual float lti::panTiltUnit::getMinPan | ( | ) | const [virtual] |
tpoint<float> lti::panTiltUnit::getMinPanTilt | ( | ) | const [inline] |
References lti::tpoint< T >::x, and lti::tpoint< T >::y.
virtual bool lti::panTiltUnit::getMinPanTilt | ( | float & | minPan, | |
float & | minTilt | |||
) | const [virtual] |
get the min.
supported pan and tilt positions as specified by angleFormat
minPan | the min. pan position | |
minTilt | the min. tilt position |
virtual float lti::panTiltUnit::getMinTilt | ( | ) | const [virtual] |
virtual float lti::panTiltUnit::getPan | ( | ) | const [pure virtual] |
Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
tpoint<float> lti::panTiltUnit::getPanTilt | ( | ) | const [inline] |
get the current pan and tilt position.
The combined get-method guarantees pan and tilt positions of the same time instant.
References lti::tpoint< T >::x, and lti::tpoint< T >::y.
virtual bool lti::panTiltUnit::getPanTilt | ( | float & | pan, | |
float & | tilt | |||
) | const [pure virtual] |
get the current pan and tilt position.
The combined get-methods guarantee pan and tilt positions of the same time instant.
pan | the pan position which the device is in | |
tilt | the tilt position which the device is in |
Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
const parameters& lti::panTiltUnit::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::functor.
Reimplemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
virtual float lti::panTiltUnit::getTilt | ( | ) | const [pure virtual] |
Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
virtual const char* lti::panTiltUnit::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("panTiltUnit")
Reimplemented from lti::functor.
Reimplemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
panTiltUnit& lti::panTiltUnit::operator= | ( | const panTiltUnit & | other | ) |
alias for copy member
other | the functor to be copied |
Reimplemented from lti::functor.
Reimplemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
virtual bool lti::panTiltUnit::reset | ( | ) | [pure virtual] |
Reset the pan tilt device.
This method resets internal pan and tilt registers. Some devices need resets from time to time to avoid accumulation errors. After succesfull execution the pan tilt unit should be in the same position as before the call. During execution the pan tilt unit may move.
Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
virtual bool lti::panTiltUnit::setPan | ( | float | pan | ) | [pure virtual] |
set the pan position
pan | the pan position the device will move to |
Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
bool lti::panTiltUnit::setPanTilt | ( | const tpoint< float > & | pos | ) | [inline] |
set the pan and tilt position.
Usually pan and tilt are sent to the device in a single package.
pos | the pan tilt position the device will move to |
References setPanTilt(), lti::tpoint< T >::x, and lti::tpoint< T >::y.
virtual bool lti::panTiltUnit::setPanTilt | ( | float | pan, | |
float | tilt | |||
) | [pure virtual] |
set the pan and tilt position.
Usually pan and tilt are sent to the device in a single package.
pan | the pan position the device will move to | |
tilt | the pan position the device will move to |
Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
Referenced by setPanTilt().
virtual bool lti::panTiltUnit::setTilt | ( | float | tilt | ) | [pure virtual] |
set the tilt position
tilt | the pan position the device will move to |
Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.
virtual bool lti::panTiltUnit::stopPanTilt | ( | ) | [pure virtual] |
stop the movement
Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.