This class implements initialization and comunication methods to control a generic Pan and Tilt Unit, working in radians.
Definition at line 23 of file CPtuBase.h.
#include <mrpt/hwdrivers/CPtuBase.h>
Public Member Functions | |
virtual | ~CPtuBase () |
Destructor. More... | |
virtual bool | rangeMeasure ()=0 |
Search limit forward. More... | |
virtual bool | moveToAbsPos (char axis, double nRad)=0 |
Specification of positions in absolute terms. More... | |
virtual bool | absPosQ (char axis, double &nRad)=0 |
Query position in absolute terms. More... | |
virtual bool | moveToOffPos (char axis, double nRad)=0 |
Specify desired axis position as an offset from the current position. More... | |
virtual bool | offPosQ (char axis, double &nRad)=0 |
Query position in relative terms. More... | |
virtual bool | maxPosQ (char axis, double &nRad)=0 |
Query max movement limit of a axis in absolute terms. More... | |
virtual bool | minPosQ (char axis, double &nRad)=0 |
Query min movement limit of a axis in absolute terms. More... | |
virtual bool | enableLimitsQ (bool &enable)=0 |
Query if exist movement limits. More... | |
virtual bool | enableLimits (bool set)=0 |
Enable/Disable movement limits. More... | |
virtual bool | inmediateExecution (bool set)=0 |
With I mode (default) instructs pan-tilt unit to immediately execute positional commands. More... | |
virtual bool | aWait (void)=0 |
Wait the finish of the last position command to continue accept commands. More... | |
virtual bool | haltAll ()=0 |
Inmediately stop all. More... | |
virtual bool | halt (char axis)=0 |
Inmediately stop. More... | |
virtual bool | speed (char axis, double RadSec)=0 |
Specification of turn speed. More... | |
virtual bool | speedQ (char axis, double &RadSec)=0 |
Query turn speed. More... | |
virtual bool | aceleration (char axis, double RadSec2)=0 |
Specification (de/a)celeration in turn. More... | |
virtual bool | acelerationQ (char axis, double &RadSec2)=0 |
Query (de/a)celeration in turn. More... | |
virtual bool | baseSpeed (char axis, double RadSec)=0 |
Specification of velocity to which start and finish the (de/a)celeration. More... | |
virtual bool | baseSpeedQ (char axis, double &RadSec)=0 |
Query velocity to which start and finish the (de/a)celeration. More... | |
virtual bool | upperSpeed (char axis, double RadSec)=0 |
Specification of velocity upper limit. More... | |
virtual bool | upperSpeedQ (char axis, double &RadSec)=0 |
Query velocity upper limit. More... | |
virtual bool | lowerSpeed (char axis, double RadSec)=0 |
Specification of velocity lower limit. More... | |
virtual bool | lowerSpeedQ (char axis, double &RadSec)=0 |
Query velocity lower limit. More... | |
virtual bool | reset (void)=0 |
Reset PTU to initial state. More... | |
virtual bool | save (void)=0 |
Save or restart default values. More... | |
virtual bool | restoreDefaults (void)=0 |
Restore default values. More... | |
virtual bool | restoreFactoryDefaults (void)=0 |
Restore factory default values. More... | |
virtual bool | version (char *nVersion)=0 |
Version and CopyRights. More... | |
virtual void | nversion (double &nVersion)=0 |
Number of version. More... | |
virtual bool | powerModeQ (bool transit, char &mode)=0 |
Query power mode. More... | |
virtual bool | powerMode (bool transit, char mode)=0 |
Specification of power mode. More... | |
virtual double | status (double &rad)=0 |
Check if ptu is moving. More... | |
virtual bool | setLimits (char axis, double &l, double &u)=0 |
Set limits of movement. More... | |
virtual bool | changeMotionDir ()=0 |
virtual int | checkErrors ()=0 |
Check errors, returns 0 if there are not errors or error code otherwise. More... | |
virtual void | clearErrors ()=0 |
Clear errors. More... | |
virtual bool | init (const std::string &port)=0 |
PTU and serial port initialization. More... | |
virtual void | close ()=0 |
Close Connection with serial port. More... | |
virtual double | radError (char axis, double nRadMoved)=0 |
To obtains the mistake for use discrete values when the movement is expressed in radians. More... | |
virtual long | radToPos (char axis, double nRad)=0 |
To obtain the discrete value for a number of radians. More... | |
virtual double | posToRad (char axis, long nPos)=0 |
To obtain the number of radians for a discrete value. More... | |
virtual bool | scan (char axis, int wait, float initial, float final, double RadPre)=0 |
Performs a scan in the axis indicated and whit the precision desired. More... | |
virtual bool | verboseQ (bool &modo)=0 |
Query verbose mode. More... | |
virtual bool | verbose (bool set)=0 |
Set verbose. More... | |
virtual bool | echoModeQ (bool &mode)=0 |
Query echo mode. More... | |
virtual bool | echoMode (bool mode)=0 |
Enable/Disable echo response with command. More... | |
virtual bool | resolution (void)=0 |
Query the pan and tilt resolution per position moved and initialize local atributes. More... | |
Public Attributes | |
double | tiltResolution |
double | panResolution |
Protected Attributes | |
CSerialPort | serPort |
Private Member Functions | |
virtual bool | transmit (const char *command)=0 |
To transmition commands to the PTU. More... | |
virtual bool | receive (const char *command, char *response)=0 |
To receive the responseof the PTU. More... | |
virtual bool | radQuerry (char axis, char command, double &nRad)=0 |
Used to obtains a number of radians. More... | |
virtual bool | radAsign (char axis, char command, double nRad)=0 |
Method used for asign a number of radians with a command. More... | |
|
inlinevirtual |
Destructor.
Definition at line 42 of file CPtuBase.h.
|
pure virtual |
Query position in absolute terms.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Specification (de/a)celeration in turn.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query (de/a)celeration in turn.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Wait the finish of the last position command to continue accept commands.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Specification of velocity to which start and finish the (de/a)celeration.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query velocity to which start and finish the (de/a)celeration.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Check errors, returns 0 if there are not errors or error code otherwise.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Clear errors.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Close Connection with serial port.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Enable/Disable echo response with command.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Query echo mode.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Enable/Disable movement limits.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query if exist movement limits.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Inmediately stop.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Inmediately stop all.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
PTU and serial port initialization.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure 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.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Specification of velocity lower limit.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query velocity lower limit.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query max movement limit of a axis in absolute terms.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query min movement limit of a axis in absolute terms.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Specification of positions in absolute terms.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Specify desired axis position as an offset from the current position.
This method recives the number of radians to move.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Number of version.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query position in relative terms.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
To obtain the number of radians for a discrete value.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Specification of power mode.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query power mode.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
privatepure virtual |
Method used for asign a number of radians with a command.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure 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
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
privatepure virtual |
Used to obtains a number of radians.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
To obtain the discrete value for a number of radians.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Search limit forward.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
privatepure virtual |
To receive the responseof the PTU.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Reset PTU to initial state.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query the pan and tilt resolution per position moved and initialize local atributes.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Restore default values.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Restore factory default values.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Save or restart default values.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure 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} |
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Set limits of movement.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Specification of turn speed.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query turn speed.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Check if ptu is moving.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
privatepure virtual |
To transmition commands to the PTU.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Specification of velocity upper limit.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure virtual |
Query velocity upper limit.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
|
pure 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
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Query verbose mode.
Implemented in mrpt::hwdrivers::CPtuDPerception, and mrpt::hwdrivers::CTuMicos.
|
pure virtual |
Version and CopyRights.
Implemented in mrpt::hwdrivers::CTuMicos, and mrpt::hwdrivers::CPtuDPerception.
double mrpt::hwdrivers::CPtuBase::panResolution |
Definition at line 30 of file CPtuBase.h.
|
protected |
Definition at line 34 of file CPtuBase.h.
double mrpt::hwdrivers::CPtuBase::tiltResolution |
Definition at line 30 of file CPtuBase.h.
Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019 |