25 #ifndef __DPPanTiltControl_hh__
26 #define __DPPanTiltControl_hh__
28 #include <bias_config.h>
40 #include "include/ptu.h"
42 # include "include/linuxser.h"
44 # include "include/w32seria.h"
51 #define DPPTU_DEF_RES 0.051428
52 #define DPPTU_MAXSPEED 2901
54 #define DPPTU_MINPAN -3000
55 #define DPPTU_MAXPAN 3000
56 #define DPPTU_MINTILT -500
57 #define DPPTU_MAXTILT 300
60 #define ABSOLUTEMODE 1
91 int SetMode(
int nMode);
95 bool ResetPanTiltUnit();
98 void StopPanTiltUnit();
101 void AwaitCompletion();
107 bool InitPanTiltUnit(
int nPort,
bool bUSB =
false);
113 bool InitPanTiltUnit(
const char *portName);
116 void ClosePanTiltUnit();
119 void MoveUp(
int nValue);
122 void MoveDown(
int nValue);
125 void MoveLeft(
int nValue);
128 void MoveRight(
int nValue);
131 void StartCircularMovement();
134 char SetSpeed(
int nPanSpeed,
int nTiltSpeed);
137 char SetAcceleration(
int nPanAcc,
int nTiltAcc);
148 void GetSpeed(
long &panSpeed,
long &tiltSpeed);
151 void GetAcceleration(
long &panAcc,
long &tiltAcc);
154 void GetCurrentPosition(
long &lPanPos,
long &lTiltPos);
157 void GetCurrentPositionDegrees(
double &dPanDeg,
double &dTiltDeg);
160 void GetCurrentPositionRadians(
double &dPanRad,
double &dTiltRad);
163 void SetPosition(
int nPanPos,
int nTiltPos,
bool bWaitComplete =
true);
167 void SendRawCommand(std::string cmd);
172 int ReadRawLine(std::string &cmd);
175 int SetMotorStepping(
int panStepping,
int tiltStepping);
180 void QueryResolution(
double &panResolution,
double &tiltResolution,
181 bool updateInternal =
false);
200 #endif // __DPPanTiltControl_hh__
double GetTiltResolution()
Get the resolution of the tilt axis.
void UseDefaultOrientation(bool use)
Set the orientation of the PTU (default or upside-down).
Basic controller interface for Directed Perception Pan Tilt Unit.
bool bDefaultOrientation_
double GetPanResolution()
Get the resolution of the pan axis.