LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::panTiltUnit Class Reference

Parent class for all pan tilt units. More...

#include <ltiPanTiltUnit.h>

Inheritance diagram for lti::panTiltUnit:
Inheritance graph
[legend]
Collaboration diagram for lti::panTiltUnit:
Collaboration graph
[legend]

List of all members.

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
panTiltUnitcopy (const panTiltUnit &other)
panTiltUnitoperator= (const panTiltUnit &other)
virtual functorclone () const =0
const parametersgetParameters () 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

Detailed Description

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.


Constructor & Destructor Documentation

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

Parameters:
other the object to be copied
virtual lti::panTiltUnit::~panTiltUnit (  )  [virtual]

destructor


Member Function Documentation

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.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

Reimplemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.

virtual float lti::panTiltUnit::getMaxPan (  )  const [virtual]
Returns:
the max. supported pan position as specified by angleFormat
tpoint<float> lti::panTiltUnit::getMaxPanTilt (  )  const [inline]
Returns:
the max. supported pan and tilt positions as specified by angleFormat

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

Parameters:
maxPan the max. pan position
maxTilt the max. tilt position
Returns:
true on success
virtual float lti::panTiltUnit::getMaxTilt (  )  const [virtual]
Returns:
the max. supported tilt position as specified by angleFormat
virtual float lti::panTiltUnit::getMinPan (  )  const [virtual]
Returns:
the min. supported pan position as specified by angleFormat
tpoint<float> lti::panTiltUnit::getMinPanTilt (  )  const [inline]
Returns:
the min. supported pan and tilt positions as specified by angleFormat

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

Parameters:
minPan the min. pan position
minTilt the min. tilt position
Returns:
true on success
virtual float lti::panTiltUnit::getMinTilt (  )  const [virtual]
Returns:
the min. supported tilt position as specified by angleFormat
virtual float lti::panTiltUnit::getPan (  )  const [pure virtual]
Returns:
the current pan position

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.

Returns:
the current pan and tilt position

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.

Parameters:
pan the pan position which the device is in
tilt the tilt position which the device is in
Returns:
true on success

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]
Returns:
the current tilt position

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

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

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.

Returns:
true on success

Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.

virtual bool lti::panTiltUnit::setPan ( float  pan  )  [pure virtual]

set the pan position

Parameters:
pan the pan position the device will move to
Returns:
true on success

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.

Parameters:
pos the pan tilt position the device will move to
Returns:
true on success

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.

Parameters:
pan the pan position the device will move to
tilt the pan position the device will move to
Returns:
true on success

Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.

Referenced by setPanTilt().

virtual bool lti::panTiltUnit::setTilt ( float  tilt  )  [pure virtual]

set the tilt position

Parameters:
tilt the pan position the device will move to
Returns:
true on success

Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.

virtual bool lti::panTiltUnit::stopPanTilt (  )  [pure virtual]

stop the movement

Returns:
true on success

Implemented in lti::directedPerceptionPTU, and lti::sonyEviD100P.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:28:06 2010 for LTI-Lib by Doxygen 1.6.1