This class implements initialization and comunication methods to control a Tilt Unit model DT-80, working in radians .
Definition at line 43 of file CTuMicos.h.
#include <mrpt/hwdrivers/CTuMicos.h>
Public Member Functions | |
CTuMicos () | |
Default constructor. | |
virtual | ~CTuMicos () |
Destructor. | |
virtual bool | rangeMeasure () |
Search limit forward. | |
virtual bool | moveToAbsPos (char axis, double nRad) |
Specification of positions in absolute terms. | |
virtual bool | absPosQ (char axis, double &nRad) |
Query position in absolute terms. | |
virtual bool | moveToOffPos (char axis, double nRad) |
Specify desired axis position as an offset from the current position. | |
virtual bool | offPosQ (char axis, double &nRad) |
Query position in relative terms. | |
virtual bool | maxPosQ (char axis, double &nRad) |
Query max movement limit of a axis in absolute terms. | |
virtual bool | minPosQ (char axis, double &nRad) |
Query min movement limit of a axis in absolute terms. | |
virtual bool | enableLimitsQ (bool &enable) |
Query if exist movement limits. | |
virtual bool | enableLimits (bool set) |
Enable/Disable movement limits. | |
virtual bool | inmediateExecution (bool set) |
With I mode (default) instructs pan-tilt unit to immediately execute positional commands. | |
virtual bool | aWait (void) |
Wait the finish of the last position command to continue accept commands. | |
virtual bool | haltAll () |
Inmediately stop all. | |
virtual bool | halt (char axis) |
Inmediately stop. | |
virtual bool | speed (char axis, double radSec) |
Specification of turn speed. | |
virtual bool | speedQ (char axis, double &radSec) |
Query turn speed. | |
virtual bool | aceleration (char axis, double radSec2) |
Specification (de/a)celeration in turn. | |
virtual bool | acelerationQ (char axis, double &radSec2) |
Query (de/a)celeration in turn. | |
virtual bool | baseSpeed (char axis, double radSec) |
Specification of velocity to which start and finish the (de/a)celeration. | |
virtual bool | baseSpeedQ (char axis, double &radSec) |
Query velocity to which start and finish the (de/a)celeration. | |
virtual bool | upperSpeed (char axis, double radSec) |
Specification of velocity upper limit. | |
virtual bool | upperSpeedQ (char axis, double &radSec) |
Query velocity upper limit. | |
virtual bool | lowerSpeed (char axis, double radSec) |
Specification of velocity lower limit. | |
virtual bool | lowerSpeedQ (char axis, double &radSec) |
Query velocity lower limit. | |
virtual bool | reset (void) |
Reset PTU to initial state. | |
virtual bool | save (void) |
Save or restart default values. | |
virtual bool | restoreDefaults (void) |
Restore default values. | |
virtual bool | restoreFactoryDefaults (void) |
Restore factory default values. | |
virtual bool | version (char *nVersion) |
Version and CopyRights. | |
virtual void | nversion (double &nVersion) |
Number of version. | |
virtual bool | powerModeQ (bool transit, char &mode) |
Query power mode. | |
virtual bool | powerMode (bool transit, char mode) |
Specification of power mode. | |
bool | clear () |
Clear controller internal stack. | |
virtual bool | setLimits (char axis, double &l, double &u) |
Set limits of movement. | |
virtual bool | changeMotionDir () |
virtual int | checkErrors () |
Check errors, returns 0 if there are not errors or error code otherwise. | |
virtual void | clearErrors () |
Clear errors. | |
virtual bool | init (const std::string port) |
PTU and serial port initialization. | |
virtual void | close () |
Close conection with serial port. | |
virtual double | radError (char axis, double nRadMoved) |
To obtains the mistake for use discrete values when the movement is expressed in radians. | |
virtual long | radToPos (char axis, double nRad) |
To obtain the discrete value for a number of radians. | |
virtual double | posToRad (char axis, long nPos) |
To obtain the number of radians for a discrete value. | |
virtual bool | scan (char axis, int wait, float initial, float final, double radPre) |
Performs a scan in the axis indicated and whit the precision desired. | |
virtual bool | verboseQ (bool &modo) |
Query verbose mode. | |
virtual bool | verbose (bool set) |
Set verbose. | |
virtual bool | echoModeQ (bool &mode) |
Query echo mode. | |
virtual bool | echoMode (bool mode) |
Enable/Disable echo response with command. | |
virtual bool | resolution (void) |
Query the pan and tilt resolution per position moved and initialize local atributes. | |
virtual double | status (double &rad) |
Check if ptu is moving. | |
Public Attributes | |
int | axis_index |
Private Member Functions | |
virtual bool | transmit (const char *command) |
To transmition commands to the PTU. | |
virtual bool | receive (const char *command, char *response) |
To receive the responseof the PTU. | |
virtual bool | radQuerry (char axis, char command, double &nRad) |
Used to obtains a number of radians. | |
virtual bool | radAsign (char axis, char command, double nRad) |
Method used for asign a number of radians with a command. | |
Static Private Member Functions | |
static double | convertToDouble (char *sDouble) |
Convert string to double. | |
static long | convertToLong (char *sLong) |
Convert string to long. |
mrpt::hwdrivers::CTuMicos::CTuMicos | ( | ) | [inline] |
Default constructor.
Definition at line 50 of file CTuMicos.h.
virtual mrpt::hwdrivers::CTuMicos::~CTuMicos | ( | ) | [inline, virtual] |
Destructor.
Definition at line 54 of file CTuMicos.h.
virtual bool mrpt::hwdrivers::CTuMicos::absPosQ | ( | char | axis, |
double & | nRad | ||
) | [virtual] |
Query position in absolute terms.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::aceleration | ( | char | axis, |
double | radSec2 | ||
) | [virtual] |
Specification (de/a)celeration in turn.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::acelerationQ | ( | char | axis, |
double & | radSec2 | ||
) | [virtual] |
Query (de/a)celeration in turn.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::aWait | ( | void | ) | [virtual] |
Wait the finish of the last position command to continue accept commands.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::baseSpeed | ( | char | axis, |
double | radSec | ||
) | [virtual] |
Specification of velocity to which start and finish the (de/a)celeration.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::baseSpeedQ | ( | char | axis, |
double & | radSec | ||
) | [virtual] |
Query velocity to which start and finish the (de/a)celeration.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::changeMotionDir | ( | ) | [virtual] |
Implements mrpt::hwdrivers::CPtuBase.
virtual int mrpt::hwdrivers::CTuMicos::checkErrors | ( | ) | [virtual] |
Check errors, returns 0 if there are not errors or error code otherwise.
Implements mrpt::hwdrivers::CPtuBase.
bool mrpt::hwdrivers::CTuMicos::clear | ( | ) |
Clear controller internal stack.
virtual void mrpt::hwdrivers::CTuMicos::clearErrors | ( | ) | [inline, virtual] |
virtual void mrpt::hwdrivers::CTuMicos::close | ( | ) | [virtual] |
Close conection with serial port.
Implements mrpt::hwdrivers::CPtuBase.
static double mrpt::hwdrivers::CTuMicos::convertToDouble | ( | char * | sDouble | ) | [static, private] |
Convert string to double.
static long mrpt::hwdrivers::CTuMicos::convertToLong | ( | char * | sLong | ) | [static, private] |
Convert string to long.
virtual bool mrpt::hwdrivers::CTuMicos::echoMode | ( | bool | mode | ) | [virtual] |
Enable/Disable echo response with command.
Example of use (EE supposed): PP * 22 ED * <pp entered again, but not echoed>* 22
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::echoModeQ | ( | bool & | mode | ) | [virtual] |
Query echo mode.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::enableLimits | ( | bool | set | ) | [virtual] |
Enable/Disable movement limits.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::enableLimitsQ | ( | bool & | enable | ) | [virtual] |
Query if exist movement limits.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::halt | ( | char | axis | ) | [virtual] |
Inmediately stop.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::haltAll | ( | ) | [virtual] |
Inmediately stop all.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::init | ( | const std::string | port | ) | [virtual] |
PTU and serial port initialization.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::inmediateExecution | ( | bool | set | ) | [virtual] |
With I mode (default) instructs pan-tilt unit to immediately execute positional commands.
In S mode instructs pan-tilt unit to execute positional commands only when an Await Position Command Completion command is executed or when put into Immediate Execution Mode.
Example of use of S mode: DR * S * PP1500 * TP-900 * PP * Current Pan position is 0 TP * Current Tilt position is 0 A * PP * Current Pan position is 1500 TP * Current Tilt position is -900
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::lowerSpeed | ( | char | axis, |
double | radSec | ||
) | [virtual] |
Specification of velocity lower limit.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::lowerSpeedQ | ( | char | axis, |
double & | radSec | ||
) | [virtual] |
Query velocity lower limit.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::maxPosQ | ( | char | axis, |
double & | nRad | ||
) | [virtual] |
Query max movement limit of a axis in absolute terms.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::minPosQ | ( | char | axis, |
double & | nRad | ||
) | [virtual] |
Query min movement limit of a axis in absolute terms.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::moveToAbsPos | ( | char | axis, |
double | nRad | ||
) | [virtual] |
Specification of positions in absolute terms.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::moveToOffPos | ( | char | axis, |
double | nRad | ||
) | [virtual] |
Specify desired axis position as an offset from the current position.
This method recives the number of radians to move.
Example of use: TT-500 * A * TO * Current Tilt position is -500 TO500 * A * TT * Current Pan position is 1000
Implements mrpt::hwdrivers::CPtuBase.
virtual void mrpt::hwdrivers::CTuMicos::nversion | ( | double & | nVersion | ) | [virtual] |
Number of version.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::offPosQ | ( | char | axis, |
double & | nRad | ||
) | [virtual] |
Query position in relative terms.
Implements mrpt::hwdrivers::CPtuBase.
virtual double mrpt::hwdrivers::CTuMicos::posToRad | ( | char | axis, |
long | nPos | ||
) | [virtual] |
To obtain the number of radians for a discrete value.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::powerMode | ( | bool | transit, |
char | mode | ||
) | [virtual] |
Specification of power mode.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::powerModeQ | ( | bool | transit, |
char & | mode | ||
) | [virtual] |
Query power mode.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::radAsign | ( | char | axis, |
char | command, | ||
double | nRad | ||
) | [private, virtual] |
Method used for asign a number of radians with a command.
Implements mrpt::hwdrivers::CPtuBase.
virtual double mrpt::hwdrivers::CTuMicos::radError | ( | char | axis, |
double | nRadMoved | ||
) | [virtual] |
To obtains the mistake for use discrete values when the movement is expressed in radians.
Parameters are the absolute position in radians and the axis desired
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::radQuerry | ( | char | axis, |
char | command, | ||
double & | nRad | ||
) | [private, virtual] |
Used to obtains a number of radians.
Implements mrpt::hwdrivers::CPtuBase.
virtual long mrpt::hwdrivers::CTuMicos::radToPos | ( | char | axis, |
double | nRad | ||
) | [virtual] |
To obtain the discrete value for a number of radians.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::rangeMeasure | ( | ) | [virtual] |
Search limit forward.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::receive | ( | const char * | command, |
char * | response | ||
) | [private, virtual] |
To receive the responseof the PTU.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::reset | ( | void | ) | [virtual] |
Reset PTU to initial state.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::resolution | ( | void | ) | [virtual] |
Query the pan and tilt resolution per position moved and initialize local atributes.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::restoreDefaults | ( | void | ) | [virtual] |
Restore default values.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::restoreFactoryDefaults | ( | void | ) | [virtual] |
Restore factory default values.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::save | ( | void | ) | [virtual] |
Save or restart default values.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::scan | ( | char | axis, |
int | wait, | ||
float | initial, | ||
float | final, | ||
double | radPre | ||
) | [virtual] |
Performs a scan in the axis indicated and whit the precision desired.
<axis> | {Pan or Till} |
<tWait> | {Wait time betwen commands} |
<initial> | {initial position} |
<final> | {final position} |
<radPre> | {radians precision for the scan} |
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::setLimits | ( | char | axis, |
double & | l, | ||
double & | u | ||
) | [virtual] |
Set limits of movement.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::speed | ( | char | axis, |
double | radSec | ||
) | [virtual] |
Specification of turn speed.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::speedQ | ( | char | axis, |
double & | radSec | ||
) | [virtual] |
Query turn speed.
Implements mrpt::hwdrivers::CPtuBase.
virtual double mrpt::hwdrivers::CTuMicos::status | ( | double & | rad | ) | [virtual] |
Check if ptu is moving.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::transmit | ( | const char * | command | ) | [private, virtual] |
To transmition commands to the PTU.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::upperSpeed | ( | char | axis, |
double | radSec | ||
) | [virtual] |
Specification of velocity upper limit.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::upperSpeedQ | ( | char | axis, |
double & | radSec | ||
) | [virtual] |
Query velocity upper limit.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::verbose | ( | bool | set | ) | [virtual] |
Set verbose.
Example of response with FV (verbose) active: FV * PP * Current pan position is 0 Example of response with FT (terse) active: FT * PP * 0
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::verboseQ | ( | bool & | modo | ) | [virtual] |
Query verbose mode.
Implements mrpt::hwdrivers::CPtuBase.
virtual bool mrpt::hwdrivers::CTuMicos::version | ( | char * | nVersion | ) | [virtual] |
Version and CopyRights.
Implements mrpt::hwdrivers::CPtuBase.
Definition at line 354 of file CTuMicos.h.
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN:exported at Tue Jan 25 21:56:31 UTC 2011 |