Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
SickToolbox::SickLMS2xx Class Reference

A general class for interfacing w/ SickLMS2xx2xx laser range finders. More...

#include <SickLMS2xx.hh>

Inheritance diagram for SickToolbox::SickLMS2xx:
Inheritance graph
[legend]

List of all members.

Classes

struct  sick_lms_2xx_baud_status_tag
 A structure for aggregating the data that collectively define the baud config. More...
struct  sick_lms_2xx_device_config_tag
 A structure for aggregating the data that collectively defines the Sick's config. More...
struct  sick_lms_2xx_field_status_tag
 A structure for aggregating the data that collectively define the signal config and status. More...
struct  sick_lms_2xx_operating_status_tag
 A structure for aggregating the data that collectively defines the operating status of the device. More...
struct  sick_lms_2xx_pollution_status_tag
 A structure for aggregating the data that collectively defines the pollution values and settings for the device. More...
struct  sick_lms_2xx_restart_status_tag
 A structure for aggregating the data that collectively defines the system restart config for the Sick LMS 2xx unit. More...
struct  sick_lms_2xx_scan_profile_b0_tag
 A structure for aggregating the data that define a scan profile obtained from reply B0 (See page 49 Telegram listing) More...
struct  sick_lms_2xx_scan_profile_b6_tag
 A structure for aggregating the data that define a scan profile obtained from reply B6 (See page 61 Telegram listing) More...
struct  sick_lms_2xx_scan_profile_b7_tag
 A structure for aggregating the data that define a scan profile obtained from reply B7 (See page 63 Telegram listing) More...
struct  sick_lms_2xx_scan_profile_bf_tag
 A structure for aggregating the data that define a scan profile obtained from reply BF (See page 71 Telegram listing) More...
struct  sick_lms_2xx_scan_profile_c4_tag
 A structure for aggregating the data that define a scan profile obtained from reply B4 (See page 79 Telegram listing) More...
struct  sick_lms_2xx_signal_status_tag
 A structure for aggregating the data that collectively define the signal config and status. More...
struct  sick_lms_2xx_software_status_tag
 A structure for aggregating the data that collectively defines the system software for the Sick LMS 2xx unit. More...

Public Types

typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_baud_status_tag 
sick_lms_2xx_baud_status_t
 Adopt c-style convention.
enum  sick_lms_2xx_baud_t {
  SICK_BAUD_9600 = 0x42, SICK_BAUD_19200 = 0x41, SICK_BAUD_38400 = 0x40, SICK_BAUD_500K = 0x48,
  SICK_BAUD_UNKNOWN = 0xFF
}
 Defines available Sick LMS 2xx baud rates. More...
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_device_config_tag 
sick_lms_2xx_device_config_t
 Adopt c-style convention.
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_field_status_tag 
sick_lms_2xx_field_status_t
 Adopt c-style convention.
enum  sick_lms_2xx_measuring_mode_t {
  SICK_MS_MODE_8_OR_80_FA_FB_DAZZLE = 0x00, SICK_MS_MODE_8_OR_80_REFLECTOR = 0x01, SICK_MS_MODE_8_OR_80_FA_FB_FC = 0x02, SICK_MS_MODE_16_REFLECTOR = 0x03,
  SICK_MS_MODE_16_FA_FB = 0x04, SICK_MS_MODE_32_REFLECTOR = 0x05, SICK_MS_MODE_32_FA = 0x06, SICK_MS_MODE_32_IMMEDIATE = 0x0F,
  SICK_MS_MODE_REFLECTIVITY = 0x3F, SICK_MS_MODE_UNKNOWN = 0xFF
}
 Defines the measurment modes supported by Sick LMS 2xx. More...
enum  sick_lms_2xx_measuring_units_t { SICK_MEASURING_UNITS_CM = 0x00, SICK_MEASURING_UNITS_MM = 0x01, SICK_MEASURING_UNITS_UNKNOWN = 0xFF }
 Defines the available Sick LMS 2xx measured value units. More...
enum  sick_lms_2xx_operating_mode_t {
  SICK_OP_MODE_INSTALLATION = 0x00, SICK_OP_MODE_DIAGNOSTIC = 0x10, SICK_OP_MODE_MONITOR_STREAM_MIN_VALUE_FOR_EACH_SEGMENT = 0x20, SICK_OP_MODE_MONITOR_TRIGGER_MIN_VALUE_ON_OBJECT = 0x21,
  SICK_OP_MODE_MONITOR_STREAM_MIN_VERT_DIST_TO_OBJECT = 0x22, SICK_OP_MODE_MONITOR_TRIGGER_MIN_VERT_DIST_TO_OBJECT = 0x23, SICK_OP_MODE_MONITOR_STREAM_VALUES = 0x24, SICK_OP_MODE_MONITOR_REQUEST_VALUES = 0x25,
  SICK_OP_MODE_MONITOR_STREAM_MEAN_VALUES = 0x26, SICK_OP_MODE_MONITOR_STREAM_VALUES_SUBRANGE = 0x27, SICK_OP_MODE_MONITOR_STREAM_MEAN_VALUES_SUBRANGE = 0x28, SICK_OP_MODE_MONITOR_STREAM_VALUES_WITH_FIELDS = 0x29,
  SICK_OP_MODE_MONITOR_STREAM_VALUES_FROM_PARTIAL_SCAN = 0x2A, SICK_OP_MODE_MONITOR_STREAM_RANGE_AND_REFLECT_FROM_PARTIAL_SCAN = 0x2B, SICK_OP_MODE_MONITOR_STREAM_MIN_VALUES_FOR_EACH_SEGMENT_SUBRANGE = 0x2C, SICK_OP_MODE_MONITOR_NAVIGATION = 0x2E,
  SICK_OP_MODE_MONITOR_STREAM_RANGE_AND_REFLECT = 0x50, SICK_OP_MODE_UNKNOWN = 0xFF
}
 Defines the operating modes supported by Sick LMS 2xx. See page 41 of the LMS 2xx telegram manual for additional descriptions of these modes. More...
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_operating_status_tag 
sick_lms_2xx_operating_status_t
 Adopt c-style convention.
enum  sick_lms_2xx_peak_threshold_t {
  SICK_PEAK_THRESHOLD_DETECTION_WITH_NO_BLACK_EXTENSION = 0x00, SICK_PEAK_THRESHOLD_DETECTION_WITH_BLACK_EXTENSION = 0x01, SICK_PEAK_THRESHOLD_NO_DETECTION_WITH_NO_BLACK_EXTENSION = 0x02, SICK_PEAK_THRESHOLD_NO_DETECTION_WITH_BLACK_EXTENSION = 0x03,
  SICK_PEAK_THRESHOLD_UNKNOWN = 0xFF
}
 Sick peak threshold. Only valid for Sick LMS 200/220! More...
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_pollution_status_tag 
sick_lms_2xx_pollution_status_t
 Adopt c-style convention.
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_restart_status_tag 
sick_lms_2xx_restart_status_t
enum  sick_lms_2xx_scan_angle_t { SICK_SCAN_ANGLE_90 = 90, SICK_SCAN_ANGLE_100 = 100, SICK_SCAN_ANGLE_180 = 180, SICK_SCAN_ANGLE_UNKNOWN = 0xFF }
 Defines the scan angle for the Sick LMS 2xx. More...
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_scan_profile_b0_tag 
sick_lms_2xx_scan_profile_b0_t
 Adopt c-style convention.
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_scan_profile_b6_tag 
sick_lms_2xx_scan_profile_b6_t
 Adopt c-style convention.
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_scan_profile_b7_tag 
sick_lms_2xx_scan_profile_b7_t
 Adopt c-style convention.
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_scan_profile_bf_tag 
sick_lms_2xx_scan_profile_bf_t
 Adopt c-style convention.
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_scan_profile_c4_tag 
sick_lms_2xx_scan_profile_c4_t
 Adopt c-style convention.
enum  sick_lms_2xx_scan_resolution_t { SICK_SCAN_RESOLUTION_25 = 25, SICK_SCAN_RESOLUTION_50 = 50, SICK_SCAN_RESOLUTION_100 = 100, SICK_SCAN_RESOLUTION_UNKNOWN = 0xFF }
 Defines the available resolution settings for the Sick LMS 2xx. More...
enum  sick_lms_2xx_sensitivity_t {
  SICK_SENSITIVITY_STANDARD = 0x00, SICK_SENSITIVITY_MEDIUM = 0x01, SICK_SENSITIVITY_LOW = 0x02, SICK_SENSITIVITY_HIGH = 0x03,
  SICK_SENSITIVITY_UNKNOWN = 0xFF
}
 Sick sensitivities. Only valid for Sick LMS 211/221/291! More...
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_signal_status_tag 
sick_lms_2xx_signal_status_t
 Adopt c-style convention.
typedef struct
SickToolbox::SickLMS2xx::sick_lms_2xx_software_status_tag 
sick_lms_2xx_software_status_t
 Adopt c-style convention.
enum  sick_lms_2xx_status_t { SICK_STATUS_OK = 0x00, SICK_STATUS_ERROR = 0x01, SICK_STATUS_UNKNOWN = 0xFF }
 Defines the status of the Sick LMS 2xx unit. More...
enum  sick_lms_2xx_type_t {
  SICK_LMS_TYPE_200_30106, SICK_LMS_TYPE_211_30106, SICK_LMS_TYPE_211_30206, SICK_LMS_TYPE_211_S07,
  SICK_LMS_TYPE_211_S14, SICK_LMS_TYPE_211_S15, SICK_LMS_TYPE_211_S19, SICK_LMS_TYPE_211_S20,
  SICK_LMS_TYPE_220_30106, SICK_LMS_TYPE_221_30106, SICK_LMS_TYPE_221_30206, SICK_LMS_TYPE_221_S07,
  SICK_LMS_TYPE_221_S14, SICK_LMS_TYPE_221_S15, SICK_LMS_TYPE_221_S16, SICK_LMS_TYPE_221_S19,
  SICK_LMS_TYPE_221_S20, SICK_LMS_TYPE_291_S05, SICK_LMS_TYPE_291_S14, SICK_LMS_TYPE_291_S15,
  SICK_LMS_TYPE_UNKNOWN = 0xFF
}
 Defines the Sick LMS 2xx types. This enum lists all of the supported Sick LMS models. More...
enum  sick_lms_2xx_variant_t { SICK_LMS_VARIANT_2XX_TYPE_6 = 0x00, SICK_LMS_VARIANT_SPECIAL = 0x01, SICK_LMS_VARIANT_UNKNOWN = 0xFF }
 Defines the Sick LMS 2xx variant type. More...

Public Member Functions

uint8_t GetSickAvailability () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx availability level flags.
std::string GetSickConfigAsString () const
 Acquire the Sick LMS's config as a printable string.
std::string GetSickDevicePath () const
 Gets the Sick LMS 2xx device path.
void GetSickMeanValues (const uint8_t sick_sample_size, unsigned int *const measurement_values, unsigned int &num_measurement_values, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Returns the most recent mean measured values from the Sick LMS 2xx.
void GetSickMeanValuesSubrange (const uint8_t sick_sample_size, const uint16_t sick_subrange_start_index, const uint16_t sick_subrange_stop_index, unsigned int *const measurement_values, unsigned int &num_measurement_values, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Returns the most recent mean measured values from the specified subrange.
sick_lms_2xx_measuring_mode_t GetSickMeasuringMode () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx measuring mode.
SickLMS2xx::sick_lms_2xx_measuring_units_t GetSickMeasuringUnits () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx measuring units.
sick_lms_2xx_operating_mode_t GetSickOperatingMode () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx operating mode.
void GetSickPartialScan (unsigned int *const measurement_values, unsigned int &num_measurement_values, unsigned int &partial_scan_index, unsigned int *const sick_field_a_values=NULL, unsigned int *const sick_field_b_values=NULL, unsigned int *const sick_field_c_values=NULL, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_scan_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Returns the most recent partial scan obtained by Sick LMS 2xx.
sick_lms_2xx_peak_threshold_t GetSickPeakThreshold () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx sensitivity level.
void GetSickScan (unsigned int *const measurement_values, unsigned int &num_measurement_values, unsigned int *const sick_field_a_values=NULL, unsigned int *const sick_field_b_values=NULL, unsigned int *const sick_field_c_values=NULL, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_scan_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Returns the most recent measured values obtained by the Sick LMS 2xx.
void GetSickScan (unsigned int *const range_values, unsigned int *const reflect_values, unsigned int &num_range_measurements, unsigned int &num_reflect_measurements, unsigned int *const sick_field_a_values=NULL, unsigned int *const sick_field_b_values=NULL, unsigned int *const sick_field_c_values=NULL, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_scan_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Acquires both range and reflectivity values from the Sick LMS 211/221/291-S14 (LMS-FAST)
double GetSickScanAngle () const throw ( SickConfigException )
 Gets the current scan angle of the device.
double GetSickScanResolution () const throw ( SickConfigException )
 Gets the current angular resolution.
void GetSickScanSubrange (const uint16_t sick_subrange_start_index, const uint16_t sick_subrange_stop_index, unsigned int *const measurement_values, unsigned int &num_measurement_values, unsigned int *const sick_field_a_values=NULL, unsigned int *const sick_field_b_values=NULL, unsigned int *const sick_field_c_values=NULL, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_scan_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Returns the most recent measured values from the corresponding subrange.
sick_lms_2xx_sensitivity_t GetSickSensitivity () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx sensitivity level.
std::string GetSickSoftwareVersionAsString () const
 Acquire the Sick LMS's operating params as a printable string.
sick_lms_2xx_status_t GetSickStatus () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Acquire the Sick LMS 2xx status.
std::string GetSickStatusAsString () const
 Acquire the Sick LMS's status as a printable string.
sick_lms_2xx_type_t GetSickType () const throw ( SickConfigException )
 Gets the Sick LMS 2xx type.
void Initialize (const sick_lms_2xx_baud_t desired_baud_rate, const uint32_t delay=0) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Attempts to initialize the Sick LMS 2xx and then sets communication at at the given baud rate.
bool IsSickLMS2xxFast () const throw ( SickConfigException )
 Indicates whether the device is an LMS Fast.
void PrintSickConfig () const
 Prints out the Sick LMS configurations parameters.
void PrintSickSoftwareVersion () const
 Prints out relevant software versioning information.
void PrintSickStatus () const
 Prints ths status of the Sick LMS 2xx unit.
void ResetSick () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Reset the Sick LMS 2xx active field values NOTE: Considered successful if the LMS ready message is received.
void SetSickAvailability (const uint8_t sick_availability_flags=SICK_FLAG_AVAILABILITY_DEFAULT) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the availability level of the device.
void SetSickMeasuringMode (const sick_lms_2xx_measuring_mode_t sick_measuring_mode=SICK_MS_MODE_8_OR_80_FA_FB_DAZZLE) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the measuring mode for the device.
void SetSickMeasuringUnits (const sick_lms_2xx_measuring_units_t sick_units=SICK_MEASURING_UNITS_MM) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the measurement units for the device.
void SetSickPeakThreshold (const sick_lms_2xx_peak_threshold_t sick_peak_threshold=SICK_PEAK_THRESHOLD_DETECTION_WITH_NO_BLACK_EXTENSION) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the Sick LMS sensitivity level.
void SetSickSensitivity (const sick_lms_2xx_sensitivity_t sick_sensitivity=SICK_SENSITIVITY_STANDARD) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the Sick LMS sensitivity level.
void SetSickVariant (const sick_lms_2xx_scan_angle_t scan_angle, const sick_lms_2xx_scan_resolution_t scan_resolution) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the variant of the Sick LMS 2xx (scan angle and scan resolution)
 SickLMS2xx (const std::string sick_device_path)
 Primary constructor.
void Uninitialize () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Uninitializes the LMS by putting it in a mode where it stops streaming data, and returns it to the default baud rate (specified in the header).
 ~SickLMS2xx ()
 Destructor.

Static Public Member Functions

static
sick_lms_2xx_scan_resolution_t 
DoubleToSickScanResolution (const double scan_resolution_double)
 Converts double to corresponding Sick LMS scan resolution.
static sick_lms_2xx_baud_t IntToSickBaud (const int baud_int)
 Converts integer to corresponding Sick LMS baud.
static sick_lms_2xx_scan_angle_t IntToSickScanAngle (const int scan_angle_int)
 Converts integer to corresponding Sick LMS scan angle.
static
sick_lms_2xx_scan_resolution_t 
IntToSickScanResolution (const int scan_resolution_int)
 Converts integer to corresponding Sick LMS scan resolution.
static std::string SickBaudToString (const sick_lms_2xx_baud_t baud_rate)
 Converts Sick LMS baud to a corresponding string.
static std::string SickMeasuringModeToString (const sick_lms_2xx_measuring_mode_t sick_measuring_mode)
 Converts the Sick measuring mode to a corresponding string.
static std::string SickMeasuringUnitsToString (const sick_lms_2xx_measuring_units_t sick_units)
 Converts the Sick LMS measurement units to a corresponding string.
static std::string SickOperatingModeToString (const sick_lms_2xx_operating_mode_t sick_operating_mode)
 Converts the Sick operating mode to a corresponding string.
static std::string SickPeakThresholdToString (const sick_lms_2xx_peak_threshold_t sick_peak_threshold)
 Converts Sick LMS 2xx peak threshold to a corresponding string.
static std::string SickSensitivityToString (const sick_lms_2xx_sensitivity_t sick_sensitivity)
 Converts Sick LMS 2xx sensitivity level to a corresponding string.
static std::string SickStatusToString (const sick_lms_2xx_status_t sick_status)
 Converts the Sick LMS 2xx status code to a string.
static std::string SickTypeToString (const sick_lms_2xx_type_t sick_type)
 Converts the Sick LMS type to a corresponding string.
static sick_lms_2xx_baud_t StringToSickBaud (const std::string baud_str)
 Converts string to corresponding Sick LMS baud.

Static Public Attributes

static const uint8_t SICK_FLAG_AVAILABILITY_DAZZLE_NO_EFFECT = 0x04
 Dazzle evalutation has no effect on switching outputs.
static const uint8_t SICK_FLAG_AVAILABILITY_DEFAULT = 0x00
 Availability unspecified.
static const uint8_t SICK_FLAG_AVAILABILITY_HIGH = 0x01
 Highest availability (comparable to LMS types 1 to 5)
static const uint8_t SICK_FLAG_AVAILABILITY_REAL_TIME_INDICES = 0x02
 Send real-time indices.
static const uint16_t SICK_MAX_NUM_MEASUREMENTS = 721
 Maximum number of measurements returned by the Sick LMS.

Protected Member Functions

sick_lms_2xx_baud_t _baudToSickBaud (const int baud_rate) const
 Converts a termios baud to an equivalent Sick baud.
void _extractSickMeasurementValues (const uint8_t *const byte_sequence, const uint16_t num_measurements, uint16_t *const measured_values, uint8_t *const field_a_values=NULL, uint8_t *const field_b_values=NULL, uint8_t *const field_c_values=NULL) const
 Extracts the measured values (w/ flags) that were returned by the device.
void _flushTerminalBuffer () throw ( SickThreadException )
 Flushes terminal I/O buffers.
void _getSickConfig () throw ( SickTimeoutException, SickIOException, SickThreadException )
 Acquires (and buffers) the current Sick LMS configuration from the device.
void _getSickErrors (unsigned int *const num_sick_errors=NULL, uint8_t *const error_type_buffer=NULL, uint8_t *const error_num_buffer=NULL) throw ( SickTimeoutException, SickIOException, SickThreadException )
 Obtains any error codes from the Sick LMS.
void _getSickStatus () throw ( SickTimeoutException, SickIOException, SickThreadException )
 Acquires (and buffers) the status of the Sick LMS 2xx.
void _getSickType () throw ( SickTimeoutException, SickIOException, SickThreadException )
 Acquires the sick device type (as a string) from the unit.
bool _isSickLMS200 () const
 Indicates whether the Sick is an LMS 200.
bool _isSickLMS211 () const
 Indicates whether the Sick is an LMS 211.
bool _isSickLMS220 () const
 Indicates whether the Sick is an LMS 220.
bool _isSickLMS221 () const
 Indicates whether the Sick is an LMS 221.
bool _isSickLMS291 () const
 Indicates whether the Sick is an LMS 291.
bool _isSickUnknown () const
 Indicates whether the Sick type is unknown.
void _parseSickConfigProfile (const uint8_t *const src_buffer, sick_lms_2xx_device_config_t &sick_device_config) const
 Parses a byte sequence into a Sick config structure.
void _parseSickScanProfileB0 (const uint8_t *const src_buffer, sick_lms_2xx_scan_profile_b0_t &sick_scan_profile) const
 Parses a byte sequence into a scan profile corresponding to message B0.
void _parseSickScanProfileB6 (const uint8_t *const src_buffer, sick_lms_2xx_scan_profile_b6_t &sick_scan_profile) const
 Parses a byte sequence into a scan profile corresponding to message B6.
void _parseSickScanProfileB7 (const uint8_t *const src_buffer, sick_lms_2xx_scan_profile_b7_t &sick_scan_profile) const
 Parses a byte sequence into a scan profile corresponding to message B7.
void _parseSickScanProfileBF (const uint8_t *const src_buffer, sick_lms_2xx_scan_profile_bf_t &sick_scan_profile) const
 Parses a byte sequence into a scan profile corresponding to message B6.
void _parseSickScanProfileC4 (const uint8_t *const src_buffer, sick_lms_2xx_scan_profile_c4_t &sick_scan_profile) const
 Parses a byte sequence into a scan profile corresponding to message C4.
bool _returningRealTimeIndices () const
void _sendMessageAndGetReply (const SickLMS2xxMessage &sick_send_message, SickLMS2xxMessage &sick_recv_message, const unsigned int timeout_value, const unsigned int num_tries) throw ( SickIOException, SickThreadException, SickTimeoutException )
 Sends a message and searches for the corresponding reply.
void _sendMessageAndGetReply (const SickLMS2xxMessage &sick_send_message, SickLMS2xxMessage &sick_recv_message, const uint8_t reply_code, const unsigned int timeout_value, const unsigned int num_tries) throw ( SickIOException, SickThreadException, SickTimeoutException )
 Sends a message and searches for the reply with given reply code.
void _setSessionBaud (const sick_lms_2xx_baud_t baud_rate) throw ( SickIOException, SickThreadException, SickTimeoutException )
 Sets the baud rate for the current communication session.
void _setSickConfig (const sick_lms_2xx_device_config_t &sick_config) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the current configuration in flash.
void _setSickOpModeDiagnostic () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to diagnostic mode.
void _setSickOpModeInstallation () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to installation mode.
void _setSickOpModeMonitorRequestValues () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to send values only upon request.
void _setSickOpModeMonitorStreamMeanValues (const uint8_t sample_size) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to send mean measured values.
void _setSickOpModeMonitorStreamMeanValuesSubrange (const uint16_t sample_size, const uint16_t subrange_start_index, const uint16_t subrange_stop_index) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to send a mean value subrange.
void _setSickOpModeMonitorStreamRangeAndReflectivity () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to stream both range and reflectivity values.
void _setSickOpModeMonitorStreamValues () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to stream measured values.
void _setSickOpModeMonitorStreamValuesFromPartialScan () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to start sending partial scans.
void _setSickOpModeMonitorStreamValuesSubrange (const uint16_t subrange_start_index, const uint16_t subrange_stop_index) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to send a measured value subrange.
void _setTerminalBaud (const sick_lms_2xx_baud_t sick_baud) throw ( SickIOException, SickThreadException )
 Sets the local terminal baud rate.
void _setupConnection () throw ( SickIOException, SickThreadException )
 Attempts to open a I/O stream using the device path given at object instantiation.
void _setupConnection (const uint32_t delay) throw ( SickIOException, SickThreadException )
 Attempts to open a I/O stream using the device path given at object instantiation.
std::string _sickAvailabilityToString (const uint8_t availability_code) const
 Converts given restart level to a corresponding string.
std::string _sickContourFunctionToString (const uint8_t contour_function_code) const
 Converts Sick LMS contour function code to a corresponding string.
std::string _sickRestartToString (const uint8_t restart_code) const
 Converts restart code to a corresponding string.
std::string _sickSubtractiveFieldsToString (const uint8_t subt_field_code) const
 Converts Sick LMS subtractive fields code to a corresponding string.
std::string _sickTemporaryFieldToString (const uint8_t temp_field_code) const
 Converts Sick LMS temporary field code to a corresponding string.
std::string _sickVariantToString (const unsigned int sick_variant) const
 Converts the Sick LMS variant to a corresponding string.
void _switchSickOperatingMode (const uint8_t sick_mode, const uint8_t *const mode_params=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Attempts to switch the operating mode of the Sick LMS 2xx.
void _teardownConnection () throw ( SickIOException )
 Closes the data connection associated with the device.
bool _testSickBaud (const sick_lms_2xx_baud_t baud_rate) throw ( SickIOException, SickThreadException )
 Attempts to detect whether the LMS is operating at the given baud rate.
bool _validSickMeasuringMode (const sick_lms_2xx_measuring_mode_t sick_measuring_mode) const
 Indicates whether the given measuring mode is defined.
bool _validSickMeasuringUnits (const sick_lms_2xx_measuring_units_t sick_units) const
 Indicates whether the given measuring units are valid/defined.
bool _validSickPeakThreshold (const sick_lms_2xx_peak_threshold_t sick_peak_threshold) const
 Indicates whether the given peak threshold is valid.
bool _validSickScanAngle (const sick_lms_2xx_scan_angle_t sick_scan_angle) const
 Indicates whether the given scan angle is defined.
bool _validSickScanResolution (const sick_lms_2xx_scan_resolution_t sick_scan_resolution) const
 Indicates whether the given scan resolution is defined.
bool _validSickSensitivity (const sick_lms_2xx_sensitivity_t sick_sensitivity) const
 Indicates whether the given sensitivity is defined.

Protected Attributes

sick_lms_2xx_baud_t _curr_session_baud
sick_lms_2xx_baud_t _desired_session_baud
struct termios _old_term
sick_lms_2xx_baud_status_t _sick_baud_status
sick_lms_2xx_device_config_t _sick_device_config
std::string _sick_device_path
sick_lms_2xx_field_status_t _sick_field_status
uint8_t _sick_mean_value_sample_size
sick_lms_2xx_operating_status_t _sick_operating_status
sick_lms_2xx_pollution_status_t _sick_pollution_status
sick_lms_2xx_restart_status_t _sick_restart_status
sick_lms_2xx_signal_status_t _sick_signal_status
sick_lms_2xx_software_status_t _sick_software_status
sick_lms_2xx_type_t _sick_type
uint16_t _sick_values_subrange_start_index
uint16_t _sick_values_subrange_stop_index

Detailed Description

A general class for interfacing w/ SickLMS2xx2xx laser range finders.

This class implements the basic telegram protocol for SickLMS2xx2xx range finders. It allows the setting of such parameters as angular resolution, fov, etc...

Definition at line 50 of file SickLMS2xx.hh.


Member Typedef Documentation

Adopt c-style convention.

Adopt c-style convention.

Adopt c-style convention.

Adopt c-style convention.

Adopt c-style convention.

Adopt c-style convention.

Adopt c-style convention.

Adopt c-style convention.

Adopt c-style convention.

Adopt c-style convention.

Adopt c-style convention.

Adopt c-style convention.


Member Enumeration Documentation

Defines available Sick LMS 2xx baud rates.

Enumerator:
SICK_BAUD_9600 

9600 baud

SICK_BAUD_19200 

19200 baud

SICK_BAUD_38400 

38400 baud

SICK_BAUD_500K 

500000 baud

SICK_BAUD_UNKNOWN 

Unknown baud rate.

Definition at line 223 of file SickLMS2xx.hh.

Defines the measurment modes supported by Sick LMS 2xx.

Enumerator:
SICK_MS_MODE_8_OR_80_FA_FB_DAZZLE 

Measurement range 8m/80m; fields A,B and Dazzle (Default)

SICK_MS_MODE_8_OR_80_REFLECTOR 

Measurement range 8/80m; reflector bits in 8 levels.

SICK_MS_MODE_8_OR_80_FA_FB_FC 

Measurement range 8/80m; fields A,B, and C.

SICK_MS_MODE_16_REFLECTOR 

Measurement range 16m; reflector bits in 4 levels.

SICK_MS_MODE_16_FA_FB 

Measurement range 16m; fields A and B.

SICK_MS_MODE_32_REFLECTOR 

Measurement range 32m; reflector bit in 2 levels.

SICK_MS_MODE_32_FA 

Measurement range 32m; field A.

SICK_MS_MODE_32_IMMEDIATE 

Measurement range 32m; immediate data transmission, no flags.

SICK_MS_MODE_REFLECTIVITY 

Sick LMS 2xx returns reflectivity (echo amplitude) values instead of range measurements.

SICK_MS_MODE_UNKNOWN 

Unknown range.

Definition at line 180 of file SickLMS2xx.hh.

Defines the available Sick LMS 2xx measured value units.

Enumerator:
SICK_MEASURING_UNITS_CM 

Measured values are in centimeters.

SICK_MEASURING_UNITS_MM 

Measured values are in milimeters.

SICK_MEASURING_UNITS_UNKNOWN 

Unknown units.

Definition at line 136 of file SickLMS2xx.hh.

Defines the operating modes supported by Sick LMS 2xx. See page 41 of the LMS 2xx telegram manual for additional descriptions of these modes.

Enumerator:
SICK_OP_MODE_INSTALLATION 

Installation mode for writing EEPROM.

SICK_OP_MODE_DIAGNOSTIC 

Diagnostic mode for testing purposes.

SICK_OP_MODE_MONITOR_STREAM_MIN_VALUE_FOR_EACH_SEGMENT 

Streams minimum measured values for each segement.

SICK_OP_MODE_MONITOR_TRIGGER_MIN_VALUE_ON_OBJECT 

Sends the min measured values when object is detected.

SICK_OP_MODE_MONITOR_STREAM_MIN_VERT_DIST_TO_OBJECT 

Streams min "vertical distance" to objects.

SICK_OP_MODE_MONITOR_TRIGGER_MIN_VERT_DIST_TO_OBJECT 

Sends min vertical distance to object when detected.

SICK_OP_MODE_MONITOR_STREAM_VALUES 

Streams all measured values in a scan.

SICK_OP_MODE_MONITOR_REQUEST_VALUES 

Sends measured range values on request (i.e. when polled)

SICK_OP_MODE_MONITOR_STREAM_MEAN_VALUES 

Streams mean values from a sample size of n consecutive scans.

SICK_OP_MODE_MONITOR_STREAM_VALUES_SUBRANGE 

Streams data from given subrange.

SICK_OP_MODE_MONITOR_STREAM_MEAN_VALUES_SUBRANGE 

Streams mean values over requested subrange.

SICK_OP_MODE_MONITOR_STREAM_VALUES_WITH_FIELDS 

Streams measured values with associated flags.

SICK_OP_MODE_MONITOR_STREAM_VALUES_FROM_PARTIAL_SCAN 

Streams measured values of partial scan directly after measurement.

SICK_OP_MODE_MONITOR_STREAM_RANGE_AND_REFLECT_FROM_PARTIAL_SCAN 

Streams range and intensity from n partial scans.

SICK_OP_MODE_MONITOR_STREAM_MIN_VALUES_FOR_EACH_SEGMENT_SUBRANGE 

Streams minimum measured values for each segment in a sub-range.

SICK_OP_MODE_MONITOR_NAVIGATION 

Sick outputs navigation data records.

SICK_OP_MODE_MONITOR_STREAM_RANGE_AND_REFLECT 

Streams measured range from a scan and sub-range of reflectivity values.

SICK_OP_MODE_UNKNOWN 

Unknown operating mode.

Definition at line 198 of file SickLMS2xx.hh.

Sick peak threshold. Only valid for Sick LMS 200/220!

Enumerator:
SICK_PEAK_THRESHOLD_DETECTION_WITH_NO_BLACK_EXTENSION 

Standard: peak threshold detection, no black extension.

SICK_PEAK_THRESHOLD_DETECTION_WITH_BLACK_EXTENSION 

Peak threshold detection, active black extension.

SICK_PEAK_THRESHOLD_NO_DETECTION_WITH_NO_BLACK_EXTENSION 

No peak threshold detection, no black extension.

SICK_PEAK_THRESHOLD_NO_DETECTION_WITH_BLACK_EXTENSION 

No peak threshold detection, active black extension.

SICK_PEAK_THRESHOLD_UNKNOWN 

Peak threshold unknown.

Definition at line 158 of file SickLMS2xx.hh.

Defines the scan angle for the Sick LMS 2xx.

Enumerator:
SICK_SCAN_ANGLE_90 

Scanning angle of 90 degrees.

SICK_SCAN_ANGLE_100 

Scanning angle of 100 degrees.

SICK_SCAN_ANGLE_180 

Scanning angle of 180 degrees.

SICK_SCAN_ANGLE_UNKNOWN 

Unknown scanning angle.

Definition at line 114 of file SickLMS2xx.hh.

Defines the available resolution settings for the Sick LMS 2xx.

Enumerator:
SICK_SCAN_RESOLUTION_25 

0.25 degree angular resolution

SICK_SCAN_RESOLUTION_50 

0.50 degree angular resolution

SICK_SCAN_RESOLUTION_100 

1.00 degree angular resolution

SICK_SCAN_RESOLUTION_UNKNOWN 

Unknown angular resolution.

Definition at line 125 of file SickLMS2xx.hh.

Sick sensitivities. Only valid for Sick LMS 211/221/291!

Enumerator:
SICK_SENSITIVITY_STANDARD 

Standard sensitivity: 30m @ 10% reflectivity.

SICK_SENSITIVITY_MEDIUM 

Medium sensitivity: 25m @ 10% reflectivity.

SICK_SENSITIVITY_LOW 

Low sensitivity: 20m @ 10% reflectivity.

SICK_SENSITIVITY_HIGH 

High sensitivity: 42m @ 10% reflectivity.

SICK_SENSITIVITY_UNKNOWN 

Sensitivity unknown.

Definition at line 146 of file SickLMS2xx.hh.

Defines the status of the Sick LMS 2xx unit.

Enumerator:
SICK_STATUS_OK 

LMS is OK.

SICK_STATUS_ERROR 

LMS has encountered an error.

SICK_STATUS_UNKNOWN 

Unknown LMS status.

Definition at line 170 of file SickLMS2xx.hh.

Defines the Sick LMS 2xx types. This enum lists all of the supported Sick LMS models.

Enumerator:
SICK_LMS_TYPE_200_30106 

Sick LMS type 200-30106.

SICK_LMS_TYPE_211_30106 

Sick LMS type 211-30106.

SICK_LMS_TYPE_211_30206 

Sick LMS type 211-30206.

SICK_LMS_TYPE_211_S07 

Sick LMS type 211-S07.

SICK_LMS_TYPE_211_S14 

Sick LMS type 211-S14.

SICK_LMS_TYPE_211_S15 

Sick LMS type 211-S15.

SICK_LMS_TYPE_211_S19 

Sick LMS type 211-S19.

SICK_LMS_TYPE_211_S20 

Sick LMS type 211-S20.

SICK_LMS_TYPE_220_30106 

Sick LMS type 220-30106.

SICK_LMS_TYPE_221_30106 

Sick LMS type 221-30106.

SICK_LMS_TYPE_221_30206 

Sick LMS type 221-30206.

SICK_LMS_TYPE_221_S07 

Sick LMS type 221-S07.

SICK_LMS_TYPE_221_S14 

Sick LMS type 221-S14.

SICK_LMS_TYPE_221_S15 

Sick LMS type 221-S15.

SICK_LMS_TYPE_221_S16 

Sick LMS type 221-S16.

SICK_LMS_TYPE_221_S19 

Sick LMS type 221-S19.

SICK_LMS_TYPE_221_S20 

Sick LMS type 221-S20.

SICK_LMS_TYPE_291_S05 

Sick LMS type 291-S05.

SICK_LMS_TYPE_291_S14 

Sick LMS type 291-S14 (LMS Fast)

SICK_LMS_TYPE_291_S15 

Sick LMS type 291-S15.

SICK_LMS_TYPE_UNKNOWN 

Unknown sick type.

Definition at line 63 of file SickLMS2xx.hh.

Defines the Sick LMS 2xx variant type.

Enumerator:
SICK_LMS_VARIANT_2XX_TYPE_6 

Standard LMS 2xx type 6 models.

SICK_LMS_VARIANT_SPECIAL 

Special models (i.e. LMS211-/221-S19/-S20.

SICK_LMS_VARIANT_UNKNOWN 

Unknown LMS variant.

Definition at line 104 of file SickLMS2xx.hh.


Constructor & Destructor Documentation

SickToolbox::SickLMS2xx::SickLMS2xx ( const std::string  sick_device_path)

Primary constructor.

Constructor

Parameters:
sick_device_pathThe path of the device

Definition at line 45 of file SickLMS2xx.cc.

Destructor.

Destructor

Definition at line 71 of file SickLMS2xx.cc.


Member Function Documentation

sick_lms_2xx_baud_t SickToolbox::SickLMS2xx::_baudToSickBaud ( const int  baud_rate) const [protected]

Converts a termios baud to an equivalent Sick baud.

Given a baud rate as an integer, gets a LMS baud rate command.

Parameters:
baud_rateThe baud rate to be converted to a Sick LMS baud
Returns:
The Sick LMS 2xx equivalent of the given baud rate

Definition at line 5016 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_extractSickMeasurementValues ( const uint8_t *const  byte_sequence,
const uint16_t  num_measurements,
uint16_t *const  measured_values,
uint8_t *const  field_a_values = NULL,
uint8_t *const  field_b_values = NULL,
uint8_t *const  field_c_values = NULL 
) const [protected]

Extracts the measured values (w/ flags) that were returned by the device.

Acquires the bit mask to extract the field bit values returned with each range measurement

Parameters:
*byte_sequenceThe byte sequence holding the current measured values
num_measurementsThe number of measurements given in the byte sequence
*measured_valuesA buffer to hold the extracted measured values
*field_a_valuesStores the Field A values associated with the given measurements (Default: NULL => Not wanted)
*field_b_valuesStores the Field B values associated with the given measurements (Default: NULL => Not wanted)
*field_c_valuesStores the Field C values associated with the given measurements (Default: NULL => Not wanted)

Definition at line 4624 of file SickLMS2xx.cc.

Flushes terminal I/O buffers.

Flushes the terminal I/O buffers

Definition at line 2396 of file SickLMS2xx.cc.

Acquires (and buffers) the current Sick LMS configuration from the device.

Gets the current Sick configuration settings

Definition at line 2899 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_getSickErrors ( unsigned int *const  num_sick_errors = NULL,
uint8_t *const  error_type_buffer = NULL,
uint8_t *const  error_num_buffer = NULL 
) throw ( SickTimeoutException, SickIOException, SickThreadException ) [protected]

Obtains any error codes from the Sick LMS.

Gets the error status of the Sick LMS

Definition at line 3138 of file SickLMS2xx.cc.

Acquires (and buffers) the status of the Sick LMS 2xx.

Gets the status of the LMS

Definition at line 3216 of file SickLMS2xx.cc.

Acquires the sick device type (as a string) from the unit.

Gets the type of Sick LMS

Definition at line 2781 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_isSickLMS200 ( ) const [protected]

Indicates whether the Sick is an LMS 200.

Indicates whether the Sick LMS is type 200

Returns:
True if the device is a Sick LMS 200, False otherwise

Definition at line 4799 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_isSickLMS211 ( ) const [protected]

Indicates whether the Sick is an LMS 211.

Indicates whether the Sick LMS is type 211

Returns:
True if the device is a Sick LMS 211, False otherwise

Definition at line 4815 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_isSickLMS220 ( ) const [protected]

Indicates whether the Sick is an LMS 220.

Indicates whether the Sick LMS is type 220

Returns:
True if the device is a Sick LMS 220, False otherwise

Definition at line 4843 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_isSickLMS221 ( ) const [protected]

Indicates whether the Sick is an LMS 221.

Indicates whether the Sick LMS is type 221

Returns:
True if the device is a Sick LMS 221, False otherwise

Definition at line 4859 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_isSickLMS291 ( ) const [protected]

Indicates whether the Sick is an LMS 291.

Indicates whether the Sick LMS is type 291

Returns:
True if the device is a Sick LMS 291, False otherwise

Definition at line 4889 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_isSickUnknown ( ) const [protected]

Indicates whether the Sick type is unknown.

Indicates whether the Sick LMS type is unknown

Returns:
True if the device is unknown, False otherwise

Definition at line 4909 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_parseSickConfigProfile ( const uint8_t *const  src_buffer,
sick_lms_2xx_device_config_t sick_device_config 
) const [protected]

Parses a byte sequence into a Sick config structure.

A function for parsing a byte sequence into a device config structure

Parameters:
*src_bufferThe byte sequence to be parsed
&sick_device_configThe device configuration

Definition at line 4515 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_parseSickScanProfileB0 ( const uint8_t *const  src_buffer,
sick_lms_2xx_scan_profile_b0_t sick_scan_profile 
) const [protected]

Parses a byte sequence into a scan profile corresponding to message B0.

Parses the scan profile returned w/ message B0

Parameters:
*src_bufferThe byte sequence to be parsed
&sick_scan_profileThe returned scan profile for the current round of measurements

Definition at line 4329 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_parseSickScanProfileB6 ( const uint8_t *const  src_buffer,
sick_lms_2xx_scan_profile_b6_t sick_scan_profile 
) const [protected]

Parses a byte sequence into a scan profile corresponding to message B6.

Parses the scan profile returned w/ message B6

Parameters:
*src_bufferThe byte sequence to be parsed
&sick_scan_profileThe returned scan profile for the current round of mean measurements

Definition at line 4362 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_parseSickScanProfileB7 ( const uint8_t *const  src_buffer,
sick_lms_2xx_scan_profile_b7_t sick_scan_profile 
) const [protected]

Parses a byte sequence into a scan profile corresponding to message B7.

Parses the scan profile returned w/ message B6

Parameters:
*src_bufferThe byte sequence to be parsed
&sick_scan_profileThe returned scan profile for the current round of mean measurements

Definition at line 4392 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_parseSickScanProfileBF ( const uint8_t *const  src_buffer,
sick_lms_2xx_scan_profile_bf_t sick_scan_profile 
) const [protected]

Parses a byte sequence into a scan profile corresponding to message B6.

Parses the scan profile returned w/ message BF

Parameters:
*src_bufferThe byte sequence to be parsed
&sick_scan_profileThe returned scan profile for the current round of mean measurements

Definition at line 4431 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_parseSickScanProfileC4 ( const uint8_t *const  src_buffer,
sick_lms_2xx_scan_profile_c4_t sick_scan_profile 
) const [protected]

Parses a byte sequence into a scan profile corresponding to message C4.

Parses the scan profile returned w/ message C4

Parameters:
*src_bufferThe byte sequence to be parsed
&sick_scan_profileThe returned scan profile for the current round of measurements

Definition at line 4467 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_returningRealTimeIndices ( ) const [inline, protected]

Tells whether the device is returning real-time indices

Definition at line 867 of file SickLMS2xx.hh.

void SickToolbox::SickLMS2xx::_sendMessageAndGetReply ( const SickLMS2xxMessage send_message,
SickLMS2xxMessage recv_message,
const unsigned int  timeout_value,
const unsigned int  num_tries 
) throw ( SickIOException, SickThreadException, SickTimeoutException ) [protected]

Sends a message and searches for the corresponding reply.

Sends a message to the LMS and get the expected reply using th 0x80 rule.

Todo:
Check difference in comments?
Parameters:
&send_messageThe message to be sent to the Sick LMS 2xx unit
&recv_messageThe expected message reply from the Sick LMS
timeout_valueThe epoch to wait before considering a sent frame lost (in usecs)
num_triesThe number of times to try and transmit the message before quitting

NOTE: Uses the 0x80 response code rule for looking for the response message

Definition at line 2437 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_sendMessageAndGetReply ( const SickLMS2xxMessage send_message,
SickLMS2xxMessage recv_message,
const uint8_t  reply_code,
const unsigned int  timeout_value,
const unsigned int  num_tries 
) throw ( SickIOException, SickThreadException, SickTimeoutException ) [protected]

Sends a message and searches for the reply with given reply code.

Sends a message to the LMS and get the expected reply using th 0x80 rule.

Todo:
Check difference in comments?
Parameters:
&send_messageThe message to be sent to the Sick LMS 2xx unit
&recv_messageThe expected message reply from the Sick LMS
reply_codeThe reply code associated with the expected messgage
timeout_valueThe epoch to wait before considering a sent frame lost (in usecs)
num_triesThe number of times to send the message in the event the LMS fails to reply

Definition at line 2485 of file SickLMS2xx.cc.

Sets the baud rate for the current communication session.

Sets the baud rate for communication with the LMS.

Parameters:
baud_rateThe desired baud rate

Definition at line 2530 of file SickLMS2xx.cc.

Sets the current configuration in flash.

Sets the Sick configuration in flash

Parameters:
&sick_device_configThe desired Sick LMS configuration

Definition at line 2957 of file SickLMS2xx.cc.

Sets the device to diagnostic mode.

Switch Sick LMS to diagnostic mode

Definition at line 3561 of file SickLMS2xx.cc.

Sets the device to installation mode.

Switch Sick LMS to installation mode

Definition at line 3502 of file SickLMS2xx.cc.

Sets the device to monitor mode and tells it to send values only upon request.

Switch Sick LMS to monitor mode (request range data)

Definition at line 3621 of file SickLMS2xx.cc.

Sets the device to monitor mode and tells it to send mean measured values.

Switch Sick LMS to monitor mode (stream mean measured values)

Definition at line 3865 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_setSickOpModeMonitorStreamMeanValuesSubrange ( const uint16_t  sample_size,
const uint16_t  subrange_start_index,
const uint16_t  subrange_stop_index 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to monitor mode and tells it to send a mean value subrange.

Switch Sick LMS to monitor mode (stream mean measured values subrange)

Parameters:
sample_sizeThe number of scans to consider in computing the mean measured values
subrange_start_indexThe starting index of the desired subrange
subrange_stop_indexThe stopping index of the desired subrange

Definition at line 4025 of file SickLMS2xx.cc.

Sets the device to monitor mode and tells it to stream both range and reflectivity values.

Switch Sick LMS to monitor mode (stream range and reflectivity)

Definition at line 3737 of file SickLMS2xx.cc.

Sets the device to monitor mode and tells it to stream measured values.

Switch Sick LMS to monitor mode (stream range)

Definition at line 3677 of file SickLMS2xx.cc.

Sets the device to monitor mode and tells it to start sending partial scans.

Switch Sick LMS to monitor mode (stream range from a partial scan)

Definition at line 3805 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_setSickOpModeMonitorStreamValuesSubrange ( const uint16_t  subrange_start_index,
const uint16_t  subrange_stop_index 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to monitor mode and tells it to send a measured value subrange.

Switch Sick LMS to monitor mode (stream mean measured values)

Parameters:
subrange_start_indexThe starting index of the desired subrange
subrange_stop_indexThe stopping index of the desired subrange

Definition at line 3936 of file SickLMS2xx.cc.

Sets the local terminal baud rate.

Changes the terminal's baud rate.

Parameters:
baud_rateThe desired terminal baud rate

Definition at line 2653 of file SickLMS2xx.cc.

Attempts to open a I/O stream using the device path given at object instantiation.

Opens the terminal for serial communication.

Implements SickToolbox::SickLIDAR< SickLMS2xxBufferMonitor, SickLMS2xxMessage >.

Definition at line 2321 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_setupConnection ( const uint32_t  delay) throw ( SickIOException, SickThreadException ) [protected]

Attempts to open a I/O stream using the device path given at object instantiation.

Parameters:
delayDelay to wait for SICK to power on. (In seconds)

Definition at line 2329 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::_sickAvailabilityToString ( const uint8_t  availability_flags) const [protected]

Converts given restart level to a corresponding string.

Given a bytecode representing Sick LMS availability, returns a corresponding string

Parameters:
availability_flagsThe availability level of the Sick LMS 2xx
Returns:
The corresponding string

Definition at line 5039 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::_sickContourFunctionToString ( const uint8_t  contour_function_code) const [protected]

Converts Sick LMS contour function code to a corresponding string.

Converts the LMS's contour function status code to a string

Parameters:
contour_function_codeThe subtractive fields code
Returns:
The corresponding string

Definition at line 5164 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::_sickRestartToString ( const uint8_t  restart_code) const [protected]

Converts restart code to a corresponding string.

Given a bytecode representing Sick LMS restart mode, returns a corresponding string

Parameters:
restart_codeRestart code
Returns:
The corresponding string

Definition at line 5085 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::_sickSubtractiveFieldsToString ( const uint8_t  subt_field_code) const [protected]

Converts Sick LMS subtractive fields code to a corresponding string.

Converts the LMS's subtractive field value to a string

Parameters:
subt_field_codeThe subtractive fields code
Returns:
The corresponding string

Definition at line 5146 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::_sickTemporaryFieldToString ( const uint8_t  temp_field_code) const [protected]

Converts Sick LMS temporary field code to a corresponding string.

Converts the LMS's temporary field value to a string

Parameters:
temp_field_codeThe temporary field code
Returns:
The corresponding string

Definition at line 5126 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::_sickVariantToString ( const unsigned int  sick_variant) const [protected]

Converts the Sick LMS variant to a corresponding string.

Converts the LMS's variant to a corresponding string

Parameters:
sick_variantThe Sick LMS variant
Returns:
The corresponding string

Definition at line 5188 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_switchSickOperatingMode ( const uint8_t  sick_mode,
const uint8_t *const  mode_params = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Attempts to switch the operating mode of the Sick LMS 2xx.

Switches the operating mode of the LMS.

Parameters:
sick_modeThe desired operating mode
mode_paramsAdditional parameters required to set the new operating mode

Definition at line 4122 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::_teardownConnection ( ) throw ( SickIOException ) [protected, virtual]

Closes the data connection associated with the device.

Closes the serial communication terminal.

Implements SickToolbox::SickLIDAR< SickLMS2xxBufferMonitor, SickLMS2xxMessage >.

Definition at line 2374 of file SickLMS2xx.cc.

Attempts to detect whether the LMS is operating at the given baud rate.

Tests communication wit the LMS at a particular baud rate.

Parameters:
baud_rateThe baud rate to use when "pinging" the Sick LMS 2xx

Definition at line 2590 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_validSickMeasuringMode ( const sick_lms_2xx_measuring_mode_t  sick_measuring_mode) const [protected]

Indicates whether the given measuring mode is defined.

Indicates whether the given sensitivity is defined

Parameters:
sick_measuring_modeThe sick measuring mode in question

Definition at line 4991 of file SickLMS2xx.cc.

Indicates whether the given measuring units are valid/defined.

Indicates whether the given unit value is defined

Parameters:
sick_unitsThe units in question

Definition at line 4784 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_validSickPeakThreshold ( const sick_lms_2xx_peak_threshold_t  sick_peak_threshold) const [protected]

Indicates whether the given peak threshold is valid.

Indicates whether the given peak threshold is defined

Parameters:
sick_peak_thresholdPeak threshold definition for Sick LMS 2xx

Definition at line 4972 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_validSickScanAngle ( const sick_lms_2xx_scan_angle_t  sick_scan_angle) const [protected]

Indicates whether the given scan angle is defined.

Indicates whether the given scan angle is defined

Parameters:
sick_scan_angleThe scan angle in question

Definition at line 4917 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_validSickScanResolution ( const sick_lms_2xx_scan_resolution_t  sick_scan_resolution) const [protected]

Indicates whether the given scan resolution is defined.

Indicates whether the given scan resolution is defined

Parameters:
sick_scan_resolutionThe scan resolution in question

Definition at line 4935 of file SickLMS2xx.cc.

bool SickToolbox::SickLMS2xx::_validSickSensitivity ( const sick_lms_2xx_sensitivity_t  sick_sensitivity) const [protected]

Indicates whether the given sensitivity is defined.

Indicates whether the given sensitivity is defined

Parameters:
sick_sensitivityThe sick sensitivity in question

Definition at line 4953 of file SickLMS2xx.cc.

Converts double to corresponding Sick LMS scan resolution.

A utility function for converting doubles to lms_sick_scan_resolution_t

Parameters:
scan_resolution_doubleScan resolution as a double (e.g. 0.25,0.5,1.0)

Definition at line 2100 of file SickLMS2xx.cc.

Gets the current Sick LMS 2xx availability level flags.

Gets the current availability flags for the device

Returns:
Sick LMS 2xx Availability level flags

Definition at line 821 of file SickLMS2xx.cc.

Acquire the Sick LMS's config as a printable string.

Get Sick config as a string

Returns:
The Sick LMS config as a well-formatted string

Definition at line 1936 of file SickLMS2xx.cc.

Gets the Sick LMS 2xx device path.

Gets the Sick LMS 2xx device path

Returns:
The device path as a std::string

Definition at line 295 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::GetSickMeanValues ( const uint8_t  sick_sample_size,
unsigned int *const  measurement_values,
unsigned int &  num_measurement_values,
unsigned int *const  sick_telegram_index = NULL,
unsigned int *const  sick_real_time_scan_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Returns the most recent mean measured values from the Sick LMS 2xx.

Gets mean measured values from the Sick LMS

Parameters:
sick_sample_sizeNumber of scans to consider in computing the mean measured values (NOTE: 2 <= sick_sample_size <= 250)
*measurement_valuesDestination buffer for holding the current round of measured value
&num_measurement_valuesNumber of values stored in measurement_values
*sick_telegram_indexThe telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted)
*sick_real_time_scan_indexThe real time scan index for the latest message (module 256) (Default: NULL => Not wanted)

NOTE: Calling this function will return either range or reflectivity measurements depending upon the current measuring mode of the device.

NOTE: Real-time scan indices must be enabled by setting the corresponding availability of the Sick LMS 2xx for this value to be populated.

Definition at line 1519 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::GetSickMeanValuesSubrange ( const uint8_t  sick_sample_size,
const uint16_t  sick_subrange_start_index,
const uint16_t  sick_subrange_stop_index,
unsigned int *const  measurement_values,
unsigned int &  num_measurement_values,
unsigned int *const  sick_telegram_index = NULL,
unsigned int *const  sick_real_time_scan_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Returns the most recent mean measured values from the specified subrange.

Gets mean measured values from the Sick LMS

Parameters:
sick_sample_sizeNumber of consecutive scans used to compute the mean values
sick_subrange_start_indexThe starting index of the desired subrange (See below for example)
sick_subrange_stop_indexThe stopping index of the desired subrange (See below for example)
*measurement_valuesDestination buffer for holding the current round of measured value
&num_measurement_valuesNumber of values stored in measurement_values
*sick_telegram_indexThe telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted)
*sick_real_time_scan_indexThe real time scan index for the latest message (module 256) (Default: NULL => Not wanted)

NOTE: Calling this function will return either range or reflectivity measurements depending upon the current measuring mode of the device.

NOTE: Real-time scan indices must be enabled by setting the corresponding availability of the Sick LMS 2xx for this value to be populated.

EXAMPLE: Using a 180/0.5 Sick LMS variant, a subrange over the scan area [0,10.5] would correspond to setting the index arguments as follows: sick_subrange_start = 1, sick_subrange_stop = 22

Definition at line 1633 of file SickLMS2xx.cc.

Gets the current Sick LMS 2xx measuring mode.

Get the current Sick LMS 2xx measuring mode

Returns:
Measuring mode (sick_lms_2xx_measuring_mode_t)

Definition at line 713 of file SickLMS2xx.cc.

Gets the current Sick LMS 2xx measuring units.

Get the current measurement units of the device

Returns:
Measuring units (sick_lms_2xx_measuring_units_t)

Definition at line 424 of file SickLMS2xx.cc.

Gets the current Sick LMS 2xx operating mode.

Get the current Sick LMS 2xx operating mode

Returns:
Operating mode (sick_lms_2xx_operating_mode_t)

Definition at line 729 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::GetSickPartialScan ( unsigned int *const  measurement_values,
unsigned int &  num_measurement_values,
unsigned int &  partial_scan_index,
unsigned int *const  sick_field_a_values = NULL,
unsigned int *const  sick_field_b_values = NULL,
unsigned int *const  sick_field_c_values = NULL,
unsigned int *const  sick_telegram_index = NULL,
unsigned int *const  sick_real_time_scan_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)

Returns the most recent partial scan obtained by Sick LMS 2xx.

Gets partial scan measurements from the Sick LMS 2xx. NOTE: Data can be either range or reflectivity depending upon the given Sick mode.

Parameters:
*measurement_valuesDestination buffer for holding the current round of measured value
&num_measurement_valuesNumber of values stored in measurement_values
*sick_partial_scan_indexPartial scan index associated w/ returned values (0 = 0.00 deg, 1 = 0.25 deg, 2 = 0.50 deg, 3 = 0.75 deg)
*sick_field_a_valuesStores the Field A values associated with the given scan (Default: NULL => Not wanted)
*sick_field_b_valuesStores the Field B values associated with the given scan (Default: NULL => Not wanted)
*sick_field_c_valuesStores the Field C values associated with the given scan (Default: NULL => Not wanted)
*sick_telegram_indexThe telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted)
*sick_real_time_scan_indexThe real time scan index for the latest message (module 256) (Default: NULL => Not wanted)

NOTE: This function will set the device to interlaced mode.

NOTE: The current angular resolution defines the minimum step size in the partial scan sequence. To obtain a high resolution partial scan you must set the Sick LMS 2xx variant to use a 0.25 degrees scan resolution.

NOTE: Calling this function will return either range or reflectivity measurements depending upon the current measuring mode of the device.

NOTE: Real-time scan indices must be enabled by setting the corresponding availability of the Sick LMS 2xx for this value to be populated.

Definition at line 1388 of file SickLMS2xx.cc.

Gets the current Sick LMS 2xx sensitivity level.

Get the current Sick LMS 2xx sensitivity level. NOTE: Only applies to LMS 211/221/291 models.

Returns:
Sensitivity level (sick_lms_2xx_sensitivity_t)

Definition at line 618 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::GetSickScan ( unsigned int *const  measurement_values,
unsigned int &  num_measurement_values,
unsigned int *const  sick_field_a_values = NULL,
unsigned int *const  sick_field_b_values = NULL,
unsigned int *const  sick_field_c_values = NULL,
unsigned int *const  sick_telegram_index = NULL,
unsigned int *const  sick_real_time_scan_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)

Returns the most recent measured values obtained by the Sick LMS 2xx.

Gets measurement data from the Sick. NOTE: Data can be either range or reflectivity given the Sick mode.

Parameters:
*measurement_valuesDestination buffer for holding the current round of measured values
&num_measurement_valuesNumber of values stored in measurement_values
*sick_field_a_valuesStores the Field A values associated with the given scan (Default: NULL => Not wanted)
*sick_field_b_valuesStores the Field B values associated with the given scan (Default: NULL => Not wanted)
*sick_field_c_valuesStores the Field C values associated with the given scan (Default: NULL => Not wanted)
*sick_telegram_indexThe telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted)
*sick_real_time_scan_indexThe real time scan index for the latest message (module 256) (Default: NULL => Not wanted)

NOTE: Calling this function will return either range or reflectivity measurements depending upon the current measuring mode of the device.

NOTE: Real-time scan indices must be enabled by setting the corresponding availability of the Sick LMS 2xx for this value to be populated.

Definition at line 977 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::GetSickScan ( unsigned int *const  range_values,
unsigned int *const  reflect_values,
unsigned int &  num_range_measurements,
unsigned int &  num_reflect_measurements,
unsigned int *const  sick_field_a_values = NULL,
unsigned int *const  sick_field_b_values = NULL,
unsigned int *const  sick_field_c_values = NULL,
unsigned int *const  sick_telegram_index = NULL,
unsigned int *const  sick_real_time_scan_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)

Acquires both range and reflectivity values from the Sick LMS 211/221/291-S14 (LMS-FAST)

Gets range and reflectivity data from the Sick. NOTE: This only applies to Sick LMS 211/221/291-S14!

Parameters:
*range_valuesThe buffer in which range measurements will be stored
*reflect_valuesThe buffer in which reflectivity measurements will be stored
reflect_subrange_start_indexThe starting index of the desired measured reflectivity subrange
relfect_subrange_stop_indexThe stopping index of the desired measured relfectivity subrange
&num_range_measurementsThe number of range measurements stored in range_values
&num_reflectivity_measurementsThe number of reflectivity measurements stored in reflect_values
*sick_field_a_valuesStores the Field A values associated with the given scan (Default: NULL => Not wanted)
*sick_field_b_valuesStores the Field B values associated with the given scan (Default: NULL => Not wanted)
*sick_field_c_valuesStores the Field C values associated with the given scan (Default: NULL => Not wanted)
*sick_telegram_indexThe telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted)
*sick_real_time_scan_indexThe real time scan index for the latest message (module 256) (Default: NULL => Not wanted)

NOTE: Real-time scan indices must be enabled by setting the corresponding availability of the Sick LMS 2xx for this value to be populated.

Definition at line 1107 of file SickLMS2xx.cc.

Gets the current scan angle of the device.

Gets the scan angle currently being used by the device

Returns:
Scan angle of the device (sick_lms_2xx_scan_angle_t)

Definition at line 319 of file SickLMS2xx.cc.

Gets the current angular resolution.

Gets the scan resolution currently being used by the device

Returns:
Angular resolution of the Sick LMS 2xx (sick_lms_2xx_scan_resolution_t)

Definition at line 335 of file SickLMS2xx.cc.

void SickToolbox::SickLMS2xx::GetSickScanSubrange ( const uint16_t  sick_subrange_start_index,
const uint16_t  sick_subrange_stop_index,
unsigned int *const  measurement_values,
unsigned int &  num_measurement_values,
unsigned int *const  sick_field_a_values = NULL,
unsigned int *const  sick_field_b_values = NULL,
unsigned int *const  sick_field_c_values = NULL,
unsigned int *const  sick_telegram_index = NULL,
unsigned int *const  sick_real_time_scan_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)

Returns the most recent measured values from the corresponding subrange.

Gets measurement data from the Sick. NOTE: Data can be either range or reflectivity given the Sick mode.

Parameters:
sick_subrange_start_indexThe starting index of the desired subrange (See below for example)
sick_subrange_stop_indexThe stopping index of the desired subrange (See below for example)
*measurement_valuesDestination buffer for holding the current round of measured value
&num_measurement_valuesNumber of values stored in measurement_values
*sick_field_a_valuesStores the Field A values associated with the given scan (Default: NULL => Not wanted)
*sick_field_b_valuesStores the Field B values associated with the given scan (Default: NULL => Not wanted)
*sick_field_c_valuesStores the Field C values associated with the given scan (Default: NULL => Not wanted)
*sick_telegram_indexThe telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted)
*sick_real_time_scan_indexThe real time scan index for the latest message (module 256) (Default: NULL => Not wanted)*

NOTE: Calling this function will return either range or reflectivity measurements depending upon the current measuring mode of the device.

NOTE: Real-time scan indices must be enabled by setting the corresponding availability of the Sick LMS 2xx for this value to be populated.

EXAMPLE: Using a 180/0.5 Sick LMS variant, a subrange over the scan area [0,10.5] would correspond to setting the index arguments as follows: sick_subrange_start = 1, sick_subrange_stop = 22

Definition at line 1250 of file SickLMS2xx.cc.

Gets the current Sick LMS 2xx sensitivity level.

Get the current Sick LMS 2xx sensitivity level. NOTE: Only applies to LMS 211/221/291 models.

Returns:
Sensitivity level (sick_lms_2xx_sensitivity_t)

Definition at line 596 of file SickLMS2xx.cc.

Acquire the Sick LMS's operating params as a printable string.

Get Sick software info as a string

Returns:
The Sick LMS operating params as a well-formatted string

Definition at line 1909 of file SickLMS2xx.cc.

Acquire the Sick LMS 2xx status.

Acquire the Sick LMS status

Returns:
The status of the device

NOTE: This method also updated the local view of all other information returned with a status request.

Definition at line 1738 of file SickLMS2xx.cc.

Acquire the Sick LMS's status as a printable string.

Get Sick status as a string

Returns:
The Sick LMS status as a well-formatted string

Definition at line 1876 of file SickLMS2xx.cc.

Gets the Sick LMS 2xx type.

Gets the Sick LMS 2xx device type

Returns:
The device type

Definition at line 303 of file SickLMS2xx.cc.

Attempts to initialize the Sick LMS 2xx and then sets communication at at the given baud rate.

Initializes the Sick

Parameters:
desired_baud_rateDesired session baud rate
delayDelay to wait for SICK to power on (in seconds)

Definition at line 98 of file SickLMS2xx.cc.

Converts integer to corresponding Sick LMS baud.

A utility function for converting integers to lms_baud_t

Parameters:
baud_strBaud rate as integer (e.g. 9600,19200,38400,500000)

Definition at line 2130 of file SickLMS2xx.cc.

Converts integer to corresponding Sick LMS scan angle.

A utility function for converting integers to lms_sick_scan_angle_t

Parameters:
scan_angle_intScan angle (FOV) as an integer (e.g. 90,100,180)

Definition at line 2062 of file SickLMS2xx.cc.

Converts integer to corresponding Sick LMS scan resolution.

A utility function for converting ints to lms_sick_scan_resolution_t

Parameters:
scan_resolution_intScan resolution as an integer (e.g. 25,50,100)

Definition at line 2081 of file SickLMS2xx.cc.

Indicates whether the device is an LMS Fast.

Indicates whether the Sick is an LMS Fast

Definition at line 1783 of file SickLMS2xx.cc.

Prints out the Sick LMS configurations parameters.

Print the Sick LMS configuration

Definition at line 2000 of file SickLMS2xx.cc.

Prints out relevant software versioning information.

Print the Sick LMS software versions

Definition at line 1993 of file SickLMS2xx.cc.

Prints ths status of the Sick LMS 2xx unit.

Print the Sick LMS status

Definition at line 1986 of file SickLMS2xx.cc.

Reset the Sick LMS 2xx active field values NOTE: Considered successful if the LMS ready message is received.

Resets Sick LMS field values

Definition at line 1800 of file SickLMS2xx.cc.

Sets the availability level of the device.

Sets the availability of the device (in EEPROM). See page 98 of the telegram listing for more details.

Parameters:
sick_availability_levelDesired availability of the Sick LMS

Definition at line 745 of file SickLMS2xx.cc.

Sets the measuring mode for the device.

Sets the measuring mode for the device (in EEPROM). See page 98 of the telegram listing for more details.

Parameters:
sick_measuring_modeDesired measuring mode

Definition at line 640 of file SickLMS2xx.cc.

Sets the measurement units for the device.

Set the measurement units of the device (in EEPROM)

Parameters:
sick_unitsDesired measurement units for the device

Definition at line 351 of file SickLMS2xx.cc.

Sets the Sick LMS sensitivity level.

Sets the peak threshold mode for the device (in EEPROM). NOTE: Only applies to LMS 200/220 models

Parameters:
sick_sensitivityDesired sensitivity level

Definition at line 518 of file SickLMS2xx.cc.

Sets the Sick LMS sensitivity level.

Sets the sensitivity value for the device (in EEPROM). NOTE: Only applies to LMS 211/221/291 models.

Parameters:
sick_sensitivityDesired sensitivity level

Definition at line 440 of file SickLMS2xx.cc.

Sets the variant of the Sick LMS 2xx (scan angle and scan resolution)

Sets the variant type for the device (in EEPROM)

Parameters:
scan_angleThe desired scan angle of the Sick LMS 2xx
scan_resolutionThe desired angular resolution of the Sick LMS 2xx

Definition at line 838 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::SickBaudToString ( const sick_lms_2xx_baud_t  baud_rate) [static]

Converts Sick LMS baud to a corresponding string.

Converts the given bad, returns a string representing that baud rate.

Parameters:
baud_rateThe baud rate to be represented as a string
Returns:
The string representation of the baud rate

Definition at line 2109 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::SickMeasuringModeToString ( const sick_lms_2xx_measuring_mode_t  sick_measuring_mode) [static]

Converts the Sick measuring mode to a corresponding string.

Converts the LMS's measuring mode to a corresponding string

Parameters:
sick_measuring_modeThe Sick measuring mode
Returns:
The corresponding string

Definition at line 2181 of file SickLMS2xx.cc.

Converts the Sick LMS measurement units to a corresponding string.

Converts the LMS's measuring units to a corresponding string

Parameters:
sick_unitsThe measuring units
Returns:
The corresponding string

Definition at line 2304 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::SickOperatingModeToString ( const sick_lms_2xx_operating_mode_t  sick_operating_mode) [static]

Converts the Sick operating mode to a corresponding string.

Converts the LMS's measuring mode to a corresponding string

Parameters:
sick_operating_modeThe Sick operating mode
Returns:
The corresponding string

Definition at line 2212 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::SickPeakThresholdToString ( const sick_lms_2xx_peak_threshold_t  sick_peak_threshold) [static]

Converts Sick LMS 2xx peak threshold to a corresponding string.

Converts the LMS's peak threshold to string

Parameters:
sick_peak_thresholdSick sensitivity level
Returns:
The corresponding string

Definition at line 2282 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::SickSensitivityToString ( const sick_lms_2xx_sensitivity_t  sick_sensitivity) [static]

Converts Sick LMS 2xx sensitivity level to a corresponding string.

Converts the LMS's sensitivity to string

Parameters:
sick_sensitivitySick sensitivity level
Returns:
The corresponding string

Definition at line 2260 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::SickStatusToString ( const sick_lms_2xx_status_t  sick_status) [static]

Converts the Sick LMS 2xx status code to a string.

Converts the LMS's status to a corresponding string

Parameters:
sick_statusThe device status
Returns:
A string corresponding to the given status code

Definition at line 2166 of file SickLMS2xx.cc.

std::string SickToolbox::SickLMS2xx::SickTypeToString ( const sick_lms_2xx_type_t  sick_type) [static]

Converts the Sick LMS type to a corresponding string.

Converts the LMS's type to a corresponding string

Parameters:
sick_typeThe device type
Returns:
Sick LMS type as a string

Definition at line 2009 of file SickLMS2xx.cc.

sick_lms_2xx_baud_t SickToolbox::SickLMS2xx::StringToSickBaud ( const std::string  baud_str) [static]

Converts string to corresponding Sick LMS baud.

A utility function for converting baud strings to lms_baud_t

Parameters:
baud_strBaud rate as string (e.g. "9600","19200","38400","500000")

Definition at line 2151 of file SickLMS2xx.cc.

Uninitializes the LMS by putting it in a mode where it stops streaming data, and returns it to the default baud rate (specified in the header).

Uninitializes the Sick

Definition at line 229 of file SickLMS2xx.cc.


Member Data Documentation

The baud rate at which to communicate with the Sick

Definition at line 711 of file SickLMS2xx.hh.

The desired baud rate for communicating w/ the Sick

Definition at line 714 of file SickLMS2xx.hh.

struct termios SickToolbox::SickLMS2xx::_old_term [protected]

Stores information about the original terminal settings

Definition at line 753 of file SickLMS2xx.hh.

The baud configuration of the device

Definition at line 738 of file SickLMS2xx.hh.

The device configuration for the Sick

Definition at line 741 of file SickLMS2xx.hh.

A path to the device at which the sick can be accessed.

Definition at line 708 of file SickLMS2xx.hh.

The field configuration for the device

Definition at line 735 of file SickLMS2xx.hh.

Used when the device is streaming mean values

Definition at line 744 of file SickLMS2xx.hh.

The operating parameters of the device

Definition at line 720 of file SickLMS2xx.hh.

The pollution measurement status

Definition at line 729 of file SickLMS2xx.hh.

The restart configuration of the device

Definition at line 726 of file SickLMS2xx.hh.

The signal status of the device

Definition at line 732 of file SickLMS2xx.hh.

The current software version being run on the device

Definition at line 723 of file SickLMS2xx.hh.

A string representing the type of device

Definition at line 717 of file SickLMS2xx.hh.

Used when the device is streaming a scan subrange

Definition at line 747 of file SickLMS2xx.hh.

Used when the device is streaming a scan subrange

Definition at line 750 of file SickLMS2xx.hh.

Dazzle evalutation has no effect on switching outputs.

Definition at line 235 of file SickLMS2xx.hh.

Availability unspecified.

Define Sick LMS 2xx availability levels

Definition at line 232 of file SickLMS2xx.hh.

Highest availability (comparable to LMS types 1 to 5)

Definition at line 233 of file SickLMS2xx.hh.

Send real-time indices.

Definition at line 234 of file SickLMS2xx.hh.

Maximum number of measurements returned by the Sick LMS.

Define the maximum number of measurements

Definition at line 56 of file SickLMS2xx.hh.


The documentation for this class was generated from the following files:


sicktoolbox
Author(s): Jason Derenick , Thomas Miller
autogenerated on Thu Aug 27 2015 15:17:16