#include <sick_generic_parser.h>
Public Member Functions | |
int | checkForDistAndRSSI (std::vector< char * > &fields, int expected_number_of_data, int &distNum, int &rssiNum, std::vector< float > &distVal, std::vector< float > &rssiVal, int &distMask) |
check for DIST and RSSI-entries in the datagram. Helper routine for parser | |
void | checkScanTiming (float time_increment, float scan_time, float angle_increment, float tol) |
float | get_range_max (void) |
Getting maximum range. | |
float | get_range_min (void) |
Getting minimum range. | |
ScannerBasicParam * | getCurrentParamPtr () |
Gets Pointer to parameter object. | |
std::string | getScannerType (void) |
getting scannertype | |
int | lookUpForAllowedScanner (std::string scannerName) |
checks the given scannerName/scannerType of validity | |
virtual int | parse_datagram (char *datagram, size_t datagram_length, SickScanConfig &config, sensor_msgs::LaserScan &msg, int &numEchos, int &echoMask) |
Parsing Ascii datagram. | |
void | set_range_max (float max) |
Setting maximum range. | |
void | set_range_min (float min) |
Setting minimum range. | |
void | set_time_increment (float time) |
setting time increment between shots | |
void | setCurrentParamPtr (ScannerBasicParam *_ptr) |
Set pointer to corresponding parameter object to the parser. | |
void | setScannerType (std::string s) |
setting scannertype | |
SickGenericParser (std::string scannerType) | |
Construction of parser object. | |
virtual | ~SickGenericParser () |
Destructor of parser. | |
Private Attributes | |
std::vector< std::string > | allowedScannerNames |
std::vector< ScannerBasicParam > | basicParams |
ScannerBasicParam * | currentParamSet |
float | override_range_max_ |
float | override_range_min_ |
float | override_time_increment_ |
std::string | scannerType |
Definition at line 96 of file sick_generic_parser.h.
sick_scan::SickGenericParser::SickGenericParser | ( | std::string | _scanType | ) |
Construction of parser object.
_scanType | Type of the Laserscanner |
Definition at line 309 of file sick_generic_parser.cpp.
sick_scan::SickGenericParser::~SickGenericParser | ( | ) | [virtual] |
Destructor of parser.
Definition at line 463 of file sick_generic_parser.cpp.
int sick_scan::SickGenericParser::checkForDistAndRSSI | ( | std::vector< char * > & | fields, |
int | expected_number_of_data, | ||
int & | distNum, | ||
int & | rssiNum, | ||
std::vector< float > & | distVal, | ||
std::vector< float > & | rssiVal, | ||
int & | distMask | ||
) |
check for DIST and RSSI-entries in the datagram. Helper routine for parser
fields,: | String entries holding the information |
expected_number_of_data,: | Warning, if the number of found entries does not correspond to this entries |
distNum,: | Number of found DIST-entries |
rssiNum,: | Number of found RSSI-entries |
distVal,: | parsed istance values |
rssiVal,: | parsed RSSI-values |
distMask,: | Bit-Masking holds the information of found DIST-entries (e.g. DIST1 -> Bit 0, DIST2 -> BIT 1 and so on) |
Definition at line 480 of file sick_generic_parser.cpp.
void sick_scan::SickGenericParser::checkScanTiming | ( | float | time_increment, |
float | scan_time, | ||
float | angle_increment, | ||
float | tol | ||
) |
Definition at line 566 of file sick_generic_parser.cpp.
float sick_scan::SickGenericParser::get_range_max | ( | void | ) |
Getting maximum range.
Definition at line 936 of file sick_generic_parser.cpp.
float sick_scan::SickGenericParser::get_range_min | ( | void | ) |
Getting minimum range.
Definition at line 946 of file sick_generic_parser.cpp.
Gets Pointer to parameter object.
Definition at line 435 of file sick_generic_parser.cpp.
std::string sick_scan::SickGenericParser::getScannerType | ( | void | ) |
int sick_scan::SickGenericParser::lookUpForAllowedScanner | ( | std::string | scannerName | ) |
checks the given scannerName/scannerType of validity
scannerName | as string (e.g. "tim_5xx") |
Definition at line 445 of file sick_generic_parser.cpp.
int sick_scan::SickGenericParser::parse_datagram | ( | char * | datagram, |
size_t | datagram_length, | ||
SickScanConfig & | config, | ||
sensor_msgs::LaserScan & | msg, | ||
int & | numEchos, | ||
int & | echoMask | ||
) | [virtual] |
Parsing Ascii datagram.
datagram,: | Pointer to datagram data |
datagram_length,: | Number of bytes in datagram |
config,: | Pointer to Configdata |
msg,: | Holds result of Parsing |
numEchos,: | Number of DIST-blocks found in message |
echoMask,: | Mask corresponding to DIST-block-identifier |
Implements sick_scan::AbstractParser.
Definition at line 595 of file sick_generic_parser.cpp.
void sick_scan::SickGenericParser::set_range_max | ( | float | max | ) |
Setting maximum range.
max | range in [m] |
Definition at line 925 of file sick_generic_parser.cpp.
void sick_scan::SickGenericParser::set_range_min | ( | float | min | ) |
Setting minimum range.
min | range in [m] |
Definition at line 915 of file sick_generic_parser.cpp.
void sick_scan::SickGenericParser::set_time_increment | ( | float | time | ) |
setting time increment between shots
time | increment |
Definition at line 956 of file sick_generic_parser.cpp.
Set pointer to corresponding parameter object to the parser.
_ptr | to parameter object |
Definition at line 164 of file sick_generic_parser.cpp.
void sick_scan::SickGenericParser::setScannerType | ( | std::string | _scannerType | ) |
setting scannertype
_scannerType |
Definition at line 967 of file sick_generic_parser.cpp.
std::vector<std::string> sick_scan::SickGenericParser::allowedScannerNames [private] |
Definition at line 129 of file sick_generic_parser.h.
std::vector<ScannerBasicParam> sick_scan::SickGenericParser::basicParams [private] |
Definition at line 130 of file sick_generic_parser.h.
Definition at line 131 of file sick_generic_parser.h.
float sick_scan::SickGenericParser::override_range_max_ [private] |
Definition at line 126 of file sick_generic_parser.h.
float sick_scan::SickGenericParser::override_range_min_ [private] |
Definition at line 126 of file sick_generic_parser.h.
float sick_scan::SickGenericParser::override_time_increment_ [private] |
Definition at line 127 of file sick_generic_parser.h.
std::string sick_scan::SickGenericParser::scannerType [private] |
Definition at line 128 of file sick_generic_parser.h.