sick_generic_parser.cpp
Go to the documentation of this file.
1 
50 #ifdef _MSC_VER
51 #pragma warning(disable: 4267)
52 #endif
53 
54 #define _CRT_SECURE_NO_WARNINGS
55 #define _USE_MATH_DEFINES
56 
57 #include <math.h>
59 #include <ros/ros.h>
60 
61 #ifdef _MSC_VER
62 #include "sick_scan/rosconsole_simu.hpp"
63 #endif
64 
65 namespace sick_scan
66 {
67  using namespace std;
68 
75  void ScannerBasicParam::setScannerName(std::string _s)
76  {
77  scannerName = _s;
78  }
79 
87  {
88  return (scannerName);
89  }
90 
91 
99  {
100  numberOfLayers = _layerNum;
101  }
102 
110  {
111  return (numberOfLayers);
112 
113  }
114 
122  {
123  numberOfShots = _shots;
124  }
125 
133  {
134  return (numberOfShots);
135  }
136 
144  {
145  this->numberOfMaximumEchos = _maxEchos;
146  }
147 
148 
156  {
157  return (numberOfMaximumEchos);
158  }
159 
167  {
168  currentParamSet = _ptr;
169  }
170 
171 
178  {
179  angleDegressResolution = _res;
180  }
181 
188  {
189  return (angleDegressResolution);
190  }
191 
198  {
199  expectedFrequency = _freq;
200  }
201 
209  {
210  return (expectedFrequency);
211  }
212 
213 
220  {
221  this->elevationDegreeResolution = _elevRes;
222  }
223 
224 
231  {
232  return (this->elevationDegreeResolution);
233  }
234 
241  {
242  this->useBinaryProtocol = _useBinary;
243  }
244 
250  void ScannerBasicParam::setDeviceIsRadar(bool _deviceIsRadar)
251  {
252  deviceIsRadar = _deviceIsRadar;
253  }
254 
261  {
262  return (deviceIsRadar);
263  }
264 
270  void ScannerBasicParam::setScanMirroredAndShifted(bool _scannMirroredAndShifted)
271  {
272  scanMirroredAndShifted = _scannMirroredAndShifted;
273  }
274 
281  {
282  return (scanMirroredAndShifted);
283  }
284 
291  {
292  return (this->useBinaryProtocol);
293  }
294 
300  void ScannerBasicParam::setIntensityResolutionIs16Bit(bool _IntensityResolutionIs16Bit)
301  {
302  this->IntensityResolutionIs16Bit = _IntensityResolutionIs16Bit;
303  }
304 
311  {
312  return (IntensityResolutionIs16Bit);
313  }
314 
320  void ScannerBasicParam::setUseSafetyPasWD(bool _useSafetyPasWD)
321  {
322  this->useSafetyPasWD = _useSafetyPasWD;
323  }
324 
331  {
332  return (useSafetyPasWD);
333  }
334 
336  {
337  return this->useEvalFields;
338  }
339 
341  {
342  this->useEvalFields = _useEvalFields;
343  }
344 
346  {
347  return this->maxEvalFields;
348  }
349 
350  void ScannerBasicParam::setMaxEvalFields(int _maxEvalFields)
351  {
352  this->maxEvalFields = _maxEvalFields;
353  }
354 
355  void ScannerBasicParam::setScanAngleShift(double _scanAngleShift)
356  {
357  this->scanAngleShift = _scanAngleShift;
358  }
359 
361  {
362  return this->scanAngleShift;
363  }
364 
365 
371  : numberOfLayers(0), numberOfShots(0), numberOfMaximumEchos(0), elevationDegreeResolution(0), angleDegressResolution(0), expectedFrequency(0),
372  useBinaryProtocol(false), IntensityResolutionIs16Bit(false), deviceIsRadar(false), useSafetyPasWD(false), encoderMode(0),
373  CartographerCompatibility(false), scanMirroredAndShifted(false), useEvalFields(EVAL_FIELD_UNSUPPORTED), maxEvalFields(0)
374  {
375  this->elevationDegreeResolution = 0.0;
376  this->setUseBinaryProtocol(false);
377  }
378 
384  void ScannerBasicParam::setEncoderMode(int8_t _encoderMode)
385  {
386  this->encoderMode = _encoderMode;
387  }
388 
396  {
397  return (encoderMode);
398  }
399 
405  SickGenericParser::SickGenericParser(std::string _scanType) :
406  AbstractParser(),
407  override_range_min_((float) 0.05),
408  override_range_max_((float) 100.0),
409  override_time_increment_((float) -1.0)
410  {
411  setScannerType(_scanType);
422  allowedScannerNames.push_back(SICK_SCANNER_RMS_3XX_NAME); // Radar scanner
426  basicParams.resize(allowedScannerNames.size()); // resize to number of supported scanner types
427  for (int i = 0; i <
428  (int) basicParams.size(); i++) // set specific parameter for each scanner type - scanner type is identified by name
429  {
430  basicParams[i].setDeviceIsRadar(false); // Default
431  basicParams[i].setScannerName(allowedScannerNames[i]); // set scanner type for this parameter object
432 
433  if (basicParams[i].getScannerName().compare(SICK_SCANNER_MRS_1XXX_NAME) ==
434  0) // MRS1000 - 4 layer, 1101 shots per scan
435  {
436  basicParams[i].setNumberOfMaximumEchos(3);
437  basicParams[i].setNumberOfLayers(4);
438  basicParams[i].setNumberOfShots(1101);
439  basicParams[i].setAngularDegreeResolution(0.25);
440  basicParams[i].setElevationDegreeResolution(2.5); // in [degree]
441  basicParams[i].setExpectedFrequency(50.0);
442  basicParams[i].setUseBinaryProtocol(true);
443  basicParams[i].setDeviceIsRadar(false); // Default
444  basicParams[i].setUseSafetyPasWD(false); // Default
445  basicParams[i].setEncoderMode(-1); // Default
446  basicParams[i].setScanMirroredAndShifted(false);
447  basicParams[i].setUseEvalFields(EVAL_FIELD_UNSUPPORTED);
448  basicParams[i].setMaxEvalFields(0);
449  basicParams[i].setScanAngleShift(-M_PI/2);
450  }
451  if (basicParams[i].getScannerName().compare(SICK_SCANNER_LMS_1XXX_NAME) ==
452  0) // LMS1000 - 4 layer, 1101 shots per scan
453  {
454  basicParams[i].setNumberOfMaximumEchos(3);
455  basicParams[i].setNumberOfLayers(4);
456  basicParams[i].setNumberOfShots(1101);
457  basicParams[i].setAngularDegreeResolution(1.00); // 0.25° wurde nicht unterstuetzt. (SFA 4)
458  basicParams[i].setElevationDegreeResolution(0.0); // in [degree]
459  basicParams[i].setExpectedFrequency(50.0);
460  basicParams[i].setUseBinaryProtocol(true);
461  basicParams[i].setDeviceIsRadar(false); // Default
462  basicParams[i].setUseSafetyPasWD(false); // Default
463  basicParams[i].setEncoderMode(-1); // Default
464  basicParams[i].setScanMirroredAndShifted(false);
465  basicParams[i].setUseEvalFields(EVAL_FIELD_UNSUPPORTED);
466  basicParams[i].setMaxEvalFields(0);
467  basicParams[i].setScanAngleShift(-M_PI/2);
468  }
469  if (basicParams[i].getScannerName().compare(SICK_SCANNER_TIM_240_NAME) ==
470  0) // TIM_5xx - 1 Layer, max. 811 shots per scan
471  {
472  basicParams[i].setNumberOfMaximumEchos(1);
473  basicParams[i].setNumberOfLayers(1);
474  basicParams[i].setNumberOfShots(241); // [-120 deg, 120 deg]
475  basicParams[i].setAngularDegreeResolution(1.00000);
476  basicParams[i].setExpectedFrequency(15.0);
477  basicParams[i].setUseBinaryProtocol(true);
478  basicParams[i].setDeviceIsRadar(false); // Default
479  basicParams[i].setUseSafetyPasWD(false); // Default
480  basicParams[i].setEncoderMode(-1); // Default
481  basicParams[i].setScanMirroredAndShifted(false);
482  basicParams[i].setUseEvalFields(EVAL_FIELD_UNSUPPORTED);
483  basicParams[i].setMaxEvalFields(0);
484  basicParams[i].setScanAngleShift(0);
485  }
486  if (basicParams[i].getScannerName().compare(SICK_SCANNER_TIM_5XX_NAME) ==
487  0) // TIM_5xx - 1 Layer, max. 811 shots per scan
488  {
489  basicParams[i].setNumberOfMaximumEchos(1);
490  basicParams[i].setNumberOfLayers(1);
491  basicParams[i].setNumberOfShots(811);
492  basicParams[i].setAngularDegreeResolution(0.3333);
493  basicParams[i].setExpectedFrequency(15.0);
494  basicParams[i].setUseBinaryProtocol(true);
495  basicParams[i].setDeviceIsRadar(false); // Default
496  basicParams[i].setUseSafetyPasWD(false); // Default
497  basicParams[i].setEncoderMode(-1); // Default
498  basicParams[i].setScanMirroredAndShifted(false);
499  basicParams[i].setUseEvalFields(EVAL_FIELD_UNSUPPORTED);
500  basicParams[i].setMaxEvalFields(0);
501  basicParams[i].setScanAngleShift(-M_PI/2);
502  }
503  if (basicParams[i].getScannerName().compare(SICK_SCANNER_LMS_4XXX_NAME) == 0) // LMS_4xxx - 1 Layer, 600 Hz
504  {
505  basicParams[i].setNumberOfMaximumEchos(1);
506  basicParams[i].setNumberOfLayers(1);
507  basicParams[i].setNumberOfShots(841);//
508  basicParams[i].setAngularDegreeResolution(0.0833);//
509  basicParams[i].setExpectedFrequency(600.0);
510  basicParams[i].setUseBinaryProtocol(true);
511  basicParams[i].setDeviceIsRadar(false); // Default
512  basicParams[i].setUseSafetyPasWD(false); // Default
513  basicParams[i].setEncoderMode(-1); // Default
514  basicParams[i].setScanMirroredAndShifted(false);
515  basicParams[i].setUseEvalFields(EVAL_FIELD_UNSUPPORTED);
516  basicParams[i].setMaxEvalFields(0);
517  basicParams[i].setScanAngleShift(-M_PI/2);
518  }
519  if (basicParams[i].getScannerName().compare(SICK_SCANNER_TIM_7XX_NAME) == 0) // TIM_7xx - 1 Layer Scanner
520  {
521  basicParams[i].setNumberOfMaximumEchos(1);
522  basicParams[i].setNumberOfLayers(1);
523  basicParams[i].setNumberOfShots(811);
524  basicParams[i].setAngularDegreeResolution(0.3333);
525  basicParams[i].setExpectedFrequency(15.0);
526  basicParams[i].setUseBinaryProtocol(true);
527  basicParams[i].setDeviceIsRadar(false); // Default
528  basicParams[i].setUseSafetyPasWD(false); // Default
529  basicParams[i].setEncoderMode(-1); // Default
530  basicParams[i].setScanMirroredAndShifted(false);
531  basicParams[i].setUseEvalFields(USE_EVAL_FIELD_TIM7XX_LOGIC);
532  basicParams[i].setMaxEvalFields(48);
533  basicParams[i].setScanAngleShift(-M_PI/2);
534  }
535  if (basicParams[i].getScannerName().compare(SICK_SCANNER_TIM_7XXS_NAME) == 0) // TIM_7xxS - 1 layer Safety Scanner
536  {
537  basicParams[i].setNumberOfMaximumEchos(1);
538  basicParams[i].setNumberOfLayers(1);
539  basicParams[i].setNumberOfShots(811);
540  basicParams[i].setAngularDegreeResolution(0.3333);
541  basicParams[i].setExpectedFrequency(15.0);
542  basicParams[i].setUseBinaryProtocol(true);
543  basicParams[i].setDeviceIsRadar(false); // Default
544  basicParams[i].setUseSafetyPasWD(true); // Safety scanner
545  basicParams[i].setEncoderMode(-1); // Default
546  basicParams[i].setScanMirroredAndShifted(false);
547  basicParams[i].setUseEvalFields(USE_EVAL_FIELD_TIM7XX_LOGIC);
548  basicParams[i].setMaxEvalFields(48);
549  basicParams[i].setScanAngleShift(-M_PI/2);
550  }
551  if (basicParams[i].getScannerName().compare(SICK_SCANNER_LMS_5XX_NAME) == 0) // LMS_5xx - 1 Layer
552  {
553  basicParams[i].setNumberOfMaximumEchos(1);
554  basicParams[i].setNumberOfLayers(1);
555  basicParams[i].setNumberOfShots(381);
556  basicParams[i].setAngularDegreeResolution(0.5);
557  basicParams[i].setExpectedFrequency(15.0);
558  basicParams[i].setUseBinaryProtocol(true);
559  basicParams[i].setDeviceIsRadar(false); // Default
560  basicParams[i].setUseSafetyPasWD(false); // Default
561  basicParams[i].setEncoderMode(-1); // Default
562  basicParams[i].setScanMirroredAndShifted(false);
563  basicParams[i].setUseEvalFields(USE_EVAL_FIELD_LMS5XX_LOGIC);
564  basicParams[i].setMaxEvalFields(30);
565  basicParams[i].setScanAngleShift(-M_PI/2);
566  }
567  if (basicParams[i].getScannerName().compare(SICK_SCANNER_LMS_1XX_NAME) == 0) // LMS_1xx - 1 Layer
568  {
569  basicParams[i].setNumberOfMaximumEchos(1);
570  basicParams[i].setNumberOfLayers(1);
571  basicParams[i].setNumberOfShots(1081);
572  basicParams[i].setAngularDegreeResolution(0.5);
573  basicParams[i].setExpectedFrequency(25.0);
574  basicParams[i].setUseBinaryProtocol(true);
575  basicParams[i].setDeviceIsRadar(false); // Default
576  basicParams[i].setUseSafetyPasWD(false); // Default
577  basicParams[i].setEncoderMode(-1); // Default
578  basicParams[i].setScanMirroredAndShifted(false);
579  basicParams[i].setUseEvalFields(USE_EVAL_FIELD_LMS5XX_LOGIC);
580  basicParams[i].setMaxEvalFields(30);
581  basicParams[i].setScanAngleShift(-M_PI/2);
582  }
583  if (basicParams[i].getScannerName().compare(SICK_SCANNER_MRS_6XXX_NAME) == 0) //
584  {
585  basicParams[i].setNumberOfMaximumEchos(5);
586  basicParams[i].setNumberOfLayers(24);
587  basicParams[i].setNumberOfShots(925);
588  basicParams[i].setAngularDegreeResolution(0.13);
589  basicParams[i].setElevationDegreeResolution(1.25); // in [degree]
590  basicParams[i].setExpectedFrequency(50.0);
591  basicParams[i].setUseBinaryProtocol(true);
592  basicParams[i].setDeviceIsRadar(false); // Default
593  basicParams[i].setUseSafetyPasWD(false); // Default
594  basicParams[i].setEncoderMode(-1); // Default
595  basicParams[i].setScanMirroredAndShifted(false);
596  basicParams[i].setUseEvalFields(EVAL_FIELD_UNSUPPORTED);
597  basicParams[i].setMaxEvalFields(0);
598  basicParams[i].setScanAngleShift(0);
599  }
600 
601  if (basicParams[i].getScannerName().compare(SICK_SCANNER_RMS_3XX_NAME) == 0) // Radar
602  {
603  basicParams[i].setNumberOfMaximumEchos(1);
604  basicParams[i].setNumberOfLayers(0); // for radar scanner
605  basicParams[i].setNumberOfShots(65);
606  basicParams[i].setAngularDegreeResolution(0.00);
607  basicParams[i].setElevationDegreeResolution(0.00); // in [degree]
608  basicParams[i].setExpectedFrequency(0.00);
609  basicParams[i].setUseBinaryProtocol(false); // use ASCII-Protocol
610  basicParams[i].setDeviceIsRadar(true); // Device is a radar
611  basicParams[i].setUseSafetyPasWD(false); // Default
612  basicParams[i].setEncoderMode(-1); // Default
613  basicParams[i].setScanMirroredAndShifted(false);
614  basicParams[i].setUseEvalFields(EVAL_FIELD_UNSUPPORTED);
615  basicParams[i].setMaxEvalFields(0);
616  basicParams[i].setScanAngleShift(0);
617  }
618  if (basicParams[i].getScannerName().compare(SICK_SCANNER_NAV_3XX_NAME) == 0) // Nav 3xx
619  {
620  basicParams[i].setNumberOfMaximumEchos(1);
621  basicParams[i].setNumberOfLayers(1);
622  basicParams[i].setNumberOfShots(2880);
623  basicParams[i].setAngularDegreeResolution(0.750);
624  basicParams[i].setExpectedFrequency(55.0);
625  basicParams[i].setUseBinaryProtocol(true);
626  basicParams[i].setDeviceIsRadar(false); // Default
627  basicParams[i].setScanMirroredAndShifted(true);
628  basicParams[i].setUseEvalFields(EVAL_FIELD_UNSUPPORTED);
629  basicParams[i].setMaxEvalFields(0);
630  basicParams[i].setScanAngleShift(0);
631  }
632  if (basicParams[i].getScannerName().compare(SICK_SCANNER_NAV_2XX_NAME) == 0) // NAV_2xx - 1 Layer
633  {
634  basicParams[i].setNumberOfMaximumEchos(1);
635  basicParams[i].setNumberOfLayers(1);
636  basicParams[i].setNumberOfShots(1081);
637  basicParams[i].setAngularDegreeResolution(0.5);
638  basicParams[i].setExpectedFrequency(25.0);
639  basicParams[i].setUseBinaryProtocol(true);
640  basicParams[i].setDeviceIsRadar(false); // Default
641  basicParams[i].setUseSafetyPasWD(false); // Default
642  basicParams[i].setEncoderMode(-1); // Default
643  basicParams[i].setScanMirroredAndShifted(false);
644  basicParams[i].setUseEvalFields(EVAL_FIELD_UNSUPPORTED);
645  basicParams[i].setMaxEvalFields(0);
646  basicParams[i].setScanAngleShift(0);
647  }
648  if (basicParams[i].getScannerName().compare(SICK_SCANNER_TIM_4XX_NAME) == 0) // TiM433 and TiM443
649  {
650  basicParams[i].setNumberOfMaximumEchos(1);
651  basicParams[i].setNumberOfLayers(1);
652  basicParams[i].setNumberOfShots(721);
653  basicParams[i].setAngularDegreeResolution(0.33333333333);
654  basicParams[i].setExpectedFrequency(15.0);
655  basicParams[i].setUseBinaryProtocol(true);
656  basicParams[i].setDeviceIsRadar(false); // Default
657  basicParams[i].setUseSafetyPasWD(false); // Default
658  basicParams[i].setEncoderMode(-1); // Default
659  basicParams[i].setScanMirroredAndShifted(false);
660  basicParams[i].setUseEvalFields(EVAL_FIELD_UNSUPPORTED);
661  basicParams[i].setMaxEvalFields(0);
662  basicParams[i].setScanAngleShift(-M_PI/2);
663  }
664  }
665 
666  int scannerIdx = lookUpForAllowedScanner(scannerType);
667 
668  if (scannerIdx == -1) // find index of parameter set - derived from scanner type name
669  {
670  ROS_ERROR("Scanner not supported.\n");
671  throw new std::string("scanner type " + scannerType + " not supported.");
672  }
673  else
674  {
675  currentParamSet = &(basicParams[scannerIdx]);
676  }
677  }
678 
684  {
685  return (currentParamSet);
686  }
687 
693  int SickGenericParser::lookUpForAllowedScanner(std::string scannerName)
694  {
695  int iRet = -1;
696  for (int i = 0; i < (int) allowedScannerNames.size(); i++)
697  {
698  if (allowedScannerNames[i].compare(scannerName) == 0)
699  {
700  return (i);
701  }
702  }
703 
704  return (iRet);
705  }
706 
712  {
713  }
714 
728  int SickGenericParser::checkForDistAndRSSI(std::vector<char *> &fields, int expected_number_of_data, int &distNum,
729  int &rssiNum, std::vector<float> &distVal, std::vector<float> &rssiVal,
730  int &distMask)
731  {
732  int iRet = ExitSuccess;
733  distNum = 0;
734  rssiNum = 0;
735  int baseOffset = 20;
736 
737  distMask = 0;
738  // More in depth checks: check data length and RSSI availability
739  // 25: Number of data (<= 10F)
740  unsigned short int number_of_data = 0;
741  if (strstr(fields[baseOffset], "DIST") != fields[baseOffset]) // First initial check
742  {
743  ROS_WARN("Field 20 of received data does not start with DIST (is: %s). Unexpected data, ignoring scan",
744  fields[20]);
745  return ExitError;
746  }
747 
748  int offset = 20;
749  do
750  {
751  bool distFnd = false;
752  bool rssiFnd = false;
753  if (strlen(fields[offset]) == 5)
754  {
755  if (strstr(fields[offset], "DIST") == fields[offset])
756  {
757  distFnd = true;
758  distNum++;
759  int distId = -1;
760  if (1 == sscanf(fields[offset], "DIST%d", &distId))
761  {
762  distMask |= (1 << (distId - 1)); // set bit regarding to id
763  }
764  }
765  if (strstr(fields[offset], "RSSI") == fields[offset])
766  {
767  rssiNum++;
768  rssiFnd = true;
769  }
770  }
771  if (rssiFnd || distFnd)
772  {
773  offset += 5;
774  if (offset >= (int) fields.size())
775  {
776  ROS_WARN("Missing RSSI or DIST data");
777  return ExitError;
778  }
779  number_of_data = 0;
780  sscanf(fields[offset], "%hx", &number_of_data);
781  if (number_of_data != expected_number_of_data)
782  {
783  ROS_WARN("number of dist or rssi values mismatching.");
784  return ExitError;
785  }
786  offset++;
787  // Here is the first value
788  for (int i = 0; i < number_of_data; i++)
789  {
790  if (distFnd)
791  {
792  unsigned short iRange;
793  float range;
794  sscanf(fields[offset + i], "%hx", &iRange);
795  range = iRange / 1000.0;
796  distVal.push_back(range);
797  }
798  else
799  {
800  unsigned short iRSSI;
801  sscanf(fields[offset + i], "%hx", &iRSSI);
802  rssiVal.push_back((float) iRSSI);
803  }
804  }
805  offset += number_of_data;
806  }
807  else
808  {
809  offset++; // necessary????
810  }
811  } while (offset < (int) fields.size());
812 
813  return (iRet);
814  }
815 
816 
817  void SickGenericParser::checkScanTiming(float time_increment, float scan_time, float angle_increment, float tol)
818  {
819  if (this->getCurrentParamPtr()->getNumberOfLayers() > 1)
820  {
821  return;
822  }
823 
824  float expected_time_increment =
825  fabs(this->getCurrentParamPtr()->getNumberOfLayers() * scan_time * angle_increment / (2.0 * M_PI));//If the direction of rotation is reversed, i.e. negative angle increment, a negative scan time results. This does not makes sense, therefore the absolute value is calculated.
826  if (fabs(expected_time_increment - time_increment) > 0.00001)
827  {
829  "The time_increment, scan_time and angle_increment values reported by the scanner are inconsistent! "
830  "Expected time_increment: %.9f, reported time_increment: %.9f. "
831  "Perhaps you should set the parameter time_increment to the expected value. This message will print every 60 seconds.",
832  expected_time_increment, time_increment);
833  }
834  };
835 
836 
847  int SickGenericParser::parse_datagram(char *datagram, size_t datagram_length, SickScanConfig &config,
848  sensor_msgs::LaserScan &msg, int &numEchos, int &echoMask)
849  {
850  // echoMask introduced to get a workaround for cfg bug using MRS1104
851  // ros::NodeHandle tmpParam("~");
852  bool dumpData = false;
853  int verboseLevel = 0;
854  // tmpParam.getParam("verboseLevel", verboseLevel);
855 
856  int HEADER_FIELDS = 32;
857  char *cur_field;
858  size_t count;
859  int scannerIdx = lookUpForAllowedScanner(getScannerType());
860 
861  // Reserve sufficient space
862  std::vector<char *> fields;
863  fields.reserve(datagram_length / 2);
864 
865  // ----- only for debug output
866  std::vector<char> datagram_copy_vec;
867  datagram_copy_vec.resize(datagram_length + 1); // to avoid using malloc. destructor frees allocated mem.
868  char *datagram_copy = &(datagram_copy_vec[0]);
869 
870  if (verboseLevel > 0)
871  {
872  ROS_WARN("Verbose LEVEL activated. Only for DEBUG.");
873  }
874 
875  if (verboseLevel > 0)
876  {
877  static int cnt = 0;
878  char szDumpFileName[511] = {0};
879  char szDir[255] = {0};
880 #ifdef _MSC_VER
881  strcpy(szDir,"C:\\temp\\");
882 #else
883  strcpy(szDir, "/tmp/");
884 #endif
885  sprintf(szDumpFileName, "%stmp%06d.bin", szDir, cnt);
886  bool isBinary = this->getCurrentParamPtr()->getUseBinaryProtocol();
887  if (isBinary)
888  {
889  FILE *ftmp;
890  ftmp = fopen(szDumpFileName, "wb");
891  if (ftmp != NULL)
892  {
893  fwrite(datagram, datagram_length, 1, ftmp);
894  fclose(ftmp);
895  }
896  }
897  cnt++;
898  }
899 
900  strncpy(datagram_copy, datagram, datagram_length); // datagram will be changed by strtok
901  datagram_copy[datagram_length] = 0;
902 
903  // ----- tokenize
904  count = 0;
905  cur_field = strtok(datagram, " ");
906 
907  while (cur_field != NULL)
908  {
909  fields.push_back(cur_field);
910  //std::cout << cur_field << std::endl;
911  cur_field = strtok(NULL, " ");
912  }
913 
914  //std::cout << fields[27] << std::endl;
915 
916  count = fields.size();
917 
918 
919  if (verboseLevel > 0)
920  {
921  static int cnt = 0;
922  char szDumpFileName[511] = {0};
923  char szDir[255] = {0};
924 #ifdef _MSC_VER
925  strcpy(szDir,"C:\\temp\\");
926 #else
927  strcpy(szDir, "/tmp/");
928 #endif
929  sprintf(szDumpFileName, "%stmp%06d.txt", szDir, cnt);
930  ROS_WARN("Verbose LEVEL activated. Only for DEBUG.");
931  FILE *ftmp;
932  ftmp = fopen(szDumpFileName, "w");
933  if (ftmp != NULL)
934  {
935  int i;
936  for (i = 0; i < count; i++)
937  {
938  fprintf(ftmp, "%3d: %s\n", i, fields[i]);
939  }
940  fclose(ftmp);
941  }
942  cnt++;
943  }
944 
945  // Validate header. Total number of tokens is highly unreliable as this may
946  // change when you change the scanning range or the device name using SOPAS ET
947  // tool. The header remains stable, however.
948  if (count < HEADER_FIELDS)
949  {
950  ROS_WARN(
951  "received less fields than minimum fields (actual: %d, minimum: %d), ignoring scan", (int) count,
952  HEADER_FIELDS);
953  ROS_WARN(
954  "are you using the correct node? (124 --> sick_tim310_1130000m01, > 33 --> sick_tim551_2050001, 580 --> sick_tim310s01, 592 --> sick_tim310)");
955  // ROS_DEBUG("received message was: %s", datagram_copy);
956  return ExitError;
957  }
958 
959  if (basicParams[scannerIdx].getNumberOfLayers() == 1)
960  {
961  if (strcmp(fields[15], "0"))
962  {
963  ROS_WARN("Field 15 of received data is not equal to 0 (%s). Unexpected data, ignoring scan", fields[15]);
964  return ExitError;
965  }
966  }
967  else // fields[15] enthält keine "0"
968  {
969 
970  //other layers are here on alternate values
971  // ROS_WARN("Field 15 of received data is not equal to 0 (%s). Unexpected data, ignoring scan", fields[15]);
972  // return ExitError;
973  }
974  if (strcmp(fields[20], "DIST1"))
975  {
976  ROS_WARN("Field 20 of received data is not equal to DIST1i (%s). Unexpected data, ignoring scan", fields[20]);
977  return ExitError;
978  }
979 
980  // More in depth checks: check data length and RSSI availability
981  // 25: Number of data (<= 10F)
982  unsigned short int number_of_data = 0;
983  sscanf(fields[25], "%hx", &number_of_data);
984 
985  int numOfExpectedShots = basicParams[scannerIdx].getNumberOfShots();
986  if (number_of_data < 1 || number_of_data > numOfExpectedShots)
987  {
988  ROS_WARN("Data length is outside acceptable range 1-%d (%d). Ignoring scan", numOfExpectedShots, number_of_data);
989  return ExitError;
990  }
991  if (count < HEADER_FIELDS + number_of_data)
992  {
993  ROS_WARN("Less fields than expected for %d data points (%zu). Ignoring scan", number_of_data, count);
994  return ExitError;
995  }
996  ROS_DEBUG("Number of data: %d", number_of_data);
997 
998  // Calculate offset of field that contains indicator of whether or not RSSI data is included
999  size_t rssi_idx = 26 + number_of_data;
1000  bool rssi = false;
1001  if (strcmp(fields[rssi_idx], "RSSI1") == 0)
1002  {
1003  rssi = true;
1004  }
1005  unsigned short int number_of_rssi_data = 0;
1006  if (rssi)
1007  {
1008  sscanf(fields[rssi_idx + 5], "%hx", &number_of_rssi_data);
1009 
1010  // Number of RSSI data should be equal to number of data
1011  if (number_of_rssi_data != number_of_data)
1012  {
1013  ROS_WARN("Number of RSSI data is lower than number of range data (%d vs %d", number_of_data,
1014  number_of_rssi_data);
1015  return ExitError;
1016  }
1017 
1018  // Check if the total length is still appropriate.
1019  // RSSI data size = number of RSSI readings + 6 fields describing the data
1020  if (count < HEADER_FIELDS + number_of_data + number_of_rssi_data + 6)
1021  {
1022  ROS_WARN("Less fields than expected for %d data points (%zu). Ignoring scan", number_of_data, count);
1023  return ExitError;
1024  }
1025 
1026  if (strcmp(fields[rssi_idx], "RSSI1"))
1027  {
1028  ROS_WARN("Field %zu of received data is not equal to RSSI1 (%s). Unexpected data, ignoring scan", rssi_idx + 1,
1029  fields[rssi_idx + 1]);
1030  }
1031  }
1032 
1033  if (basicParams[scannerIdx].getNumberOfLayers() > 1)
1034  {
1035  short layer = -1;
1036  sscanf(fields[15], "%hx", &layer);
1037  msg.header.seq = layer;
1038  }
1039  // ----- read fields into msg
1040  msg.header.frame_id = config.frame_id;
1041  // evtl. debug stream benutzen
1042  // ROS_DEBUG("publishing with frame_id %s", config.frame_id.c_str());
1043 
1044  ros::Time start_time = ros::Time::now(); // will be adjusted in the end
1045 
1046 
1047  /*
1048 
1049  */
1050  // <STX> (\x02)
1051  // 0: Type of command (SN)
1052  // 1: Command (LMDscandata)
1053  // 2: Firmware version number (1)
1054  // 3: Device number (1)
1055  // 4: Serial number (eg. B96518)
1056  // 5 + 6: Device Status (0 0 = ok, 0 1 = error)
1057  // 7: Telegram counter (eg. 99)
1058  // 8: Scan counter (eg. 9A)
1059  // 9: Time since startup (eg. 13C8E59)
1060  // 10: Time of transmission (eg. 13C9CBE)
1061  // 11 + 12: Input status (0 0), active fieldset
1062  /*
1063  unsigned short u16_active_fieldset = 0;
1064  if(sscanf(fields[12], "%hx", &u16_active_fieldset) == 1)
1065  {
1066  SickScanFieldMonSingleton *fieldMon = SickScanFieldMonSingleton::getInstance();
1067  if(fieldMon)
1068  {
1069  fieldMon->setActiveFieldset(u16_active_fieldset & 0xFF);
1070  ROS_INFO("Scandata: active_fieldset = %d", fieldMon->getActiveFieldset());
1071  }
1072  }
1073  */
1074  // 13 + 14: Output status (8 0)
1075  // 15: Reserved Byte A (0)
1076 
1077  // 16: Scanning Frequency (5DC)
1078  unsigned short scanning_freq = -1;
1079  sscanf(fields[16], "%hx", &scanning_freq);
1080  msg.scan_time = 1.0 / (scanning_freq / 100.0);
1081  // ROS_DEBUG("hex: %s, scanning_freq: %d, scan_time: %f", fields[16], scanning_freq, msg.scan_time);
1082 
1083  // 17: Measurement Frequency (36)
1084  unsigned short measurement_freq = -1;
1085  sscanf(fields[17], "%hx", &measurement_freq);
1086  msg.time_increment = 1.0 / (measurement_freq * 100.0);
1087  if (override_time_increment_ > 0.0)
1088  {
1089  // Some lasers may report incorrect measurement frequency
1090  msg.time_increment = override_time_increment_;
1091  }
1092  // ROS_DEBUG("measurement_freq: %d, time_increment: %f", measurement_freq, msg.time_increment);
1093 
1094  // 18: Number of encoders (0)
1095  // 19: Number of 16 bit channels (1)
1096  // 20: Measured data contents (DIST1)
1097 
1098  // 21: Scaling factor (3F800000)
1099  // ignored for now (is always 1.0):
1100  // unsigned int scaling_factor_int = -1;
1101  // sscanf(fields[21], "%x", &scaling_factor_int);
1102  //
1103  // float scaling_factor = reinterpret_cast<float&>(scaling_factor_int);
1104  // // ROS_DEBUG("hex: %s, scaling_factor_int: %d, scaling_factor: %f", fields[21], scaling_factor_int, scaling_factor);
1105 
1106  // 22: Scaling offset (00000000) -- always 0
1107  // 23: Starting angle (FFF92230)
1108  int starting_angle = -1;
1109  sscanf(fields[23], "%x", &starting_angle);
1110  msg.angle_min = (starting_angle / 10000.0) / 180.0 * M_PI +this->getCurrentParamPtr()->getScanAngleShift();
1111  // ROS_DEBUG("starting_angle: %d, angle_min: %f", starting_angle, msg.angle_min);
1112 
1113  // 24: Angular step width (2710)
1114  unsigned short angular_step_width = -1;
1115  sscanf(fields[24], "%hx", &angular_step_width);
1116  msg.angle_increment = (angular_step_width / 10000.0) / 180.0 * M_PI;
1117  msg.angle_max = msg.angle_min + (number_of_data - 1) * msg.angle_increment;
1118 
1119  // 25: Number of data (<= 10F)
1120  // This is already determined above in number_of_data
1121  int index_min = 0;
1122 
1123 #if 1 // neuer Ansatz
1124  int distNum = 0;
1125  int rssiNum = 0;
1126 
1127 
1128  checkForDistAndRSSI(fields, number_of_data, distNum, rssiNum, msg.ranges, msg.intensities, echoMask);
1129  if (config.intensity)
1130  {
1131  if (rssiNum > 0)
1132  {
1133 
1134  }
1135  else
1136  {
1137  ROS_WARN_ONCE("Intensity parameter is enabled, but the scanner is not configured to send RSSI values! "
1138  "Please read the section 'Enabling intensity (RSSI) output' here: http://wiki.ros.org/sick_tim.");
1139  }
1140  }
1141  numEchos = distNum;
1142 #endif
1143  // 26 + n: RSSI data included
1144  // IF RSSI not included:
1145  // 26 + n + 1 .. 26 + n + 3 = unknown (but seems to be [0, 1, B] always)
1146  // 26 + n + 4 .. count - 4 = device label
1147  // count - 3 .. count - 1 = unknown (but seems to be 0 always)
1148  // <ETX> (\x03)
1149 
1150  msg.range_min = override_range_min_;
1151  msg.range_max = override_range_max_;
1152 
1153  if (basicParams[scannerIdx].getNumberOfLayers() > 1)
1154  {
1155  char szDummy[255] = {0};
1156  sprintf(szDummy, "%s_%+04d", config.frame_id.c_str(), msg.header.seq);
1157  msg.header.frame_id = szDummy;
1158  }
1159  // ----- adjust start time
1160  // - last scan point = now ==> first scan point = now - number_of_data * time increment
1161 #ifndef _MSC_VER // TIMING in Simulation not correct
1162  msg.header.stamp = start_time - ros::Duration().fromSec(number_of_data * msg.time_increment);
1163 
1164  // - shift forward to time of first published scan point
1165  msg.header.stamp += ros::Duration().fromSec((double) index_min * msg.time_increment);
1166 
1167  // - add time offset (to account for USB latency etc.)
1168  msg.header.stamp += ros::Duration().fromSec(config.time_offset);
1169 #endif
1170  // ----- consistency check
1171 
1172  this->checkScanTiming(msg.time_increment, msg.scan_time, msg.angle_increment, 0.00001f);
1173  return ExitSuccess;
1174  }
1175 
1176 
1183  {
1185  }
1186 
1193  {
1194  override_range_max_ = max;
1195  }
1196 
1197 
1204  {
1205  return (override_range_max_);
1206  }
1207 
1214  {
1215  return (override_range_min_);
1216  }
1217 
1224  {
1225  override_time_increment_ = time;
1226  }
1227 
1234  void SickGenericParser::setScannerType(std::string _scannerType)
1235  {
1236  scannerType = _scannerType;
1237  }
1238 
1245  {
1246  return (scannerType);
1247 
1248  }
1249 
1250 } /* namespace sick_scan */
sick_scan::ScannerBasicParam::getScannerName
std::string getScannerName(void)
Getting name (type) of scanner.
Definition: sick_generic_parser.cpp:86
sick_scan::ScannerBasicParam::setNumberOfMaximumEchos
void setNumberOfMaximumEchos(int _maxEchos)
Set number of maximum echoes for this laser scanner type.
Definition: sick_generic_parser.cpp:143
min
int min(int a, int b)
sick_scan::ScannerBasicParam::getScanMirroredAndShifted
bool getScanMirroredAndShifted()
flag to mark mirroring of rotation direction
Definition: sick_generic_parser.cpp:280
msg
msg
DurationBase< Duration >::fromSec
Duration & fromSec(double t)
sick_scan::ScannerBasicParam::getAngularDegreeResolution
double getAngularDegreeResolution(void)
Get angular resolution in degress.
Definition: sick_generic_parser.cpp:187
sick_scan::USE_EVAL_FIELD_LMS5XX_LOGIC
@ USE_EVAL_FIELD_LMS5XX_LOGIC
Definition: sick_generic_parser.h:65
sick_scan::SickGenericParser::scannerType
std::string scannerType
Definition: sick_generic_parser.h:200
sick_scan::EVAL_FIELD_SUPPORT
EVAL_FIELD_SUPPORT
Definition: sick_generic_parser.h:61
sick_scan::SickGenericParser::lookUpForAllowedScanner
int lookUpForAllowedScanner(std::string scannerName)
checks the given scannerName/scannerType of validity
Definition: sick_generic_parser.cpp:693
sick_scan::ExitError
@ ExitError
Definition: abstract_parser.h:47
sick_scan::SickGenericParser::setCurrentParamPtr
void setCurrentParamPtr(ScannerBasicParam *_ptr)
Set pointer to corresponding parameter object to the parser.
Definition: sick_generic_parser.cpp:166
sick_scan::ScannerBasicParam::getEncoderMode
int8_t getEncoderMode()
Getter-Method for encoder mode.
Definition: sick_generic_parser.cpp:395
sick_scan::USE_EVAL_FIELD_TIM7XX_LOGIC
@ USE_EVAL_FIELD_TIM7XX_LOGIC
Definition: sick_generic_parser.h:64
sick_scan::SickGenericParser::setScannerType
void setScannerType(std::string s)
setting scannertype
Definition: sick_generic_parser.cpp:1234
ROS_WARN_THROTTLE
#define ROS_WARN_THROTTLE(period,...)
ros.h
sick_scan::ScannerBasicParam::getMaxEvalFields
int getMaxEvalFields(void)
Definition: sick_generic_parser.cpp:345
sick_scan::SickGenericParser::override_time_increment_
float override_time_increment_
Definition: sick_generic_parser.h:199
sick_scan::ScannerBasicParam::setEncoderMode
void setEncoderMode(int8_t _EncoderMode)
Prama for encoder mode.
Definition: sick_generic_parser.cpp:384
sick_scan::ScannerBasicParam::getDeviceIsRadar
bool getDeviceIsRadar(void)
flag to mark the device as radar (instead of laser scanner)
Definition: sick_generic_parser.cpp:260
sick_scan::ExitSuccess
@ ExitSuccess
Definition: abstract_parser.h:46
sick_scan::EVAL_FIELD_UNSUPPORTED
@ EVAL_FIELD_UNSUPPORTED
Definition: sick_generic_parser.h:63
SICK_SCANNER_LMS_1XX_NAME
#define SICK_SCANNER_LMS_1XX_NAME
Definition: sick_generic_parser.h:46
sick_scan::SickGenericParser::checkForDistAndRSSI
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
Definition: sick_generic_parser.cpp:728
sick_scan::ScannerBasicParam::setIntensityResolutionIs16Bit
void setIntensityResolutionIs16Bit(bool _IntensityResolutionIs16Bit)
Set the RSSI Value length.
Definition: sick_generic_parser.cpp:300
ROS_WARN_ONCE
#define ROS_WARN_ONCE(...)
sick_scan::ScannerBasicParam
Definition: sick_generic_parser.h:70
sick_scan::AbstractParser
Definition: abstract_parser.h:51
sick_scan_common.h
sick_scan::SickGenericParser::override_range_max_
float override_range_max_
Definition: sick_generic_parser.h:198
sick_scan::ScannerBasicParam::getScanAngleShift
double getScanAngleShift()
Definition: sick_generic_parser.cpp:360
sick_scan::ScannerBasicParam::setExpectedFrequency
void setExpectedFrequency(double _freq)
set expected scan frequency
Definition: sick_generic_parser.cpp:197
SICK_SCANNER_TIM_7XX_NAME
#define SICK_SCANNER_TIM_7XX_NAME
Definition: sick_generic_parser.h:43
sick_scan::SickGenericParser::set_range_min
void set_range_min(float min)
Setting minimum range.
Definition: sick_generic_parser.cpp:1182
sick_scan::ScannerBasicParam::setMaxEvalFields
void setMaxEvalFields(int _maxEvalFields)
Definition: sick_generic_parser.cpp:350
sick_scan::ScannerBasicParam::ScannerBasicParam
ScannerBasicParam()
Construction of parameter object.
Definition: sick_generic_parser.cpp:370
sick_scan::SickGenericParser::SickGenericParser
SickGenericParser(std::string scannerType)
Construction of parser object.
Definition: sick_generic_parser.cpp:405
ROS_DEBUG
#define ROS_DEBUG(...)
sick_scan::SickGenericParser::currentParamSet
ScannerBasicParam * currentParamSet
Definition: sick_generic_parser.h:203
sick_scan::SickGenericParser::basicParams
std::vector< ScannerBasicParam > basicParams
Definition: sick_generic_parser.h:202
sick_scan::ScannerBasicParam::setNumberOfShots
void setNumberOfShots(int _shots)
Set number of shots per scan.
Definition: sick_generic_parser.cpp:121
sick_scan::ScannerBasicParam::setElevationDegreeResolution
void setElevationDegreeResolution(double _elevRes)
set angular resolution in VERTICAL direction for multilayer scanner
Definition: sick_generic_parser.cpp:219
sick_scan::SickGenericParser::checkScanTiming
void checkScanTiming(float time_increment, float scan_time, float angle_increment, float tol)
Definition: sick_generic_parser.cpp:817
SICK_SCANNER_LMS_1XXX_NAME
#define SICK_SCANNER_LMS_1XXX_NAME
Definition: sick_generic_parser.h:39
sick_scan::SickGenericParser::allowedScannerNames
std::vector< std::string > allowedScannerNames
Definition: sick_generic_parser.h:201
sick_scan::ScannerBasicParam::setScannerName
void setScannerName(std::string _s)
Setting name (type) of scanner.
Definition: sick_generic_parser.cpp:75
ROS_WARN
#define ROS_WARN(...)
sick_scan
Definition: abstract_parser.cpp:50
sick_scan::ScannerBasicParam::getUseEvalFields
EVAL_FIELD_SUPPORT getUseEvalFields()
Definition: sick_generic_parser.cpp:335
SICK_SCANNER_LMS_4XXX_NAME
#define SICK_SCANNER_LMS_4XXX_NAME
Definition: sick_generic_parser.h:48
sick_scan::ScannerBasicParam::getNumberOfMaximumEchos
int getNumberOfMaximumEchos(void)
Get number of maximum echoes for this laser scanner type.
Definition: sick_generic_parser.cpp:155
sick_scan::SickGenericParser::get_range_max
float get_range_max(void)
Getting maximum range.
Definition: sick_generic_parser.cpp:1203
sick_scan::SickGenericParser::getScannerType
std::string getScannerType(void)
getting scannertype
Definition: sick_generic_parser.cpp:1244
sick_scan::ScannerBasicParam::setDeviceIsRadar
void setDeviceIsRadar(bool _deviceIsRadar)
flag to mark the device as radar (instead of laser scanner)
Definition: sick_generic_parser.cpp:250
sick_scan::SickGenericParser::get_range_min
float get_range_min(void)
Getting minimum range.
Definition: sick_generic_parser.cpp:1213
SICK_SCANNER_MRS_1XXX_NAME
#define SICK_SCANNER_MRS_1XXX_NAME
Definition: sick_generic_parser.h:40
SICK_SCANNER_TIM_7XXS_NAME
#define SICK_SCANNER_TIM_7XXS_NAME
Definition: sick_generic_parser.h:44
sick_scan::SickGenericParser::parse_datagram
virtual int parse_datagram(char *datagram, size_t datagram_length, SickScanConfig &config, sensor_msgs::LaserScan &msg, int &numEchos, int &echoMask)
Parsing Ascii datagram.
Definition: sick_generic_parser.cpp:847
sick_scan::ScannerBasicParam::setAngularDegreeResolution
void setAngularDegreeResolution(double _res)
Set angular resolution in degrees.
Definition: sick_generic_parser.cpp:177
sick_scan::ScannerBasicParam::encoderMode
int8_t encoderMode
Definition: sick_generic_parser.h:150
sick_scan::ScannerBasicParam::setUseEvalFields
void setUseEvalFields(EVAL_FIELD_SUPPORT _useEvalFields)
Definition: sick_generic_parser.cpp:340
sick_scan::ScannerBasicParam::getElevationDegreeResolution
double getElevationDegreeResolution(void)
get angular resolution in VERTICAL direction for multilayer scanner
Definition: sick_generic_parser.cpp:230
ros::Time
sick_scan::ScannerBasicParam::getNumberOfShots
int getNumberOfShots(void)
Get number of shots per scan.
Definition: sick_generic_parser.cpp:132
SICK_SCANNER_NAV_3XX_NAME
#define SICK_SCANNER_NAV_3XX_NAME
Definition: sick_generic_parser.h:50
sick_scan::ScannerBasicParam::getIntensityResolutionIs16Bit
bool getIntensityResolutionIs16Bit(void)
Get the RSSI Value length.
Definition: sick_generic_parser.cpp:310
std
sick_scan::ScannerBasicParam::getUseSafetyPasWD
bool getUseSafetyPasWD()
flag to mark the device uses the safety scanner password \reutrn Bool true for safety password false ...
Definition: sick_generic_parser.cpp:330
sick_scan::SickGenericParser::~SickGenericParser
virtual ~SickGenericParser()
Destructor of parser.
Definition: sick_generic_parser.cpp:711
ROS_ERROR
#define ROS_ERROR(...)
sick_scan::SickGenericParser::getCurrentParamPtr
ScannerBasicParam * getCurrentParamPtr()
Gets Pointer to parameter object.
Definition: sick_generic_parser.cpp:683
sick_scan::ScannerBasicParam::getExpectedFrequency
double getExpectedFrequency(void)
get expected scan frequency
Definition: sick_generic_parser.cpp:208
sick_scan::ScannerBasicParam::elevationDegreeResolution
double elevationDegreeResolution
Definition: sick_generic_parser.h:143
sick_scan::ScannerBasicParam::setScanAngleShift
void setScanAngleShift(double _scanAngleShift)
Definition: sick_generic_parser.cpp:355
sick_scan::ScannerBasicParam::setScanMirroredAndShifted
void setScanMirroredAndShifted(bool _scanMirroredAndShifted)
flag to mark mirroring of rotation direction
Definition: sick_generic_parser.cpp:270
SICK_SCANNER_NAV_2XX_NAME
#define SICK_SCANNER_NAV_2XX_NAME
Definition: sick_generic_parser.h:51
SICK_SCANNER_LMS_5XX_NAME
#define SICK_SCANNER_LMS_5XX_NAME
Definition: sick_generic_parser.h:45
sick_scan::SickGenericParser::set_range_max
void set_range_max(float max)
Setting maximum range.
Definition: sick_generic_parser.cpp:1192
sick_scan::ScannerBasicParam::getNumberOfLayers
int getNumberOfLayers(void)
Getting number of scanner layers.
Definition: sick_generic_parser.cpp:109
sick_scan::ScannerBasicParam::setUseSafetyPasWD
void setUseSafetyPasWD(bool _useSafetyPasWD)
flag to mark the device uses the safety scanner password
Definition: sick_generic_parser.cpp:320
SICK_SCANNER_TIM_5XX_NAME
#define SICK_SCANNER_TIM_5XX_NAME
Definition: sick_generic_parser.h:42
SICK_SCANNER_RMS_3XX_NAME
#define SICK_SCANNER_RMS_3XX_NAME
Definition: sick_generic_parser.h:49
ros::Duration
sick_scan::SickGenericParser::set_time_increment
void set_time_increment(float time)
setting time increment between shots
Definition: sick_generic_parser.cpp:1223
sick_scan::ScannerBasicParam::setUseBinaryProtocol
void setUseBinaryProtocol(bool _useBinary)
flag to decide between usage of ASCII-sopas or BINARY-sopas
Definition: sick_generic_parser.cpp:240
sick_scan::ScannerBasicParam::setNumberOfLayers
void setNumberOfLayers(int _layerNum)
Setting number of scanner layers (depending of scanner type/family)
Definition: sick_generic_parser.cpp:98
sick_scan::ScannerBasicParam::getUseBinaryProtocol
bool getUseBinaryProtocol(void)
flag to decide between usage of ASCII-sopas or BINARY-sopas
Definition: sick_generic_parser.cpp:290
sick_scan::SickGenericParser::override_range_min_
float override_range_min_
Definition: sick_generic_parser.h:198
SICK_SCANNER_TIM_240_NAME
#define SICK_SCANNER_TIM_240_NAME
Definition: sick_generic_parser.h:41
ros::Time::now
static Time now()
SICK_SCANNER_MRS_6XXX_NAME
#define SICK_SCANNER_MRS_6XXX_NAME
Definition: sick_generic_parser.h:47
SICK_SCANNER_TIM_4XX_NAME
#define SICK_SCANNER_TIM_4XX_NAME
Definition: sick_generic_parser.h:52


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Thu Sep 8 2022 02:30:19