10 #ifndef CPtuDPerception_H 11 #define CPtuDPerception_H 43 virtual bool rangeMeasure();
47 virtual bool moveToAbsPos(
char axis,
double nRad);
51 virtual bool absPosQ(
char axis,
double &nRad);
66 virtual bool moveToOffPos(
char axis,
double nRad);
70 virtual bool offPosQ(
char axis,
double &nRad);
74 virtual bool maxPosQ(
char axis,
double &nRad);
78 virtual bool minPosQ(
char axis,
double &nRad);
82 virtual bool enableLimitsQ(
bool &enable);
86 virtual bool enableLimits(
bool set);
107 virtual bool inmediateExecution(
bool set);
113 virtual bool aWait(
void);
117 virtual bool haltAll();
121 virtual bool halt(
char axis);
125 virtual bool speed(
char axis,
double radSec);
129 virtual bool speedQ(
char axis,
double &radSec);
133 virtual bool aceleration(
char axis,
double radSec2);
137 virtual bool acelerationQ(
char axis,
double &radSec2);
143 virtual bool baseSpeed(
char axis,
double radSec);
149 virtual bool baseSpeedQ(
char axis,
double &radSec);
153 virtual bool upperSpeed(
char axis,
double radSec);
157 virtual bool upperSpeedQ(
char axis,
double &radSec);
161 virtual bool lowerSpeed(
char axis,
double radSec);
165 virtual bool lowerSpeedQ(
char axis,
double &radSec);
169 virtual bool reset(
void);
173 virtual bool save(
void);
177 virtual bool restoreDefaults(
void);
181 virtual bool restoreFactoryDefaults(
void);
185 virtual bool version(
char * nVersion);
189 virtual void nversion(
double &nVersion);
193 virtual bool powerModeQ(
bool transit,
char &
mode);
197 virtual bool powerMode(
bool transit,
char mode);
208 virtual bool setLimits(
char axis,
double &l,
double &u);
212 virtual bool changeMotionDir();
234 virtual int checkErrors();
264 virtual void close();
271 virtual double radError(
char axis,
double nRadMoved);
275 virtual long radToPos(
char axis,
double nRad);
279 virtual double posToRad(
char axis,
long nPos);
289 virtual bool scan(
char axis,
int wait,
float initial,
float final,
double radPre);
293 virtual bool verboseQ(
bool &modo);
306 virtual bool verbose(
bool set);
310 virtual bool echoModeQ(
bool &
mode);
321 virtual bool echoMode(
bool mode);
327 virtual bool resolution(
void);
336 virtual bool transmit(
const char * command);
340 virtual bool receive(
const char * command,
char * response);
344 virtual bool radQuerry(
char axis,
char command,
double &nRad);
348 virtual bool radAsign(
char axis,
char command,
double nRad);
352 virtual double convertToDouble(
char *sDouble);
362 enum { NoError = 1, ComError = 2, TimeoutError = 3,
363 InitError = 5,PanHitError = 7, TiltHitError = 11, PanTiltHitError=13,
364 MaxLimitError = 17, MinLimitError = 19, OutOfRange = 23,
365 IllegalCommandError = 29, UnExpectedError =31 };
374 enum { Pan =
'P', Tilt =
'T' };
375 enum { Regular =
'R', High =
'H', Low =
'L', Off =
'O' };
376 enum { Com1 = 1, Com2 = 2, Com3 = 3, Com4 = 4 };
virtual double status(double &rad)
Check if ptu is moving.
This class implements initialization and comunication methods to control a generic Pan and Tilt Unit...
virtual ~CPtuDPerception()
Destructor.
CPtuDPerception()
Default constructor.
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
int nError
TimeoutError: Only occurs if the communication is cut with PTU so it is advisable to check the connec...
GLsizei const GLchar ** string
This class implements initialization and comunication methods to control a Pan and Tilt Unit model PT...
long convertToLong(char *sLong)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool illegalCommandError()
virtual void clearErrors()
Clear errors.