Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::PanTiltControlInterface Class Referenceabstract

abstract control class for control of Directed Perception Pan Tilt Unit. More...

#include <PanTilt/PanTiltControlInterface.hh>

+ Inheritance diagram for BIAS::PanTiltControlInterface:
+ Collaboration diagram for BIAS::PanTiltControlInterface:

Public Member Functions

void AwaitCompletion ()
 Waits until the current command is completed. More...
 
 PanTiltControlInterface (std::string device, bool heavyDutyMode)
 Initialize PTU, called by derived classes. More...
 
virtual void ResumeControl ()=0
 Resumes control. More...
 
void SetPosition (long int pan, long int tilt, bool waitComplete=true)
 Set the position to move to. More...
 
virtual void StartControl ()=0
 Starts controlling the PTU. More...
 
virtual void StartMoveTo (const long int pan, const long int tilt)
 Starts movement to given pan and tilt position. More...
 
virtual void StopControl ()=0
 Stops/pauses control. More...
 
virtual ~PanTiltControlInterface ()
 Default destructor. More...
 

Static Public Member Functions

static void GetPosition (long int &pan, long int &tilt)
 Get position, values should be updated by derived classes. More...
 
static void GetPositionDegrees (double &panDegree, double &tiltDegree)
 Get position in degrees, values should be updated by derived classes. More...
 

Protected Attributes

BIAS::DPPanTiltControl ptControl
 

Static Protected Attributes

static long int cur_pan = 0
 
static long int cur_tilt = 0
 
static double presolution = 0.0
 
static double tresolution = 0.0
 

Detailed Description

abstract control class for control of Directed Perception Pan Tilt Unit.

Currently uses DPPanTiltControl to send commands but could be extended in the future to use any other PTU controller class with common interface.

Author
fkellner, ischiller
Examples:
ExamplePanTiltManualControl.cpp.

Definition at line 42 of file PanTiltControlInterface.hh.

Constructor & Destructor Documentation

BIAS::PanTiltControlInterface::PanTiltControlInterface ( std::string  device,
bool  heavyDutyMode 
)
inline

Initialize PTU, called by derived classes.

Parameters
[in]deviceThe device string, e.g. COM0 or /dev/ttyUSB0
n]heavyDutyMode Enables the heavy duty mode for PTU

Definition at line 62 of file PanTiltControlInterface.hh.

virtual BIAS::PanTiltControlInterface::~PanTiltControlInterface ( )
inlinevirtual

Default destructor.

Moves PTU to position (0,0) and releases interface.

Definition at line 89 of file PanTiltControlInterface.hh.

Member Function Documentation

void BIAS::PanTiltControlInterface::AwaitCompletion ( )
inline

Waits until the current command is completed.

Definition at line 123 of file PanTiltControlInterface.hh.

static void BIAS::PanTiltControlInterface::GetPosition ( long int &  pan,
long int &  tilt 
)
inlinestatic

Get position, values should be updated by derived classes.

Definition at line 99 of file PanTiltControlInterface.hh.

static void BIAS::PanTiltControlInterface::GetPositionDegrees ( double &  panDegree,
double &  tiltDegree 
)
inlinestatic

Get position in degrees, values should be updated by derived classes.

Definition at line 106 of file PanTiltControlInterface.hh.

Referenced by BIAS::PanTiltManualControl::StartControl().

virtual void BIAS::PanTiltControlInterface::ResumeControl ( )
pure virtual
void BIAS::PanTiltControlInterface::SetPosition ( long int  pan,
long int  tilt,
bool  waitComplete = true 
)
inline

Set the position to move to.

Definition at line 113 of file PanTiltControlInterface.hh.

virtual void BIAS::PanTiltControlInterface::StartControl ( )
pure virtual

Starts controlling the PTU.

Implemented in BIAS::PanTiltAutoControl, and BIAS::PanTiltManualControl.

Examples:
ExamplePanTiltManualControl.cpp.
virtual void BIAS::PanTiltControlInterface::StartMoveTo ( const long int  pan,
const long int  tilt 
)
inlinevirtual

Starts movement to given pan and tilt position.

Reimplemented in BIAS::PanTiltAutoControl.

Definition at line 56 of file PanTiltControlInterface.hh.

virtual void BIAS::PanTiltControlInterface::StopControl ( )
pure virtual

Stops/pauses control.

Implemented in BIAS::PanTiltAutoControl, and BIAS::PanTiltManualControl.

Examples:
ExamplePanTiltManualControl.cpp.

Member Data Documentation

long int BIAS::PanTiltControlInterface::cur_pan = 0
staticprotected
long int BIAS::PanTiltControlInterface::cur_tilt = 0
staticprotected
double BIAS::PanTiltControlInterface::presolution = 0.0
staticprotected

Definition at line 134 of file PanTiltControlInterface.hh.

BIAS::DPPanTiltControl BIAS::PanTiltControlInterface::ptControl
protected
double BIAS::PanTiltControlInterface::tresolution = 0.0
staticprotected

Definition at line 135 of file PanTiltControlInterface.hh.


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