MRPT
2.0.1
|
A class capable of reading GPS/GNSS/GNSS+IMU receiver data, from a serial port or from any input stream, and parsing the ASCII/binary stream into indivual messages stored in mrpt::obs::CObservationGPS objects.
Typical input streams are serial ports or raw GPS log files. By default, the serial port selected by CGPSInterface::setSerialPortName() or as set in the configuration file will be open upon call to CGenericSensor::initialize(). Alternatively, an external stream can be bound with CGPSInterface::bindStream() before calling CGenericSensor::initialize(). This feature can be used to parse commands from a file, a TCP/IP stream, a memory block, etc.
The parsers in the enum type CGPSInterface::PARSERS are supported as parameter parser
in the configuration file below or in method CGPSInterface::setParser():
NONE
: Do not try to parse the messages into CObservation's. Only useful if combined with raw_dump_file_prefix
AUTO
: Try to automatically identify the format of incomming data.NMEA
(NMEA 0183, ASCII messages): Default parser. Supported frames: GGA, RMC,... See full list of messages in children of mrpt::obs::gnss::gnss_messageNOVATEL_OEM6
(Novatel OEM6, binary frames): Supported frames: BESTPOS,... Note that receiving a correct IONUTC msg is required for a correct timestamping of subsequent frames. See full list of messages in children of mrpt::obs::gnss::gnss_messageSee available parameters below, and an example config file for rawlog-grabber here
Note that the customInit
field, supported in MRPT <1.4.0 will be still parsed and obeyed, but since it has been superseded by the new mechanism to establish set-up commands, it is no further documented here.
The next picture summarizes existing MRPT classes related to GPS / GNSS devices (CGPSInterface, CNTRIPEmitter, CGPS_NTRIP):
VERSIONS HISTORY:
01/FEB/2016: API changed for MTPT 1.4.0
Definition at line 142 of file CGPSInterface.h.
#include <mrpt/hwdrivers/CGPSInterface.h>
Public Types | |
enum | PARSERS { NONE = -2, AUTO = -1, NMEA = 0, NOVATEL_OEM6 } |
Read about parser selection in the documentation for CGPSInterface. More... | |
using | ptr_parser_t = bool(CGPSInterface::*)(size_t &out_minimum_rx_buf_to_decide) |
enum | TSensorState { ssInitializing = 0, ssWorking, ssError, ssUninitialized } |
The current state of the sensor. More... | |
using | Ptr = std::shared_ptr< CGenericSensor > |
using | TListObservations = std::multimap< mrpt::system::TTimeStamp, mrpt::serialization::CSerializable::Ptr > |
using | TListObsPair = std::pair< mrpt::system::TTimeStamp, mrpt::serialization::CSerializable::Ptr > |
Public Member Functions | |
CGPSInterface () | |
Default ctor. More... | |
~CGPSInterface () override | |
Dtor. More... | |
void | doProcess () override |
This method will be invoked at a minimum rate of "process_rate" (Hz) More... | |
bool | isGPS_connected () |
Returns true if communications work, i.e. More... | |
bool | isGPS_signalAcquired () |
Returns true if the last message from the GPS indicates that the signal from sats has been acquired. More... | |
bool | isAIMConfigured () |
std::string | getLastGGA (bool reset=true) |
Gets the latest GGA command or an empty string if no newer GGA command was received since the last call to this method. More... | |
virtual const mrpt::hwdrivers::TSensorClassId * | GetRuntimeClass () const =0 |
TSensorState | getState () const |
The current state of the sensor. More... | |
double | getProcessRate () const |
std::string | getSensorLabel () const |
void | setSensorLabel (const std::string &sensorLabel) |
void | enableVerbose (bool enabled=true) |
Enable or disable extra debug info dumped to std::cout during sensor operation. More... | |
bool | isVerboseEnabled () const |
void | loadConfig (const mrpt::config::CConfigFileBase &configSource, const std::string §ion) |
Loads the generic settings common to any sensor (See CGenericSensor), then call to "loadConfig_sensorSpecific". More... | |
virtual void | initialize () |
This method can or cannot be implemented in the derived class, depending on the need for it. More... | |
void | getObservations (TListObservations &lstObjects) |
Returns a list of enqueued objects, emptying it (thread-safe). More... | |
virtual void | setPathForExternalImages ([[maybe_unused]] const std::string &directory) |
Set the path where to save off-rawlog image files (will be ignored in those sensors where this is not applicable). More... | |
void | setExternalImageFormat (const std::string &ext) |
Set the extension ("jpg","gif","png",...) that determines the format of images saved externally The default is "jpg". More... | |
void | setExternalImageJPEGQuality (const unsigned int quality) |
The quality of JPEG compression, when external images is enabled and the format is "jpg". More... | |
unsigned int | getExternalImageJPEGQuality () const |
Set-up and configuration | |
void | setSerialPortName (const std::string &COM_port) |
Set the serial port to use (COM1, ttyUSB0, etc). More... | |
std::string | getSerialPortName () const |
Get the serial port to use (COM1, ttyUSB0, etc). More... | |
void | setParser (PARSERS parser) |
Select the parser for incomming data, among the options enumerated in CGPSInterface. More... | |
PARSERS | getParser () const |
void | bindStream (const std::shared_ptr< mrpt::io::CStream > &external_stream, const std::shared_ptr< std::mutex > &csOptionalExternalStream=std::shared_ptr< std::mutex >()) |
This enforces the use of a given user stream, instead of trying to open the serial port set in this class parameters. More... | |
bool | useExternalStream () const |
void | setSetupCommandsDelay (const double delay_secs) |
double | getSetupCommandsDelay () const |
void | setSetupCommands (const std::vector< std::string > &cmds) |
const std::vector< std::string > & | getSetupCommands () const |
void | setShutdownCommands (const std::vector< std::string > &cmds) |
const std::vector< std::string > & | getShutdownCommands () const |
void | enableSetupCommandsAppendCRLF (const bool enable) |
bool | isEnabledSetupCommandsAppendCRLF () const |
void | enableAppendMsgTypeToSensorLabel (bool enable) |
void | setRawDumpFilePrefix (const std::string &filePrefix) |
If set to non-empty, RAW GPS serial data will be also dumped to a separate file. More... | |
std::string | getRawDumpFilePrefix () const |
bool | sendCustomCommand (const void *data, const size_t datalen) |
Send a custom data block to the GNSS device right now. More... | |
Parser implementations: each method must try to parse the first | |
bytes in the incoming buffer, and return false if the available data does not match the expected format, so we must skip 1 byte and try again. | |
bool | implement_parser_NMEA (size_t &out_minimum_rx_buf_to_decide) |
bool | implement_parser_NOVATEL_OEM6 (size_t &out_minimum_rx_buf_to_decide) |
Static Public Member Functions | |
static bool | parse_NMEA (const std::string &cmd_line, mrpt::obs::CObservationGPS &out_obs, const bool verbose=false) |
Parses one line of NMEA data from a GPS receiver, and writes the recognized fields (if any) into an observation object. More... | |
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... | |
static void | registerClass (const TSensorClassId *pNewClass) |
Register a class into the internal list of "CGenericSensor" descendents. More... | |
static CGenericSensor * | createSensor (const std::string &className) |
Creates a sensor by a name of the class. More... | |
static Ptr | createSensorPtr (const std::string &className) |
Just like createSensor, but returning a smart pointer to the newly created sensor object. More... | |
Protected Member Functions | |
bool | OnConnectionEstablished () |
Implements custom messages to be sent to the GPS unit just after connection and before normal use. More... | |
bool | OnConnectionShutdown () |
Like OnConnectionEstablished() for sending optional shutdown commands. More... | |
bool | legacy_topcon_setup_commands () |
void | loadConfig_sensorSpecific (const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection) override |
See the class documentation at the top for expected parameters. More... | |
void | setJAVAD_rtk_src_port (const std::string &s) |
If not empty, will send a cmd "set,/par/pos/pd/port,...". More... | |
void | setJAVAD_rtk_src_baud (unsigned int baud) |
Only used when "m_JAVAD_rtk_src_port" is not empty. More... | |
void | setJAVAD_rtk_format (const std::string &s) |
Only used when "m_JAVAD_rtk_src_port" is not empty: format of RTK corrections: "cmr", "rtcm", "rtcm3", etc. More... | |
bool | setJAVAD_AIM_mode () |
Set Advanced Input Mode for the primary port. More... | |
bool | unsetJAVAD_AIM_mode () |
Unset Advanced Input Mode for the primary port and use it only as a command port. More... | |
void | appendObservations (const std::vector< mrpt::serialization::CSerializable::Ptr > &obj) |
This method must be called by derived classes to enqueue a new observation in the list to be returned by getObservations. More... | |
void | appendObservation (const mrpt::serialization::CSerializable::Ptr &obj) |
Like appendObservations() but for just one observation. More... | |
Protected Attributes | |
std::shared_ptr< mrpt::io::CStream > | m_data_stream |
Typically a CSerialPort created by this class, but may be set externally. More... | |
std::shared_ptr< std::mutex > | m_data_stream_cs |
std::shared_ptr< std::mutex > | m_data_stream_mine_cs |
bool | m_data_stream_is_external {false} |
poses::CPose3D | m_sensorPose |
std::string | m_customInit |
VerbosityLevel | m_min_verbosity_level {LVL_INFO} |
Provided messages with VerbosityLevel smaller than this value shall be ignored. More... | |
size_t | m_grab_decimation_counter {0} |
Used when "m_grab_decimation" is enabled. More... | |
TSensorState | m_state {ssInitializing} |
bool | m_verbose {false} |
std::string | m_path_for_external_images |
The path where to save off-rawlog images: empty means save images embedded in the rawlog. More... | |
std::string | m_external_images_format |
The extension ("jpg","gif","png",...) that determines the format of images saved externally. More... | |
unsigned int | m_external_images_jpeg_quality {95} |
For JPEG images, the quality (default=95%). More... | |
Common settings to any sensor, loaded in "loadConfig" | |
double | m_process_rate {0} |
See CGenericSensor. More... | |
size_t | m_max_queue_len {200} |
See CGenericSensor. More... | |
size_t | m_grab_decimation {0} |
If set to N>=2, only 1 out of N observations will be saved to m_objList. More... | |
std::string | m_sensorLabel |
See CGenericSensor. More... | |
Private Member Functions | |
bool | tryToOpenTheCOM () |
Returns true if the COM port is already open, or try to open it in other case. More... | |
void | parseBuffer () |
Process data in "m_buffer" to extract GPS messages, and remove them from the buffer. More... | |
void | flushParsedMessagesNow () |
Queue out now the messages in m_just_parsed_messages, leaving it empty. More... | |
Private Attributes | |
mrpt::containers::circular_buffer< uint8_t > | m_rx_buffer |
Auxiliary buffer for readings. More... | |
PARSERS | m_parser {CGPSInterface::AUTO} |
std::string | m_raw_dump_file_prefix |
std::string | m_COMname |
int | m_COMbauds {4800} |
bool | m_sensorLabelAppendMsgType {true} |
bool | m_GPS_comsWork {false} |
mrpt::system::TTimeStamp | m_last_timestamp |
mrpt::io::CFileOutputStream | m_raw_output_file |
double | m_custom_cmds_delay {0.1} |
bool | m_custom_cmds_append_CRLF {true} |
std::vector< std::string > | m_setup_cmds |
std::vector< std::string > | m_shutdown_cmds |
mrpt::obs::CObservationGPS | m_just_parsed_messages |
A private copy of the last received gps datum. More... | |
std::string | m_last_GGA |
Used in getLastGGA() More... | |
Legacy support for TopCon RTK configuration | |
std::string | m_JAVAD_rtk_src_port |
If not empty, will send a cmd "set,/par/pos/pd/port,...". More... | |
unsigned int | m_JAVAD_rtk_src_baud {0} |
Only used when "m_JAVAD_rtk_src_port" is not empty. More... | |
std::string | m_JAVAD_rtk_format |
Only used when "m_JAVAD_rtk_src_port" is not empty: format of RTK corrections: "cmr", "rtcm", "rtcm3", etc. More... | |
bool | m_topcon_useAIMMode {false} |
Use this mode for receive RTK corrections from a external source through the primary port. More... | |
bool | m_topcon_AIMConfigured {false} |
Indicates if the AIM has been properly set up. More... | |
double | m_topcon_data_period {0.2} |
The period in seconds which the data should be provided by the GPS. More... | |
void | JAVAD_sendMessage (const char *str, bool waitForAnswer=true) |
Private auxiliary method. More... | |
Logging methods | |
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) |
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... | |
|
inherited |
Definition at line 73 of file CGenericSensor.h.
using mrpt::hwdrivers::CGPSInterface::ptr_parser_t = bool (CGPSInterface::*)(size_t& out_minimum_rx_buf_to_decide) |
Definition at line 246 of file CGPSInterface.h.
|
inherited |
Definition at line 77 of file CGenericSensor.h.
|
inherited |
Definition at line 79 of file CGenericSensor.h.
Read about parser selection in the documentation for CGPSInterface.
Enumerator | |
---|---|
NONE | |
AUTO | |
NMEA | |
NOVATEL_OEM6 |
Definition at line 148 of file CGPSInterface.h.
|
inherited |
The current state of the sensor.
Enumerator | |
---|---|
ssInitializing | |
ssWorking | |
ssError | |
ssUninitialized |
Definition at line 84 of file CGenericSensor.h.
CGPSInterface::CGPSInterface | ( | ) |
Default ctor.
Definition at line 51 of file CGPSInterface.cpp.
References mrpt::hwdrivers::CGenericSensor::m_sensorLabel.
|
override |
Dtor.
Definition at line 142 of file CGPSInterface.cpp.
References OnConnectionShutdown().
|
inlineprotectedinherited |
Like appendObservations() but for just one observation.
Definition at line 180 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::appendObservations().
Referenced by mrpt::hwdrivers::CIMUXSens_MT4::doProcess(), mrpt::hwdrivers::CIMUXSens::doProcess(), mrpt::hwdrivers::CGyroKVHDSP3000::doProcess(), mrpt::hwdrivers::CSkeletonTracker::doProcess(), mrpt::hwdrivers::CSwissRanger3DCamera::doProcess(), mrpt::hwdrivers::C2DRangeFinderAbstract::doProcess(), mrpt::hwdrivers::CCANBusReader::doProcess(), mrpt::hwdrivers::CVelodyneScanner::doProcess(), and flushParsedMessagesNow().
|
protectedinherited |
This method must be called by derived classes to enqueue a new observation in the list to be returned by getObservations.
Passed objects must be created in dynamic memory and a smart pointer passed. Example of creation:
If several observations are passed at once in the vector, they'll be considered as a block regarding the grabbing decimation factor.
Definition at line 48 of file CGenericSensor.cpp.
References CLASS_ID, mrpt::hwdrivers::CGenericSensor::m_csObjList, mrpt::hwdrivers::CGenericSensor::m_grab_decimation, mrpt::hwdrivers::CGenericSensor::m_grab_decimation_counter, mrpt::hwdrivers::CGenericSensor::m_objList, and THROW_EXCEPTION.
Referenced by mrpt::hwdrivers::CGenericSensor::appendObservation(), mrpt::hwdrivers::CNationalInstrumentsDAQ::doProcess(), and mrpt::hwdrivers::CKinect::doProcess().
void CGPSInterface::bindStream | ( | const std::shared_ptr< mrpt::io::CStream > & | external_stream, |
const std::shared_ptr< std::mutex > & | csOptionalExternalStream = std::shared_ptr<std::mutex>() |
||
) |
This enforces the use of a given user stream, instead of trying to open the serial port set in this class parameters.
[in] | csExternalStream | If not NULL, read/write operations to the stream will be guarded by this critical section. The stream object is not deleted. It is the user responsibility to keep that object allocated during the entire life of this object. |
Definition at line 149 of file CGPSInterface.cpp.
References m_data_stream, m_data_stream_cs, m_data_stream_is_external, and m_data_stream_mine_cs.
Referenced by TEST().
|
staticinherited |
Creates a sensor by a name of the class.
Typically the user may want to create a smart pointer around the returned pointer, whis is made with:
Definition at line 97 of file CGenericSensor.cpp.
References mrpt::hwdrivers::CGenericSensor::get_registered_sensor_classes().
Referenced by mrpt::hwdrivers::CGenericSensor::createSensorPtr().
|
inlinestaticinherited |
Just like createSensor, but returning a smart pointer to the newly created sensor object.
Definition at line 210 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::createSensor().
Referenced by mrpt::apps::RawlogGrabberApp::SensorThread().
|
overridevirtual |
This method will be invoked at a minimum rate of "process_rate" (Hz)
This | method must throw an exception with a descriptive message if some critical error is found. |
Implements mrpt::hwdrivers::CGenericSensor.
Definition at line 280 of file CGPSInterface.cpp.
References ASSERT_, mrpt::containers::circular_buffer< T >::available(), mrpt::system::TTimeParts::day, mrpt::system::fileNameStripInvalidChars(), mrpt::io::CFileOutputStream::fileOpenCorrectly(), flushParsedMessagesNow(), mrpt::format(), mrpt::obs::CObservationGPS::has_GGA_datum(), mrpt::obs::CObservationGPS::has_RMC_datum(), mrpt::system::TTimeParts::hour, INVALID_TIMESTAMP, m_customInit, m_data_stream, m_data_stream_cs, m_GPS_comsWork, m_just_parsed_messages, m_last_timestamp, m_raw_dump_file_prefix, m_raw_output_file, m_rx_buffer, mrpt::hwdrivers::CGenericSensor::m_state, m_topcon_data_period, mrpt::hwdrivers::CGenericSensor::m_verbose, mrpt::system::TTimeParts::minute, mrpt::system::TTimeParts::month, MRPT_LOG_ERROR, mrpt::system::now(), mrpt::io::CFileOutputStream::open(), parseBuffer(), mrpt::containers::circular_buffer< T >::push_many(), mrpt::system::TTimeParts::second, mrpt::hwdrivers::CGenericSensor::ssError, THROW_EXCEPTION, mrpt::system::timeDifference(), mrpt::obs::CObservation::timestamp, mrpt::system::timestampToParts(), mrpt::system::timeToString(), tryToOpenTheCOM(), mrpt::io::CFileOutputStream::Write(), and mrpt::system::TTimeParts::year.
Referenced by TEST().
|
inherited |
Dump the current contents of the COutputLogger instance in the terminal window.
Definition at line 190 of file COutputLogger.cpp.
|
inline |
Definition at line 208 of file CGPSInterface.h.
References m_sensorLabelAppendMsgType.
void CGPSInterface::enableSetupCommandsAppendCRLF | ( | const bool | enable | ) |
Definition at line 182 of file CGPSInterface.cpp.
References m_custom_cmds_append_CRLF.
|
inlineinherited |
Enable or disable extra debug info dumped to std::cout during sensor operation.
Default: disabled unless the environment variable "MRPT_HWDRIVERS_VERBOSE" is set to "1" during object creation.
Definition at line 106 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::m_verbose.
|
private |
Queue out now the messages in m_just_parsed_messages, leaving it empty.
Definition at line 431 of file CGPSInterface.cpp.
References mrpt::hwdrivers::CGenericSensor::appendObservation(), mrpt::obs::CObservationGPS::clear(), m_GPS_comsWork, m_just_parsed_messages, m_last_timestamp, mrpt::hwdrivers::CGenericSensor::m_sensorLabel, m_sensorLabelAppendMsgType, m_sensorPose, mrpt::hwdrivers::CGenericSensor::m_state, mrpt::obs::CObservation::sensorLabel, mrpt::obs::CObservationGPS::sensorPose, mrpt::hwdrivers::CGenericSensor::ssWorking, mrpt::obs::CObservationGPS::swap(), and mrpt::obs::CObservation::timestamp.
Referenced by doProcess(), and parseBuffer().
|
inlineinherited |
Definition at line 279 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::m_external_images_jpeg_quality.
std::string CGPSInterface::getLastGGA | ( | bool | reset = true | ) |
Gets the latest GGA command or an empty string if no newer GGA command was received since the last call to this method.
[in] | reset | If set to true, will empty the GGA cache so next calls will return an empty string if no new frame is received. |
Definition at line 769 of file CGPSInterface.cpp.
References m_last_GGA.
|
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.
|
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().
|
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().
|
inherited |
Fill inputtted string with the contents of the last message in history.
Definition at line 201 of file COutputLogger.cpp.
|
inherited |
Return the name of the COutputLogger instance.
Definition at line 143 of file COutputLogger.cpp.
|
inlineinherited |
Definition at line 201 of file system/COutputLogger.h.
References mrpt::system::COutputLogger::m_min_verbosity_level.
Referenced by mrpt::apps::RawlogGrabberApp::dump_verbose_info(), mrpt::maps::CRandomFieldGridMap2D::isEnabledVerbose(), mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), mrpt::apps::CGridMapAlignerApp::run(), mrpt::apps::RBPF_SLAM_App_Base::run(), and mrpt::apps::ICP_SLAM_App_Base::run().
|
inherited |
Returns a list of enqueued objects, emptying it (thread-safe).
The objects must be freed by the invoker.
Definition at line 85 of file CGenericSensor.cpp.
References mrpt::hwdrivers::CGenericSensor::m_csObjList, and mrpt::hwdrivers::CGenericSensor::m_objList.
Referenced by TEST().
CGPSInterface::PARSERS CGPSInterface::getParser | ( | ) | const |
Definition at line 148 of file CGPSInterface.cpp.
References m_parser.
|
inlineinherited |
Definition at line 94 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::m_process_rate.
|
inline |
Definition at line 219 of file CGPSInterface.h.
References m_raw_dump_file_prefix.
|
pure virtualinherited |
|
inlineinherited |
Definition at line 95 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::m_sensorLabel.
std::string CGPSInterface::getSerialPortName | ( | ) | const |
Get the serial port to use (COM1, ttyUSB0, etc).
Definition at line 219 of file CGPSInterface.cpp.
References m_COMname.
const std::vector< std::string > & CGPSInterface::getSetupCommands | ( | ) | const |
Definition at line 170 of file CGPSInterface.cpp.
References m_setup_cmds.
double CGPSInterface::getSetupCommandsDelay | ( | ) | const |
Definition at line 162 of file CGPSInterface.cpp.
References m_custom_cmds_delay.
const std::vector< std::string > & CGPSInterface::getShutdownCommands | ( | ) | const |
Definition at line 178 of file CGPSInterface.cpp.
References m_shutdown_cmds.
|
inlineinherited |
The current state of the sensor.
Definition at line 93 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::m_state.
bool CGPSInterface::implement_parser_NMEA | ( | size_t & | out_minimum_rx_buf_to_decide | ) |
Definition at line 24 of file CGPSInterface_parser_NMEA.cpp.
References MAX_NMEA_LINE_LENGTH, parse_NMEA(), and val.
Referenced by parseBuffer(), and TParsersRegistry::TParsersRegistry().
bool CGPSInterface::implement_parser_NOVATEL_OEM6 | ( | size_t & | out_minimum_rx_buf_to_decide | ) |
Definition at line 23 of file CGPSInterface_parser_NOVATEL_OEM6.cpp.
References mrpt::serialization::archiveFrom(), mrpt::system::compute_CRC32(), mrpt::obs::gnss::nv_oem6_header_t::fixEndianness(), mrpt::obs::gnss::nv_oem6_short_header_t::fixEndianness(), mrpt::obs::gnss::gnss_message_ptr::get(), mrpt::obs::gnss::gnss_message::getMessageTypeAsString(), mrpt::obs::gnss::gnss_message::message_type, mrpt::obs::gnss::nv_oem6_header_t::ms_in_week, mrpt::obs::gnss::nv_oem6_short_header_t::ms_in_week, mrpt::obs::gnss::nv_oem6_header_t::msg_id, mrpt::obs::gnss::nv_oem6_short_header_t::msg_id, mrpt::obs::gnss::nv_oem6_header_t::msg_len, mrpt::obs::gnss::nv_oem6_short_header_t::msg_len, mrpt::system::now(), mrpt::obs::gnss::NV_OEM6_GENERIC_FRAME, mrpt::obs::gnss::NV_OEM6_GENERIC_SHORT_FRAME, mrpt::obs::gnss::NV_OEM6_MSG2ENUM, mrpt::io::CMemoryStream::Seek(), mrpt::obs::gnss::nv_oem6_header_t::week, and mrpt::obs::gnss::nv_oem6_short_header_t::week.
Referenced by parseBuffer(), and TParsersRegistry::TParsersRegistry().
|
inlinevirtualinherited |
This method can or cannot be implemented in the derived class, depending on the need for it.
This | method must throw an exception with a descriptive message if some critical error is found. |
Reimplemented in mrpt::hwdrivers::CCameraSensor, mrpt::hwdrivers::CVelodyneScanner, mrpt::hwdrivers::CKinect, mrpt::hwdrivers::COpenNI2Sensor, mrpt::hwdrivers::COpenNI2_RGBD360, mrpt::hwdrivers::CNationalInstrumentsDAQ, mrpt::hwdrivers::CSickLaserSerial, mrpt::hwdrivers::CCANBusReader, mrpt::hwdrivers::CHokuyoURG, mrpt::hwdrivers::CBoardENoses, mrpt::hwdrivers::CPhidgetInterfaceKitProximitySensors, mrpt::hwdrivers::CSkeletonTracker, mrpt::hwdrivers::CLMS100Eth, mrpt::hwdrivers::CSwissRanger3DCamera, mrpt::hwdrivers::CGyroKVHDSP3000, mrpt::hwdrivers::CIMUIntersense, mrpt::hwdrivers::CNTRIPEmitter, mrpt::hwdrivers::CIMUXSens, mrpt::hwdrivers::CIMUXSens_MT4, mrpt::hwdrivers::CGPS_NTRIP, mrpt::hwdrivers::CImpinjRFID, mrpt::hwdrivers::CSICKTim561Eth, mrpt::hwdrivers::CIbeoLuxETH, and mrpt::hwdrivers::CRoboPeakLidar.
Definition at line 238 of file CGenericSensor.h.
Referenced by TEST().
|
inline |
Definition at line 226 of file CGPSInterface.h.
References m_topcon_AIMConfigured.
bool CGPSInterface::isEnabledSetupCommandsAppendCRLF | ( | ) | const |
Definition at line 186 of file CGPSInterface.cpp.
References m_custom_cmds_append_CRLF.
bool CGPSInterface::isGPS_connected | ( | ) |
Returns true if communications work, i.e.
if some message has been received.
Definition at line 276 of file CGPSInterface.cpp.
References m_GPS_comsWork.
bool mrpt::hwdrivers::CGPSInterface::isGPS_signalAcquired | ( | ) |
Returns true if the last message from the GPS indicates that the signal from sats has been acquired.
|
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().
|
inlineinherited |
Definition at line 107 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::m_verbose.
|
private |
Private auxiliary method.
Raises exception on error.
Definition at line 522 of file CGPSInterface.cpp.
References mrpt::format(), m_data_stream, m_data_stream_cs, and mrpt::hwdrivers::CGenericSensor::m_verbose.
Referenced by legacy_topcon_setup_commands(), setJAVAD_AIM_mode(), and unsetJAVAD_AIM_mode().
|
protected |
Definition at line 776 of file CGPSInterface.cpp.
References mrpt::format(), JAVAD_sendMessage(), m_data_stream, m_data_stream_cs, m_JAVAD_rtk_format, m_JAVAD_rtk_src_baud, m_JAVAD_rtk_src_port, m_topcon_AIMConfigured, m_topcon_data_period, m_topcon_useAIMMode, mrpt::hwdrivers::CGenericSensor::m_verbose, setJAVAD_AIM_mode(), and mrpt::system::strCmp().
Referenced by OnConnectionEstablished().
|
inherited |
Loads the generic settings common to any sensor (See CGenericSensor), then call to "loadConfig_sensorSpecific".
This | method throws an exception with a descriptive message if some critical parameter is missing or has an invalid value. |
Definition at line 126 of file CGenericSensor.cpp.
References mrpt::hwdrivers::CGenericSensor::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGenericSensor::m_grab_decimation, mrpt::hwdrivers::CGenericSensor::m_grab_decimation_counter, mrpt::hwdrivers::CGenericSensor::m_max_queue_len, mrpt::hwdrivers::CGenericSensor::m_process_rate, mrpt::hwdrivers::CGenericSensor::m_sensorLabel, MRPT_END, MRPT_START, mrpt::config::CConfigFileBase::read_double(), mrpt::config::CConfigFileBase::read_int(), mrpt::config::CConfigFileBase::read_string(), and sect.
|
overrideprotectedvirtual |
See the class documentation at the top for expected parameters.
Implements mrpt::hwdrivers::CGenericSensor.
Definition at line 67 of file CGPSInterface.cpp.
References mrpt::DEG2RAD(), mrpt::format(), m_COMbauds, m_COMname, m_custom_cmds_append_CRLF, m_custom_cmds_delay, m_customInit, m_JAVAD_rtk_format, m_JAVAD_rtk_src_baud, m_JAVAD_rtk_src_port, m_parser, m_raw_dump_file_prefix, m_sensorLabelAppendMsgType, m_sensorPose, m_setup_cmds, m_shutdown_cmds, m_topcon_data_period, m_topcon_useAIMMode, mrpt::config::CConfigFileBase::read_bool(), mrpt::config::CConfigFileBase::read_double(), mrpt::config::CConfigFileBase::read_enum(), mrpt::config::CConfigFileBase::read_float(), mrpt::config::CConfigFileBase::read_int(), mrpt::config::CConfigFileBase::read_string(), mrpt::poses::CPose3D::setFromValues(), and mrpt::system::trim().
|
inherited |
Log the given message only if the condition is satisfied.
Definition at line 131 of file COutputLogger.cpp.
|
inherited |
Definition at line 291 of file COutputLogger.cpp.
References getAddress(), and mrpt::system::COutputLogger::m_listCallbacks.
|
inherited |
Alternative logging method, which mimics the printf behavior.
Handy for not having to first use mrpt::format to pass a std::string message to logStr
Definition at line 91 of file COutputLogger.cpp.
Referenced by mrpt::hmtslam::CHMTSLAM::areaAbstraction(), mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::CICPCriteriaNRD(), mrpt::hmtslam::CTopLCDetector_GridMatching::computeTopologicalObservationModel(), CGraphSlamHandler< GRAPH_T >::execute(), mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute(), CGraphSlamHandler< GRAPH_T >::initOutputDir(), CGraphSlamHandler< GRAPH_T >::initVisualization(), mrpt::nav::CNavigatorManualSequence::navigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), CGraphSlamHandler< GRAPH_T >::readConfigFname(), CGraphSlamHandler< GRAPH_T >::saveResults(), CGraphSlamHandler< GRAPH_T >::setResultsDirName(), mrpt::nav::CReactiveNavigationSystem::STEP1_InitPTGs(), mrpt::hmtslam::CHMTSLAM::thread_3D_viewer(), mrpt::hmtslam::CHMTSLAM::thread_LSLAM(), mrpt::hmtslam::CHMTSLAM::thread_TBI(), and CGraphSlamHandler< GRAPH_T >::~CGraphSlamHandler().
|
inherited |
Reset the contents of the logger instance.
Called upon construction.
Definition at line 206 of file COutputLogger.cpp.
References mrpt::system::LVL_INFO.
|
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().
|
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().
|
inherited |
Definition at line 278 of file COutputLogger.cpp.
References mrpt::system::COutputLogger::m_listCallbacks.
|
inherited |
Main method to add the specified message string to the logger.
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().
|
protected |
Implements custom messages to be sent to the GPS unit just after connection and before normal use.
Returns false or raise an exception if something goes wrong.
Definition at line 608 of file CGPSInterface.cpp.
References mrpt::system::os::_strcmpi(), mrpt::obs::CObservationGPS::clear(), legacy_topcon_setup_commands(), m_custom_cmds_append_CRLF, m_custom_cmds_delay, m_customInit, m_data_stream, m_data_stream_cs, m_just_parsed_messages, m_last_GGA, m_setup_cmds, and mrpt::hwdrivers::CGenericSensor::m_verbose.
Referenced by tryToOpenTheCOM().
|
protected |
Like OnConnectionEstablished() for sending optional shutdown commands.
Definition at line 574 of file CGPSInterface.cpp.
References m_custom_cmds_append_CRLF, m_custom_cmds_delay, m_data_stream, m_data_stream_cs, m_shutdown_cmds, and mrpt::hwdrivers::CGenericSensor::m_verbose.
Referenced by ~CGPSInterface().
|
static |
Parses one line of NMEA data from a GPS receiver, and writes the recognized fields (if any) into an observation object.
Recognized frame types are those listed for the NMEA
parser in the documentation of CGPSInterface
Definition at line 109 of file CGPSInterface_parser_NMEA.cpp.
References mrpt::obs::gnss::Message_NMEA_GGA::content_t::altitude_meters, mrpt::obs::gnss::Message_NMEA_GSA::content_t::auto_selection_fix, mrpt::obs::gnss::Message_NMEA_GGA::content_t::corrected_orthometric_altitude, mrpt::opengl::internal::data, mrpt::obs::gnss::Message_NMEA_RMC::content_t::date_day, mrpt::obs::gnss::Message_NMEA_ZDA::content_t::date_day, mrpt::obs::gnss::Message_NMEA_RMC::content_t::date_month, mrpt::obs::gnss::Message_NMEA_ZDA::content_t::date_month, mrpt::obs::gnss::Message_NMEA_RMC::content_t::date_year, mrpt::obs::gnss::Message_NMEA_ZDA::content_t::date_year, mrpt::obs::gnss::Message_NMEA_RMC::content_t::direction_degrees, mrpt::obs::gnss::Message_NMEA_GGA::fields, mrpt::obs::gnss::Message_NMEA_GLL::fields, mrpt::obs::gnss::Message_NMEA_RMC::fields, mrpt::obs::gnss::Message_NMEA_VTG::fields, mrpt::obs::gnss::Message_NMEA_GSA::fields, mrpt::obs::gnss::Message_NMEA_ZDA::fields, mrpt::obs::gnss::Message_NMEA_GSA::content_t::fix_2D_3D, mrpt::obs::gnss::Message_NMEA_GGA::content_t::fix_quality, for(), mrpt::obs::gnss::Message_NMEA_GGA::content_t::geoidal_distance, mrpt::obs::gnss::UTC_time::getAsTimestamp(), mrpt::obs::gnss::Message_NMEA_RMC::getDateAsTimestamp(), mrpt::obs::gnss::Message_NMEA_ZDA::getDateAsTimestamp(), mrpt::obs::gnss::Message_NMEA_ZDA::getDateTimeAsTimestamp(), mrpt::obs::gnss::Message_NMEA_VTG::content_t::ground_speed_kmh, mrpt::obs::gnss::Message_NMEA_VTG::content_t::ground_speed_knots, mrpt::obs::CObservationGPS::has_satellite_timestamp, mrpt::obs::gnss::Message_NMEA_GGA::content_t::HDOP, mrpt::obs::gnss::Message_NMEA_GSA::content_t::HDOP, mrpt::obs::gnss::UTC_time::hour, mrpt::obs::gnss::lat, mrpt::obs::gnss::Message_NMEA_GGA::content_t::latitude_degrees, mrpt::obs::gnss::Message_NMEA_GLL::content_t::latitude_degrees, mrpt::obs::gnss::Message_NMEA_RMC::content_t::latitude_degrees, mrpt::obs::gnss::Message_NMEA_GGA::content_t::longitude_degrees, mrpt::obs::gnss::Message_NMEA_GLL::content_t::longitude_degrees, mrpt::obs::gnss::Message_NMEA_RMC::content_t::longitude_degrees, mrpt::obs::gnss::Message_NMEA_RMC::content_t::magnetic_dir, mrpt::obs::gnss::Message_NMEA_VTG::content_t::magnetic_track, mrpt::obs::gnss::UTC_time::minute, mrpt::system::now(), mrpt::obs::CObservationGPS::originalReceivedTimestamp, mrpt::obs::gnss::Message_NMEA_GGA::content_t::orthometric_altitude, mrpt::obs::gnss::Message_NMEA_GSA::content_t::PDOP, mrpt::obs::gnss::Message_NMEA_RMC::content_t::positioning_mode, mrpt::obs::gnss::Message_NMEA_GSA::content_t::PRNs, mrpt::obs::gnss::Message_NMEA_GGA::content_t::satellitesUsed, mrpt::obs::gnss::UTC_time::sec, mrpt::obs::CObservationGPS::setMsg(), mrpt::math::size(), mrpt::obs::gnss::Message_NMEA_RMC::content_t::speed_knots, mrpt::obs::gnss::Message_NMEA_GGA::content_t::thereis_HDOP, mrpt::obs::CObservation::timestamp, mrpt::system::tokenize(), mrpt::system::trim(), mrpt::obs::gnss::Message_NMEA_VTG::content_t::true_track, mrpt::obs::gnss::Message_NMEA_GGA::content_t::UTCTime, mrpt::obs::gnss::Message_NMEA_GLL::content_t::UTCTime, mrpt::obs::gnss::Message_NMEA_RMC::content_t::UTCTime, mrpt::obs::gnss::Message_NMEA_ZDA::content_t::UTCTime, mrpt::obs::gnss::Message_NMEA_GLL::content_t::validity_char, mrpt::obs::gnss::Message_NMEA_RMC::content_t::validity_char, mrpt::obs::gnss::Message_NMEA_GSA::content_t::VDOP, and verbose.
Referenced by mrpt::hwdrivers::CVelodyneScanner::getNextObservation(), implement_parser_NMEA(), and TEST().
|
private |
Process data in "m_buffer" to extract GPS messages, and remove them from the buffer.
Definition at line 455 of file CGPSInterface.cpp.
References TParsersRegistry::all_parsers, AUTO, flushParsedMessagesNow(), TParsersRegistry::getInstance(), implement_parser_NMEA(), implement_parser_NOVATEL_OEM6(), mrpt::keep_max(), m_customInit, m_just_parsed_messages, m_parser, m_rx_buffer, mrpt::obs::CObservationGPS::messages, NMEA, NONE, NOVATEL_OEM6, mrpt::containers::circular_buffer< T >::pop(), and mrpt::containers::circular_buffer< T >::size().
Referenced by doProcess().
|
staticinherited |
Register a class into the internal list of "CGenericSensor" descendents.
Used internally in the macros DEFINE_GENERIC_SENSOR, etc...
Can be used as "CGenericSensor::registerClass( SENSOR_CLASS_ID(CMySensor) );" if building custom sensors outside mrpt libraries in user code.
Definition at line 115 of file CGenericSensor.cpp.
References mrpt::hwdrivers::TSensorClassId::className, and mrpt::hwdrivers::CGenericSensor::get_registered_sensor_classes().
bool CGPSInterface::sendCustomCommand | ( | const void * | data, |
const size_t | datalen | ||
) |
Send a custom data block to the GNSS device right now.
Can be used to change its behavior online as needed.
Can be used to change its behavior online as needed.
Definition at line 890 of file CGPSInterface.cpp.
References mrpt::opengl::internal::data, m_data_stream, and m_data_stream_cs.
|
inlineinherited |
Set the extension ("jpg","gif","png",...) that determines the format of images saved externally The default is "jpg".
Definition at line 268 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::m_external_images_format.
|
inlineinherited |
The quality of JPEG compression, when external images is enabled and the format is "jpg".
Definition at line 275 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::m_external_images_jpeg_quality.
|
protected |
Set Advanced Input Mode for the primary port.
This can be used to send RTK corrections to the device using the same port that it's used for the commands. The RTK correction stream must be re-packaged into a special frame with prefix ">>"
Definition at line 692 of file CGPSInterface.cpp.
References mrpt::system::os::_strcmpi(), ASSERT_, mrpt::format(), JAVAD_sendMessage(), m_customInit, m_JAVAD_rtk_format, m_JAVAD_rtk_src_port, MRPT_END, and MRPT_START.
Referenced by legacy_topcon_setup_commands().
|
inlineprotected |
Only used when "m_JAVAD_rtk_src_port" is not empty: format of RTK corrections: "cmr", "rtcm", "rtcm3", etc.
Definition at line 298 of file CGPSInterface.h.
References m_JAVAD_rtk_format.
|
inlineprotected |
Only used when "m_JAVAD_rtk_src_port" is not empty.
Definition at line 291 of file CGPSInterface.h.
References m_JAVAD_rtk_src_baud.
|
inlineprotected |
If not empty, will send a cmd "set,/par/pos/pd/port,...".
Example value: "/dev/ser/b"
Definition at line 285 of file CGPSInterface.h.
References m_JAVAD_rtk_src_port.
|
inherited |
Set the name of the COutputLogger instance.
Definition at line 138 of file COutputLogger.cpp.
Referenced by mrpt::slam::CMetricMapBuilderICP::CMetricMapBuilderICP(), mrpt::slam::CMetricMapBuilderRBPF::CMetricMapBuilderRBPF(), mrpt::slam::CMonteCarloLocalization2D::CMonteCarloLocalization2D(), mrpt::slam::CMonteCarloLocalization3D::CMonteCarloLocalization3D(), mrpt::apps::ICP_SLAM_App_Base::ICP_SLAM_App_Base(), mrpt::apps::ICP_SLAM_App_Live::ICP_SLAM_App_Live(), mrpt::apps::ICP_SLAM_App_Rawlog::ICP_SLAM_App_Rawlog(), mrpt::graphslam::CWindowManager::initCWindowManager(), mrpt::apps::MonteCarloLocalization_Base::MonteCarloLocalization_Base(), mrpt::apps::RBPF_SLAM_App_Base::RBPF_SLAM_App_Base(), and mrpt::apps::RBPF_SLAM_App_Rawlog::RBPF_SLAM_App_Rawlog().
|
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().
void CGPSInterface::setParser | ( | CGPSInterface::PARSERS | parser | ) |
Select the parser for incomming data, among the options enumerated in CGPSInterface.
Definition at line 144 of file CGPSInterface.cpp.
References m_parser.
|
inlinevirtualinherited |
Set the path where to save off-rawlog image files (will be ignored in those sensors where this is not applicable).
An empty string (the default value at construction) means to save images embedded in the rawlog, instead of on separate files.
std::exception | If the directory doesn't exists and cannot be created. |
Definition at line 257 of file CGenericSensor.h.
|
inline |
If set to non-empty, RAW GPS serial data will be also dumped to a separate file.
Definition at line 215 of file CGPSInterface.h.
References m_raw_dump_file_prefix.
|
inlineinherited |
Definition at line 96 of file CGenericSensor.h.
References mrpt::hwdrivers::CGenericSensor::m_sensorLabel.
void CGPSInterface::setSerialPortName | ( | const std::string & | COM_port | ) |
Set the serial port to use (COM1, ttyUSB0, etc).
Definition at line 194 of file CGPSInterface.cpp.
References m_COMname, m_data_stream, m_data_stream_cs, m_data_stream_is_external, and THROW_EXCEPTION.
void CGPSInterface::setSetupCommands | ( | const std::vector< std::string > & | cmds | ) |
Definition at line 166 of file CGPSInterface.cpp.
References m_setup_cmds.
void CGPSInterface::setSetupCommandsDelay | ( | const double | delay_secs | ) |
Definition at line 158 of file CGPSInterface.cpp.
References m_custom_cmds_delay.
void CGPSInterface::setShutdownCommands | ( | const std::vector< std::string > & | cmds | ) |
Definition at line 174 of file CGPSInterface.cpp.
References m_shutdown_cmds.
|
inherited |
alias of setMinLoggingLevel()
Definition at line 149 of file COutputLogger.cpp.
Referenced by mrpt::nav::CAbstractNavigator::CAbstractNavigator(), mrpt::slam::CMetricMapBuilderRBPF::CMetricMapBuilderRBPF(), mrpt::comms::CServerTCPSocket::CServerTCPSocket(), mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), mrpt::math::ransac_detect_2D_lines(), and mrpt::apps::ICP_SLAM_App_Base::run().
|
private |
Returns true if the COM port is already open, or try to open it in other case.
Definition at line 223 of file CGPSInterface.cpp.
References m_COMbauds, m_COMname, m_data_stream, m_data_stream_cs, m_data_stream_is_external, m_data_stream_mine_cs, mrpt::hwdrivers::CGenericSensor::m_verbose, and OnConnectionEstablished().
Referenced by doProcess().
|
protected |
Unset Advanced Input Mode for the primary port and use it only as a command port.
Definition at line 661 of file CGPSInterface.cpp.
References mrpt::system::os::_strcmpi(), JAVAD_sendMessage(), m_customInit, m_data_stream, m_data_stream_cs, MRPT_END, and MRPT_START.
|
inline |
Definition at line 195 of file CGPSInterface.h.
References m_data_stream_is_external.
|
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
Definition at line 165 of file COutputLogger.cpp.
References ASSERTMSG_, and mrpt::format().
|
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.
|
inherited |
[Default=false] Enables storing all messages into an internal list.
Definition at line 243 of file system/COutputLogger.h.
|
private |
Definition at line 316 of file CGPSInterface.h.
Referenced by loadConfig_sensorSpecific(), and tryToOpenTheCOM().
|
private |
Definition at line 315 of file CGPSInterface.h.
Referenced by getSerialPortName(), loadConfig_sensorSpecific(), setSerialPortName(), and tryToOpenTheCOM().
|
private |
Definition at line 322 of file CGPSInterface.h.
Referenced by enableSetupCommandsAppendCRLF(), isEnabledSetupCommandsAppendCRLF(), loadConfig_sensorSpecific(), OnConnectionEstablished(), and OnConnectionShutdown().
|
private |
Definition at line 321 of file CGPSInterface.h.
Referenced by getSetupCommandsDelay(), loadConfig_sensorSpecific(), OnConnectionEstablished(), OnConnectionShutdown(), and setSetupCommandsDelay().
|
protected |
Definition at line 276 of file CGPSInterface.h.
Referenced by doProcess(), loadConfig_sensorSpecific(), OnConnectionEstablished(), parseBuffer(), setJAVAD_AIM_mode(), and unsetJAVAD_AIM_mode().
|
protected |
Typically a CSerialPort created by this class, but may be set externally.
Definition at line 269 of file CGPSInterface.h.
Referenced by bindStream(), doProcess(), JAVAD_sendMessage(), legacy_topcon_setup_commands(), OnConnectionEstablished(), OnConnectionShutdown(), sendCustomCommand(), setSerialPortName(), tryToOpenTheCOM(), and unsetJAVAD_AIM_mode().
|
protected |
Definition at line 270 of file CGPSInterface.h.
Referenced by bindStream(), doProcess(), JAVAD_sendMessage(), legacy_topcon_setup_commands(), OnConnectionEstablished(), OnConnectionShutdown(), sendCustomCommand(), setSerialPortName(), tryToOpenTheCOM(), and unsetJAVAD_AIM_mode().
|
protected |
Definition at line 273 of file CGPSInterface.h.
Referenced by bindStream(), setSerialPortName(), tryToOpenTheCOM(), and useExternalStream().
|
protected |
Definition at line 271 of file CGPSInterface.h.
Referenced by bindStream(), and tryToOpenTheCOM().
|
protectedinherited |
The extension ("jpg","gif","png",...) that determines the format of images saved externally.
Definition at line 158 of file CGenericSensor.h.
Referenced by mrpt::hwdrivers::CSwissRanger3DCamera::getNextObservation(), mrpt::hwdrivers::CSwissRanger3DCamera::loadConfig_sensorSpecific(), and mrpt::hwdrivers::CGenericSensor::setExternalImageFormat().
|
protectedinherited |
For JPEG images, the quality (default=95%).
Definition at line 160 of file CGenericSensor.h.
Referenced by mrpt::hwdrivers::CGenericSensor::getExternalImageJPEGQuality(), mrpt::hwdrivers::CSwissRanger3DCamera::getNextObservation(), mrpt::hwdrivers::CSwissRanger3DCamera::loadConfig_sensorSpecific(), and mrpt::hwdrivers::CGenericSensor::setExternalImageJPEGQuality().
|
private |
Definition at line 318 of file CGPSInterface.h.
Referenced by doProcess(), flushParsedMessagesNow(), and isGPS_connected().
|
protectedinherited |
If set to N>=2, only 1 out of N observations will be saved to m_objList.
Definition at line 139 of file CGenericSensor.h.
Referenced by mrpt::hwdrivers::CGenericSensor::appendObservations(), and mrpt::hwdrivers::CGenericSensor::loadConfig().
|
protectedinherited |
Used when "m_grab_decimation" is enabled.
Definition at line 146 of file CGenericSensor.h.
Referenced by mrpt::hwdrivers::CGenericSensor::appendObservations(), and mrpt::hwdrivers::CGenericSensor::loadConfig().
|
private |
Only used when "m_JAVAD_rtk_src_port" is not empty: format of RTK corrections: "cmr", "rtcm", "rtcm3", etc.
Definition at line 335 of file CGPSInterface.h.
Referenced by legacy_topcon_setup_commands(), loadConfig_sensorSpecific(), setJAVAD_AIM_mode(), and setJAVAD_rtk_format().
|
private |
Only used when "m_JAVAD_rtk_src_port" is not empty.
Definition at line 332 of file CGPSInterface.h.
Referenced by legacy_topcon_setup_commands(), loadConfig_sensorSpecific(), and setJAVAD_rtk_src_baud().
|
private |
If not empty, will send a cmd "set,/par/pos/pd/port,...".
Example value: "/dev/ser/b"
Definition at line 330 of file CGPSInterface.h.
Referenced by legacy_topcon_setup_commands(), loadConfig_sensorSpecific(), setJAVAD_AIM_mode(), and setJAVAD_rtk_src_port().
|
private |
A private copy of the last received gps datum.
Definition at line 362 of file CGPSInterface.h.
Referenced by doProcess(), flushParsedMessagesNow(), OnConnectionEstablished(), and parseBuffer().
|
private |
Used in getLastGGA()
Definition at line 364 of file CGPSInterface.h.
Referenced by getLastGGA(), and OnConnectionEstablished().
|
private |
Definition at line 319 of file CGPSInterface.h.
Referenced by doProcess(), and flushParsedMessagesNow().
|
protectedinherited |
See CGenericSensor.
Definition at line 136 of file CGenericSensor.h.
Referenced by mrpt::hwdrivers::CGenericSensor::loadConfig().
|
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().
|
private |
Definition at line 313 of file CGPSInterface.h.
Referenced by getParser(), loadConfig_sensorSpecific(), parseBuffer(), and setParser().
|
protectedinherited |
The path where to save off-rawlog images: empty means save images embedded in the rawlog.
Definition at line 155 of file CGenericSensor.h.
Referenced by mrpt::hwdrivers::CSwissRanger3DCamera::getNextObservation(), and mrpt::hwdrivers::CSwissRanger3DCamera::setPathForExternalImages().
|
protectedinherited |
See CGenericSensor.
Definition at line 134 of file CGenericSensor.h.
Referenced by mrpt::hwdrivers::CGenericSensor::getProcessRate(), mrpt::hwdrivers::CGyroKVHDSP3000::initialize(), and mrpt::hwdrivers::CGenericSensor::loadConfig().
|
private |
Definition at line 314 of file CGPSInterface.h.
Referenced by doProcess(), getRawDumpFilePrefix(), loadConfig_sensorSpecific(), and setRawDumpFilePrefix().
|
private |
Definition at line 320 of file CGPSInterface.h.
Referenced by doProcess().
|
private |
Auxiliary buffer for readings.
Definition at line 312 of file CGPSInterface.h.
Referenced by doProcess(), and parseBuffer().
|
protectedinherited |
See CGenericSensor.
Definition at line 141 of file CGenericSensor.h.
Referenced by mrpt::hwdrivers::CCANBusReader::CCANBusReader(), CGPSInterface(), mrpt::hwdrivers::CGyroKVHDSP3000::CGyroKVHDSP3000(), mrpt::hwdrivers::CHokuyoURG::CHokuyoURG(), mrpt::hwdrivers::CIMUXSens::CIMUXSens(), mrpt::hwdrivers::CIMUXSens_MT4::CIMUXSens_MT4(), mrpt::hwdrivers::CKinect::CKinect(), mrpt::hwdrivers::CNationalInstrumentsDAQ::CNationalInstrumentsDAQ(), mrpt::hwdrivers::CRoboPeakLidar::CRoboPeakLidar(), mrpt::hwdrivers::CSickLaserSerial::CSickLaserSerial(), mrpt::hwdrivers::CSickLaserUSB::CSickLaserUSB(), mrpt::hwdrivers::CSkeletonTracker::CSkeletonTracker(), mrpt::hwdrivers::CSwissRanger3DCamera::CSwissRanger3DCamera(), mrpt::hwdrivers::CVelodyneScanner::CVelodyneScanner(), mrpt::hwdrivers::CIMUXSens_MT4::doProcess(), mrpt::hwdrivers::CIMUXSens::doProcess(), mrpt::hwdrivers::CGyroKVHDSP3000::doProcess(), mrpt::hwdrivers::CSkeletonTracker::doProcess(), mrpt::hwdrivers::CRoboPeakLidar::doProcessSimple(), mrpt::hwdrivers::CSickLaserUSB::doProcessSimple(), mrpt::hwdrivers::CCANBusReader::doProcessSimple(), mrpt::hwdrivers::CSickLaserSerial::doProcessSimple(), mrpt::hwdrivers::CHokuyoURG::doProcessSimple(), flushParsedMessagesNow(), mrpt::hwdrivers::CSwissRanger3DCamera::getNextObservation(), mrpt::hwdrivers::CKinect::getNextObservation(), mrpt::hwdrivers::CVelodyneScanner::getNextObservation(), mrpt::hwdrivers::CGenericSensor::getSensorLabel(), mrpt::hwdrivers::CNationalInstrumentsDAQ::grabbing_thread(), mrpt::hwdrivers::CGenericSensor::loadConfig(), mrpt::hwdrivers::CSkeletonTracker::processPreview(), mrpt::hwdrivers::C2DRangeFinderAbstract::processPreview(), mrpt::hwdrivers::CSkeletonTracker::processPreviewNone(), and mrpt::hwdrivers::CGenericSensor::setSensorLabel().
|
private |
Definition at line 317 of file CGPSInterface.h.
Referenced by enableAppendMsgTypeToSensorLabel(), flushParsedMessagesNow(), and loadConfig_sensorSpecific().
|
protected |
Definition at line 275 of file CGPSInterface.h.
Referenced by flushParsedMessagesNow(), and loadConfig_sensorSpecific().
|
private |
Definition at line 323 of file CGPSInterface.h.
Referenced by getSetupCommands(), loadConfig_sensorSpecific(), OnConnectionEstablished(), and setSetupCommands().
|
private |
Definition at line 324 of file CGPSInterface.h.
Referenced by getShutdownCommands(), loadConfig_sensorSpecific(), OnConnectionShutdown(), and setShutdownCommands().
|
protectedinherited |
Definition at line 148 of file CGenericSensor.h.
Referenced by mrpt::hwdrivers::CGyroKVHDSP3000::CGyroKVHDSP3000(), mrpt::hwdrivers::CIMUXSens_MT4::doProcess(), mrpt::hwdrivers::CIMUXSens::doProcess(), mrpt::hwdrivers::CGyroKVHDSP3000::doProcess(), mrpt::hwdrivers::CSkeletonTracker::doProcess(), mrpt::hwdrivers::CSwissRanger3DCamera::doProcess(), mrpt::hwdrivers::C2DRangeFinderAbstract::doProcess(), doProcess(), mrpt::hwdrivers::CNationalInstrumentsDAQ::doProcess(), mrpt::hwdrivers::CKinect::doProcess(), mrpt::hwdrivers::CVelodyneScanner::doProcess(), mrpt::hwdrivers::CSickLaserUSB::doProcessSimple(), mrpt::hwdrivers::CCANBusReader::doProcessSimple(), mrpt::hwdrivers::CSickLaserSerial::doProcessSimple(), mrpt::hwdrivers::CHokuyoURG::doProcessSimple(), flushParsedMessagesNow(), mrpt::hwdrivers::CVelodyneScanner::getNextObservation(), mrpt::hwdrivers::CGenericSensor::getState(), mrpt::hwdrivers::CIMUXSens_MT4::initialize(), mrpt::hwdrivers::CIMUXSens::initialize(), mrpt::hwdrivers::CGyroKVHDSP3000::initialize(), mrpt::hwdrivers::CSkeletonTracker::initialize(), mrpt::hwdrivers::CVelodyneScanner::initialize(), mrpt::hwdrivers::CNationalInstrumentsDAQ::readFromDAQ(), and mrpt::hwdrivers::CIMUXSens::searchPortAndConnect().
|
private |
Indicates if the AIM has been properly set up.
Definition at line 341 of file CGPSInterface.h.
Referenced by isAIMConfigured(), and legacy_topcon_setup_commands().
|
private |
The period in seconds which the data should be provided by the GPS.
Definition at line 343 of file CGPSInterface.h.
Referenced by doProcess(), legacy_topcon_setup_commands(), and loadConfig_sensorSpecific().
|
private |
Use this mode for receive RTK corrections from a external source through the primary port.
Definition at line 339 of file CGPSInterface.h.
Referenced by legacy_topcon_setup_commands(), and loadConfig_sensorSpecific().
|
protectedinherited |
Definition at line 149 of file CGenericSensor.h.
Referenced by mrpt::hwdrivers::CGenericSensor::CGenericSensor(), mrpt::hwdrivers::CRoboPeakLidar::checkCOMMs(), mrpt::hwdrivers::CNTRIPEmitter::doProcess(), doProcess(), mrpt::hwdrivers::CGenericSensor::enableVerbose(), mrpt::hwdrivers::CNationalInstrumentsDAQ::grabbing_thread(), mrpt::hwdrivers::CIMUXSens_MT4::initialize(), mrpt::hwdrivers::CHokuyoURG::initialize(), mrpt::hwdrivers::CVelodyneScanner::internal_read_PCAP_packet(), mrpt::hwdrivers::CGenericSensor::isVerboseEnabled(), JAVAD_sendMessage(), legacy_topcon_setup_commands(), mrpt::hwdrivers::CSickLaserSerial::LMS_setupBaudrate(), mrpt::hwdrivers::CSickLaserSerial::LMS_setupSerialComms(), mrpt::hwdrivers::CSickLaserSerial::LMS_waitIncomingFrame(), OnConnectionEstablished(), OnConnectionShutdown(), mrpt::hwdrivers::CSickLaserSerial::SendCommandToSICK(), mrpt::hwdrivers::CNationalInstrumentsDAQ::stop(), and tryToOpenTheCOM().
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 |