MRPT  2.0.1
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Static Private Member Functions
mrpt::hwdrivers::CTuMicos Class Reference

Detailed Description

This class implements initialization and communication methods to control a Tilt Unit model DT-80, working in radians .

Definition at line 22 of file CTuMicos.h.

#include <mrpt/hwdrivers/CTuMicos.h>

Inheritance diagram for mrpt::hwdrivers::CTuMicos:

Public Member Functions

 CTuMicos ()=default
 Default constructor. More...
 
 ~CTuMicos () override
 Destructor. More...
 
bool rangeMeasure () override
 Search limit forward. More...
 
bool moveToAbsPos (char axis, double nRad) override
 Specification of positions in absolute terms. More...
 
bool absPosQ (char axis, double &nRad) override
 Query position in absolute terms. More...
 
bool moveToOffPos (char axis, double nRad) override
 Specify desired axis position as an offset from the current position. More...
 
bool offPosQ (char axis, double &nRad) override
 Query position in relative terms. More...
 
bool maxPosQ (char axis, double &nRad) override
 Query max movement limit of a axis in absolute terms. More...
 
bool minPosQ (char axis, double &nRad) override
 Query min movement limit of a axis in absolute terms. More...
 
bool enableLimitsQ (bool &enable) override
 Query if exist movement limits. More...
 
bool enableLimits (bool set) override
 Enable/Disable movement limits. More...
 
bool inmediateExecution (bool set) override
 With I mode (default) instructs pan-tilt unit to immediately execute positional commands. More...
 
bool aWait () override
 Wait the finish of the last position command to continue accept commands. More...
 
bool haltAll () override
 Inmediately stop all. More...
 
bool halt (char axis) override
 Inmediately stop. More...
 
bool speed (char axis, double radSec) override
 Specification of turn speed. More...
 
bool speedQ (char axis, double &radSec) override
 Query turn speed. More...
 
bool aceleration (char axis, double radSec2) override
 Specification (de/a)celeration in turn. More...
 
bool acelerationQ (char axis, double &radSec2) override
 Query (de/a)celeration in turn. More...
 
bool baseSpeed (char axis, double radSec) override
 Specification of velocity to which start and finish the (de/a)celeration. More...
 
bool baseSpeedQ (char axis, double &radSec) override
 Query velocity to which start and finish the (de/a)celeration. More...
 
bool upperSpeed (char axis, double radSec) override
 Specification of velocity upper limit. More...
 
bool upperSpeedQ (char axis, double &radSec) override
 Query velocity upper limit. More...
 
bool lowerSpeed (char axis, double radSec) override
 Specification of velocity lower limit. More...
 
bool lowerSpeedQ (char axis, double &radSec) override
 Query velocity lower limit. More...
 
bool reset () override
 Reset PTU to initial state. More...
 
bool save () override
 Save or restart default values. More...
 
bool restoreDefaults () override
 Restore default values. More...
 
bool restoreFactoryDefaults () override
 Restore factory default values. More...
 
bool version (char *nVersion) override
 Version and CopyRights. More...
 
void nversion (double &nVersion) override
 Number of version. More...
 
bool powerModeQ (bool transit, char &mode) override
 Query power mode. More...
 
bool powerMode (bool transit, char mode) override
 Specification of power mode. More...
 
bool clear ()
 Clear controller internal stack. More...
 
bool setLimits (char axis, double &l, double &u) override
 Set limits of movement. More...
 
bool changeMotionDir () override
 
int checkErrors () override
 Check errors, returns 0 if there are not errors or error code otherwise. More...
 
void clearErrors () override
 Clear errors. More...
 
bool init (const std::string &port) override
 PTU and serial port initialization. More...
 
void close () override
 Close Connection with serial port. More...
 
double radError (char axis, double nRadMoved) override
 To obtains the mistake for use discrete values when the movement is expressed in radians. More...
 
long radToPos (char axis, double nRad) override
 To obtain the discrete value for a number of radians. More...
 
double posToRad (char axis, long nPos) override
 To obtain the number of radians for a discrete value. More...
 
bool scan (char axis, int wait, float initial, float final, double radPre) override
 Performs a scan in the axis indicated and whit the precision desired. More...
 
bool verboseQ (bool &modo) override
 Query verbose mode. More...
 
bool verbose (bool set) override
 Set verbose. More...
 
bool echoModeQ (bool &mode) override
 Query echo mode. More...
 
bool echoMode (bool mode) override
 Enable/Disable echo response with command. More...
 
bool resolution () override
 Query the pan and tilt resolution per position moved and initialize local atributes. More...
 
double status (double &rad) override
 Check if ptu is moving. More...
 

Static Public Member Functions

static std::array< mrpt::system::TConsoleColor, NUMBER_OF_VERBOSITY_LEVELS > & logging_levels_to_colors ()
 Map from VerbosityLevels to their corresponding mrpt::system::TConsoleColor. More...
 
static std::array< std::string, NUMBER_OF_VERBOSITY_LEVELS > & logging_levels_to_names ()
 Map from VerbosityLevels to their corresponding names. More...
 

Public Attributes

int axis_index
 
double tiltResolution
 
double panResolution
 

Protected Attributes

mrpt::comms::CSerialPort serPort
 
VerbosityLevel m_min_verbosity_level {LVL_INFO}
 Provided messages with VerbosityLevel smaller than this value shall be ignored. More...
 

Private Member Functions

bool transmit (const char *command) override
 To transmition commands to the PTU. More...
 
bool receive (const char *command, char *response) override
 To receive the responseof the PTU. More...
 
bool radQuerry (char axis, char command, double &nRad) override
 Used to obtains a number of radians. More...
 
bool radAsign (char axis, char command, double nRad) override
 Method used for asign a number of radians with a command. More...
 

Static Private Member Functions

static double convertToDouble (char *sDouble)
 Convert string to double. More...
 
static long convertToLong (char *sLong)
 Convert string to long. More...
 

Logging methods

bool logging_enable_console_output {true}
 [Default=true] Set it to false in case you don't want the logged messages to be dumped to the output automatically. More...
 
bool logging_enable_keep_record {false}
 [Default=false] Enables storing all messages into an internal list. More...
 
void logStr (const VerbosityLevel level, std::string_view msg_str) const
 Main method to add the specified message string to the logger. More...
 
void logFmt (const VerbosityLevel level, const char *fmt,...) const MRPT_printf_format_check(3
 Alternative logging method, which mimics the printf behavior. More...
 
void void logCond (const VerbosityLevel level, bool cond, const std::string &msg_str) const
 Log the given message only if the condition is satisfied. More...
 
void setLoggerName (const std::string &name)
 Set the name of the COutputLogger instance. More...
 
std::string getLoggerName () const
 Return the name of the COutputLogger instance. More...
 
void setMinLoggingLevel (const VerbosityLevel level)
 Set the minimum logging level for which the incoming logs are going to be taken into account. More...
 
void setVerbosityLevel (const VerbosityLevel level)
 alias of setMinLoggingLevel() More...
 
VerbosityLevel getMinLoggingLevel () const
 
bool isLoggingLevelVisible (VerbosityLevel level) const
 
void getLogAsString (std::string &log_contents) const
 Fill the provided string with the contents of the logger's history in std::string representation. More...
 
std::string getLogAsString () const
 Get the history of COutputLogger instance in a string representation. More...
 
void writeLogToFile (const std::string *fname_in=nullptr) const
 Write the contents of the COutputLogger instance to an external file. More...
 
void dumpLogToConsole () const
 Dump the current contents of the COutputLogger instance in the terminal window. More...
 
std::string getLoggerLastMsg () const
 Return the last Tmsg instance registered in the logger history. More...
 
void getLoggerLastMsg (std::string &msg_str) const
 Fill inputtted string with the contents of the last message in history. More...
 
void loggerReset ()
 Reset the contents of the logger instance. More...
 
void logRegisterCallback (output_logger_callback_t userFunc)
 
bool logDeregisterCallback (output_logger_callback_t userFunc)
 

Constructor & Destructor Documentation

◆ CTuMicos()

mrpt::hwdrivers::CTuMicos::CTuMicos ( )
default

Default constructor.

◆ ~CTuMicos()

mrpt::hwdrivers::CTuMicos::~CTuMicos ( )
inlineoverride

Destructor.

Definition at line 31 of file CTuMicos.h.

References close().

Here is the call graph for this function:

Member Function Documentation

◆ absPosQ()

bool CTuMicos::absPosQ ( char  axis,
double &  nRad 
)
overridevirtual

Query position in absolute terms.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 63 of file CTuMicos.cpp.

◆ aceleration()

bool CTuMicos::aceleration ( char  axis,
double  radSec2 
)
overridevirtual

Specification (de/a)celeration in turn.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 131 of file CTuMicos.cpp.

◆ acelerationQ()

bool CTuMicos::acelerationQ ( char  axis,
double &  radSec2 
)
overridevirtual

Query (de/a)celeration in turn.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 142 of file CTuMicos.cpp.

◆ aWait()

bool CTuMicos::aWait ( )
overridevirtual

Wait the finish of the last position command to continue accept commands.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 252 of file CTuMicos.cpp.

◆ baseSpeed()

bool CTuMicos::baseSpeed ( char  axis,
double  radSec 
)
overridevirtual

Specification of velocity to which start and finish the (de/a)celeration.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 153 of file CTuMicos.cpp.

◆ baseSpeedQ()

bool CTuMicos::baseSpeedQ ( char  axis,
double &  radSec 
)
overridevirtual

Query velocity to which start and finish the (de/a)celeration.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 164 of file CTuMicos.cpp.

◆ changeMotionDir()

bool CTuMicos::changeMotionDir ( )
overridevirtual

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 406 of file CTuMicos.cpp.

References mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ checkErrors()

int CTuMicos::checkErrors ( )
overridevirtual

Check errors, returns 0 if there are not errors or error code otherwise.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 782 of file CTuMicos.cpp.

◆ clear()

bool CTuMicos::clear ( )

Clear controller internal stack.

Definition at line 378 of file CTuMicos.cpp.

References mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ clearErrors()

void mrpt::hwdrivers::CTuMicos::clearErrors ( )
inlineoverridevirtual

Clear errors.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 211 of file CTuMicos.h.

◆ close()

void CTuMicos::close ( )
overridevirtual

Close Connection with serial port.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 494 of file CTuMicos.cpp.

Referenced by ~CTuMicos().

Here is the caller graph for this function:

◆ convertToDouble()

double CTuMicos::convertToDouble ( char *  sDouble)
staticprivate

Convert string to double.

Definition at line 770 of file CTuMicos.cpp.

◆ convertToLong()

long CTuMicos::convertToLong ( char *  sLong)
staticprivate

Convert string to long.

Definition at line 759 of file CTuMicos.cpp.

◆ dumpLogToConsole()

void COutputLogger::dumpLogToConsole ( ) const
inherited

Dump the current contents of the COutputLogger instance in the terminal window.

See also
writeToFile

Definition at line 190 of file COutputLogger.cpp.

◆ echoMode()

bool CTuMicos::echoMode ( bool  mode)
overridevirtual

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.

Definition at line 605 of file CTuMicos.cpp.

◆ echoModeQ()

bool CTuMicos::echoModeQ ( bool &  mode)
overridevirtual

Query echo mode.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 594 of file CTuMicos.cpp.

◆ enableLimits()

bool CTuMicos::enableLimits ( bool  set)
overridevirtual

Enable/Disable movement limits.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 230 of file CTuMicos.cpp.

◆ enableLimitsQ()

bool CTuMicos::enableLimitsQ ( bool &  enable)
overridevirtual

Query if exist movement limits.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 219 of file CTuMicos.cpp.

◆ getLogAsString() [1/2]

void COutputLogger::getLogAsString ( std::string &  log_contents) const
inherited

Fill the provided string with the contents of the logger's history in std::string representation.

Definition at line 154 of file COutputLogger.cpp.

◆ getLogAsString() [2/2]

std::string COutputLogger::getLogAsString ( ) const
inherited

Get the history of COutputLogger instance in a string representation.

Definition at line 159 of file COutputLogger.cpp.

Referenced by mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::getDescriptiveReport().

Here is the caller graph for this function:

◆ getLoggerLastMsg() [1/2]

std::string COutputLogger::getLoggerLastMsg ( ) const
inherited

Return the last Tmsg instance registered in the logger history.

Definition at line 195 of file COutputLogger.cpp.

References mrpt::system::COutputLogger::TMsg::getAsString().

Here is the call graph for this function:

◆ getLoggerLastMsg() [2/2]

void COutputLogger::getLoggerLastMsg ( std::string &  msg_str) const
inherited

Fill inputtted string with the contents of the last message in history.

Definition at line 201 of file COutputLogger.cpp.

◆ getLoggerName()

std::string COutputLogger::getLoggerName ( ) const
inherited

Return the name of the COutputLogger instance.

See also
setLoggerName

Definition at line 143 of file COutputLogger.cpp.

◆ getMinLoggingLevel()

VerbosityLevel mrpt::system::COutputLogger::getMinLoggingLevel ( ) const
inlineinherited

◆ halt()

bool CTuMicos::halt ( char  axis)
overridevirtual

Inmediately stop.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 268 of file CTuMicos.cpp.

References mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ haltAll()

bool CTuMicos::haltAll ( )
overridevirtual

Inmediately stop all.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 257 of file CTuMicos.cpp.

◆ init()

bool CTuMicos::init ( const std::string &  port)
overridevirtual

PTU and serial port initialization.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 432 of file CTuMicos.cpp.

References mrpt::containers::clear(), and MRPT_LOG_ERROR_STREAM.

Here is the call graph for this function:

◆ inmediateExecution()

bool CTuMicos::inmediateExecution ( bool  set)
overridevirtual

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.

Definition at line 241 of file CTuMicos.cpp.

◆ isLoggingLevelVisible()

bool mrpt::system::COutputLogger::isLoggingLevelVisible ( VerbosityLevel  level) const
inlineinherited

Definition at line 202 of file system/COutputLogger.h.

References mrpt::system::COutputLogger::m_min_verbosity_level.

Referenced by mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), and mrpt::system::COutputLoggerStreamWrapper::~COutputLoggerStreamWrapper().

Here is the caller graph for this function:

◆ logCond()

void COutputLogger::logCond ( const VerbosityLevel  level,
bool  cond,
const std::string &  msg_str 
) const
inherited

Log the given message only if the condition is satisfied.

See also
log, logFmt

Definition at line 131 of file COutputLogger.cpp.

◆ logDeregisterCallback()

bool COutputLogger::logDeregisterCallback ( output_logger_callback_t  userFunc)
inherited
Returns
true if an entry was found and deleted.

Definition at line 291 of file COutputLogger.cpp.

References getAddress(), and mrpt::system::COutputLogger::m_listCallbacks.

Here is the call graph for this function:

◆ logFmt()

void COutputLogger::logFmt ( const VerbosityLevel  level,
const char *  fmt,
  ... 
) const
inherited

◆ loggerReset()

void COutputLogger::loggerReset ( )
inherited

Reset the contents of the logger instance.

Called upon construction.

Definition at line 206 of file COutputLogger.cpp.

References mrpt::system::LVL_INFO.

◆ logging_levels_to_colors()

std::array< mrpt::system::TConsoleColor, NUMBER_OF_VERBOSITY_LEVELS > & COutputLogger::logging_levels_to_colors ( )
staticinherited

Map from VerbosityLevels to their corresponding mrpt::system::TConsoleColor.

Handy for coloring the input based on the verbosity of the message

Definition at line 47 of file COutputLogger.cpp.

References logging_levels_to_colors.

Referenced by mrpt::system::COutputLogger::TMsg::dumpToConsole().

Here is the caller graph for this function:

◆ logging_levels_to_names()

std::array< std::string, NUMBER_OF_VERBOSITY_LEVELS > & COutputLogger::logging_levels_to_names ( )
staticinherited

Map from VerbosityLevels to their corresponding names.

Handy for printing the current message VerbosityLevel along with the actual content

Definition at line 60 of file COutputLogger.cpp.

References logging_levels_to_names.

Referenced by mrpt::system::COutputLogger::TMsg::getAsString().

Here is the caller graph for this function:

◆ logRegisterCallback()

void COutputLogger::logRegisterCallback ( output_logger_callback_t  userFunc)
inherited

Definition at line 278 of file COutputLogger.cpp.

References mrpt::system::COutputLogger::m_listCallbacks.

◆ logStr()

void COutputLogger::logStr ( const VerbosityLevel  level,
std::string_view  msg_str 
) const
inherited

Main method to add the specified message string to the logger.

See also
logCond, logFmt

Definition at line 72 of file COutputLogger.cpp.

References mrpt::system::COutputLogger::TMsg::body, mrpt::system::COutputLogger::TMsg::dumpToConsole(), mrpt::system::COutputLogger::TMsg::level, mrpt::system::COutputLogger::TMsg::name, and mrpt::system::COutputLogger::TMsg::timestamp.

Referenced by mrpt::slam::PF_implementation< mrpt::math::TPose3D, CMonteCarloLocalization3D, mrpt::bayes::particle_storage_mode::VALUE >::PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal(), mrpt::nav::CReactiveNavigationSystem::STEP1_InitPTGs(), mrpt::system::COutputLoggerStreamWrapper::~COutputLoggerStreamWrapper(), and mrpt::system::CTimeLoggerSaveAtDtor::~CTimeLoggerSaveAtDtor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lowerSpeed()

bool CTuMicos::lowerSpeed ( char  axis,
double  radSec 
)
overridevirtual

Specification of velocity lower limit.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 197 of file CTuMicos.cpp.

◆ lowerSpeedQ()

bool CTuMicos::lowerSpeedQ ( char  axis,
double &  radSec 
)
overridevirtual

Query velocity lower limit.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 208 of file CTuMicos.cpp.

◆ maxPosQ()

bool CTuMicos::maxPosQ ( char  axis,
double &  nRad 
)
overridevirtual

Query max movement limit of a axis in absolute terms.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 95 of file CTuMicos.cpp.

◆ minPosQ()

bool CTuMicos::minPosQ ( char  axis,
double &  nRad 
)
overridevirtual

Query min movement limit of a axis in absolute terms.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 104 of file CTuMicos.cpp.

◆ moveToAbsPos()

bool CTuMicos::moveToAbsPos ( char  axis,
double  nRad 
)
overridevirtual

Specification of positions in absolute terms.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 49 of file CTuMicos.cpp.

References RAD2DEG, and mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ moveToOffPos()

bool CTuMicos::moveToOffPos ( char  axis,
double  nRad 
)
overridevirtual

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.

Definition at line 72 of file CTuMicos.cpp.

References RAD2DEG, and mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ nversion()

void CTuMicos::nversion ( double &  nVersion)
overridevirtual

Number of version.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 346 of file CTuMicos.cpp.

◆ offPosQ()

bool CTuMicos::offPosQ ( char  axis,
double &  nRad 
)
overridevirtual

Query position in relative terms.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 86 of file CTuMicos.cpp.

◆ posToRad()

double CTuMicos::posToRad ( char  axis,
long  nPos 
)
overridevirtual

To obtain the number of radians for a discrete value.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 748 of file CTuMicos.cpp.

◆ powerMode()

bool CTuMicos::powerMode ( bool  transit,
char  mode 
)
overridevirtual

Specification of power mode.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 367 of file CTuMicos.cpp.

◆ powerModeQ()

bool CTuMicos::powerModeQ ( bool  transit,
char &  mode 
)
overridevirtual

Query power mode.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 356 of file CTuMicos.cpp.

◆ radAsign()

bool CTuMicos::radAsign ( char  axis,
char  command,
double  nRad 
)
overrideprivatevirtual

Method used for asign a number of radians with a command.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 709 of file CTuMicos.cpp.

References RAD2DEG, and mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ radError()

double CTuMicos::radError ( char  axis,
double  nRadMoved 
)
overridevirtual

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.

Definition at line 508 of file CTuMicos.cpp.

◆ radQuerry()

bool CTuMicos::radQuerry ( char  axis,
char  command,
double &  nRad 
)
overrideprivatevirtual

Used to obtains a number of radians.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 632 of file CTuMicos.cpp.

References DEG2RAD, mrpt::system::os::sprintf(), and mrpt::system::strtok().

Here is the call graph for this function:

◆ radToPos()

long CTuMicos::radToPos ( char  axis,
double  nRad 
)
overridevirtual

To obtain the discrete value for a number of radians.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 737 of file CTuMicos.cpp.

◆ rangeMeasure()

bool CTuMicos::rangeMeasure ( )
overridevirtual

Search limit forward.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 29 of file CTuMicos.cpp.

References mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ receive()

bool CTuMicos::receive ( const char *  command,
char *  response 
)
overrideprivatevirtual

To receive the responseof the PTU.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 542 of file CTuMicos.cpp.

References mrpt::system::os::strcpy().

Here is the call graph for this function:

◆ reset()

bool CTuMicos::reset ( )
overridevirtual

Reset PTU to initial state.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 282 of file CTuMicos.cpp.

References mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ resolution()

bool CTuMicos::resolution ( )
overridevirtual

Query the pan and tilt resolution per position moved and initialize local atributes.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 616 of file CTuMicos.cpp.

◆ restoreDefaults()

bool CTuMicos::restoreDefaults ( )
overridevirtual

Restore default values.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 313 of file CTuMicos.cpp.

◆ restoreFactoryDefaults()

bool CTuMicos::restoreFactoryDefaults ( )
overridevirtual

Restore factory default values.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 324 of file CTuMicos.cpp.

◆ save()

bool CTuMicos::save ( )
overridevirtual

Save or restart default values.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 302 of file CTuMicos.cpp.

◆ scan()

bool CTuMicos::scan ( char  axis,
int  wait,
float  initial,
float  final,
double  radPre 
)
overridevirtual

Performs a scan in the axis indicated and whit the precision desired.


Parameters
<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.

Definition at line 725 of file CTuMicos.cpp.

◆ setLimits()

bool CTuMicos::setLimits ( char  axis,
double &  l,
double &  u 
)
overridevirtual

Set limits of movement.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 392 of file CTuMicos.cpp.

References mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ setLoggerName()

void COutputLogger::setLoggerName ( const std::string &  name)
inherited

◆ setMinLoggingLevel()

void COutputLogger::setMinLoggingLevel ( const VerbosityLevel  level)
inherited

Set the minimum logging level for which the incoming logs are going to be taken into account.

String messages with specified VerbosityLevel smaller than the min, will not be outputted to the screen and neither will a record of them be stored in by the COutputLogger instance

Definition at line 144 of file COutputLogger.cpp.

Referenced by mrpt::maps::CRandomFieldGridMap2D::enableVerbose(), mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute(), generic_kf_slam_test(), generic_pf_test(), generic_rbpf_slam_test(), mrpt::apps::RawlogGrabberApp::initialize(), mrpt::hwdrivers::CHokuyoURG::initialize(), mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::loadParams(), mrpt::apps::CGridMapAlignerApp::run(), mrpt::apps::RBPF_SLAM_App_Base::run(), and mrpt::apps::ICP_SLAM_App_Base::run().

Here is the caller graph for this function:

◆ setVerbosityLevel()

void COutputLogger::setVerbosityLevel ( const VerbosityLevel  level)
inherited

◆ speed()

bool CTuMicos::speed ( char  axis,
double  radSec 
)
overridevirtual

Specification of turn speed.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 113 of file CTuMicos.cpp.

◆ speedQ()

bool CTuMicos::speedQ ( char  axis,
double &  radSec 
)
overridevirtual

Query turn speed.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 122 of file CTuMicos.cpp.

◆ status()

double CTuMicos::status ( double &  rad)
overridevirtual

Check if ptu is moving.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 627 of file CTuMicos.cpp.

◆ transmit()

bool CTuMicos::transmit ( const char *  command)
overrideprivatevirtual

To transmition commands to the PTU.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 519 of file CTuMicos.cpp.

References mrpt::system::os::strcat(), and mrpt::system::os::strcpy().

Here is the call graph for this function:

◆ upperSpeed()

bool CTuMicos::upperSpeed ( char  axis,
double  radSec 
)
overridevirtual

Specification of velocity upper limit.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 175 of file CTuMicos.cpp.

◆ upperSpeedQ()

bool CTuMicos::upperSpeedQ ( char  axis,
double &  radSec 
)
overridevirtual

Query velocity upper limit.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 186 of file CTuMicos.cpp.

◆ verbose()

bool CTuMicos::verbose ( bool  set)
overridevirtual

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.

Definition at line 583 of file CTuMicos.cpp.

◆ verboseQ()

bool CTuMicos::verboseQ ( bool &  modo)
overridevirtual

Query verbose mode.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 572 of file CTuMicos.cpp.

◆ version()

bool CTuMicos::version ( char *  nVersion)
overridevirtual

Version and CopyRights.

Implements mrpt::hwdrivers::CPtuBase.

Definition at line 335 of file CTuMicos.cpp.

◆ writeLogToFile()

void COutputLogger::writeLogToFile ( const std::string *  fname_in = nullptr) const
inherited

Write the contents of the COutputLogger instance to an external file.

Upon call to this method, COutputLogger dumps the contents of all the logged commands so far to the specified external file. By default the filename is set to ${LOGGERNAME}.log except if the fname parameter is provided

See also
dumpToConsole, getAsString

Definition at line 165 of file COutputLogger.cpp.

References ASSERTMSG_, and mrpt::format().

Here is the call graph for this function:

Member Data Documentation

◆ axis_index

int mrpt::hwdrivers::CTuMicos::axis_index

Definition at line 323 of file CTuMicos.h.

◆ logging_enable_console_output

bool mrpt::system::COutputLogger::logging_enable_console_output {true}
inherited

[Default=true] Set it to false in case you don't want the logged messages to be dumped to the output automatically.

Definition at line 240 of file system/COutputLogger.h.

◆ logging_enable_keep_record

bool mrpt::system::COutputLogger::logging_enable_keep_record {false}
inherited

[Default=false] Enables storing all messages into an internal list.

See also
writeLogToFile, getLogAsString

Definition at line 243 of file system/COutputLogger.h.

◆ m_min_verbosity_level

VerbosityLevel mrpt::system::COutputLogger::m_min_verbosity_level {LVL_INFO}
protectedinherited

Provided messages with VerbosityLevel smaller than this value shall be ignored.

Definition at line 253 of file system/COutputLogger.h.

Referenced by mrpt::system::COutputLogger::getMinLoggingLevel(), and mrpt::system::COutputLogger::isLoggingLevelVisible().

◆ panResolution

double mrpt::hwdrivers::CPtuBase::panResolution
inherited

Definition at line 25 of file CPtuBase.h.

◆ serPort

mrpt::comms::CSerialPort mrpt::hwdrivers::CPtuBase::serPort
protectedinherited

Definition at line 28 of file CPtuBase.h.

◆ tiltResolution

double mrpt::hwdrivers::CPtuBase::tiltResolution
inherited

Definition at line 25 of file CPtuBase.h.




Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020