A general class for interfacing w/ SickLMS2xx2xx laser range finders. More...
#include <SickLMS2xx.hh>
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 Member Functions | |
uint8_t | GetSickAvailability () const throw ( SickConfigException ) |
Gets the current Sick LMS 2xx availability level flags. More... | |
std::string | GetSickConfigAsString () const |
Acquire the Sick LMS's config as a printable string. More... | |
std::string | GetSickDevicePath () const |
Gets the Sick LMS 2xx device path. More... | |
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. More... | |
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. More... | |
sick_lms_2xx_measuring_mode_t | GetSickMeasuringMode () const throw ( SickConfigException ) |
Gets the current Sick LMS 2xx measuring mode. More... | |
SickLMS2xx::sick_lms_2xx_measuring_units_t | GetSickMeasuringUnits () const throw ( SickConfigException ) |
Gets the current Sick LMS 2xx measuring units. More... | |
sick_lms_2xx_operating_mode_t | GetSickOperatingMode () const throw ( SickConfigException ) |
Gets the current Sick LMS 2xx operating mode. More... | |
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. More... | |
sick_lms_2xx_peak_threshold_t | GetSickPeakThreshold () const throw ( SickConfigException ) |
Gets the current Sick LMS 2xx sensitivity level. More... | |
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. More... | |
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) More... | |
double | GetSickScanAngle () const throw ( SickConfigException ) |
Gets the current scan angle of the device. More... | |
double | GetSickScanResolution () const throw ( SickConfigException ) |
Gets the current angular resolution. More... | |
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. More... | |
sick_lms_2xx_sensitivity_t | GetSickSensitivity () const throw ( SickConfigException ) |
Gets the current Sick LMS 2xx sensitivity level. More... | |
std::string | GetSickSoftwareVersionAsString () const |
Acquire the Sick LMS's operating params as a printable string. More... | |
sick_lms_2xx_status_t | GetSickStatus () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException ) |
Acquire the Sick LMS 2xx status. More... | |
std::string | GetSickStatusAsString () const |
Acquire the Sick LMS's status as a printable string. More... | |
sick_lms_2xx_type_t | GetSickType () const throw ( SickConfigException ) |
Gets the Sick LMS 2xx type. More... | |
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. More... | |
bool | IsSickLMS2xxFast () const throw ( SickConfigException ) |
Indicates whether the device is an LMS Fast. More... | |
void | PrintSickConfig () const |
Prints out the Sick LMS configurations parameters. More... | |
void | PrintSickSoftwareVersion () const |
Prints out relevant software versioning information. More... | |
void | PrintSickStatus () const |
Prints ths status of the Sick LMS 2xx unit. More... | |
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. More... | |
void | SetSickAvailability (const uint8_t sick_availability_flags=SICK_FLAG_AVAILABILITY_DEFAULT) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException ) |
Sets the availability level of the device. More... | |
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. More... | |
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. More... | |
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. More... | |
void | SetSickSensitivity (const sick_lms_2xx_sensitivity_t sick_sensitivity=SICK_SENSITIVITY_STANDARD) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException ) |
Sets the Sick LMS sensitivity level. More... | |
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) More... | |
SickLMS2xx (const std::string sick_device_path) | |
Primary constructor. More... | |
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). More... | |
~SickLMS2xx () | |
Destructor. More... | |
Public Member Functions inherited from SickToolbox::SickLIDAR< SickLMS2xxBufferMonitor, SickLMS2xxMessage > | |
bool | IsInitialized () |
SickLIDAR () | |
Initializes the buffer monitor. More... | |
virtual | ~SickLIDAR () |
Destructor tears down buffer monitor. More... | |
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. More... | |
static sick_lms_2xx_baud_t | IntToSickBaud (const int baud_int) |
Converts integer to corresponding Sick LMS baud. More... | |
static sick_lms_2xx_scan_angle_t | IntToSickScanAngle (const int scan_angle_int) |
Converts integer to corresponding Sick LMS scan angle. More... | |
static sick_lms_2xx_scan_resolution_t | IntToSickScanResolution (const int scan_resolution_int) |
Converts integer to corresponding Sick LMS scan resolution. More... | |
static std::string | SickBaudToString (const sick_lms_2xx_baud_t baud_rate) |
Converts Sick LMS baud to a corresponding string. More... | |
static std::string | SickMeasuringModeToString (const sick_lms_2xx_measuring_mode_t sick_measuring_mode) |
Converts the Sick measuring mode to a corresponding string. More... | |
static std::string | SickMeasuringUnitsToString (const sick_lms_2xx_measuring_units_t sick_units) |
Converts the Sick LMS measurement units to a corresponding string. More... | |
static std::string | SickOperatingModeToString (const sick_lms_2xx_operating_mode_t sick_operating_mode) |
Converts the Sick operating mode to a corresponding string. More... | |
static std::string | SickPeakThresholdToString (const sick_lms_2xx_peak_threshold_t sick_peak_threshold) |
Converts Sick LMS 2xx peak threshold to a corresponding string. More... | |
static std::string | SickSensitivityToString (const sick_lms_2xx_sensitivity_t sick_sensitivity) |
Converts Sick LMS 2xx sensitivity level to a corresponding string. More... | |
static std::string | SickStatusToString (const sick_lms_2xx_status_t sick_status) |
Converts the Sick LMS 2xx status code to a string. More... | |
static std::string | SickTypeToString (const sick_lms_2xx_type_t sick_type) |
Converts the Sick LMS type to a corresponding string. More... | |
static sick_lms_2xx_baud_t | StringToSickBaud (const std::string baud_str) |
Converts string to corresponding Sick LMS baud. More... | |
Static Public Attributes | |
static const uint8_t | SICK_FLAG_AVAILABILITY_DAZZLE_NO_EFFECT = 0x04 |
Dazzle evalutation has no effect on switching outputs. More... | |
static const uint8_t | SICK_FLAG_AVAILABILITY_DEFAULT = 0x00 |
Availability unspecified. More... | |
static const uint8_t | SICK_FLAG_AVAILABILITY_HIGH = 0x01 |
Highest availability (comparable to LMS types 1 to 5) More... | |
static const uint8_t | SICK_FLAG_AVAILABILITY_REAL_TIME_INDICES = 0x02 |
Send real-time indices. More... | |
static const uint16_t | SICK_MAX_NUM_MEASUREMENTS = 721 |
Maximum number of measurements returned by the Sick LMS. More... | |
Protected Member Functions | |
sick_lms_2xx_baud_t | _baudToSickBaud (const int baud_rate) const |
Converts a termios baud to an equivalent Sick baud. More... | |
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. More... | |
void | _flushTerminalBuffer () throw ( SickThreadException ) |
Flushes terminal I/O buffers. More... | |
void | _getSickConfig () throw ( SickTimeoutException, SickIOException, SickThreadException ) |
Acquires (and buffers) the current Sick LMS configuration from the device. More... | |
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. More... | |
void | _getSickStatus () throw ( SickTimeoutException, SickIOException, SickThreadException ) |
Acquires (and buffers) the status of the Sick LMS 2xx. More... | |
void | _getSickType () throw ( SickTimeoutException, SickIOException, SickThreadException ) |
Acquires the sick device type (as a string) from the unit. More... | |
bool | _isSickLMS200 () const |
Indicates whether the Sick is an LMS 200. More... | |
bool | _isSickLMS211 () const |
Indicates whether the Sick is an LMS 211. More... | |
bool | _isSickLMS220 () const |
Indicates whether the Sick is an LMS 220. More... | |
bool | _isSickLMS221 () const |
Indicates whether the Sick is an LMS 221. More... | |
bool | _isSickLMS291 () const |
Indicates whether the Sick is an LMS 291. More... | |
bool | _isSickUnknown () const |
Indicates whether the Sick type is unknown. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | _setSessionBaud (const sick_lms_2xx_baud_t baud_rate) throw ( SickIOException, SickThreadException, SickTimeoutException ) |
Sets the baud rate for the current communication session. More... | |
void | _setSickConfig (const sick_lms_2xx_device_config_t &sick_config) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException ) |
Sets the current configuration in flash. More... | |
void | _setSickOpModeDiagnostic () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) |
Sets the device to diagnostic mode. More... | |
void | _setSickOpModeInstallation () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) |
Sets the device to installation mode. More... | |
void | _setSickOpModeMonitorRequestValues () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) |
Sets the device to monitor mode and tells it to send values only upon request. More... | |
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. More... | |
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. More... | |
void | _setSickOpModeMonitorStreamRangeAndReflectivity () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) |
Sets the device to monitor mode and tells it to stream both range and reflectivity values. More... | |
void | _setSickOpModeMonitorStreamValues () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) |
Sets the device to monitor mode and tells it to stream measured values. More... | |
void | _setSickOpModeMonitorStreamValuesFromPartialScan () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) |
Sets the device to monitor mode and tells it to start sending partial scans. More... | |
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. More... | |
void | _setTerminalBaud (const sick_lms_2xx_baud_t sick_baud) throw ( SickIOException, SickThreadException ) |
Sets the local terminal baud rate. More... | |
void | _setupConnection () throw ( SickIOException, SickThreadException ) |
Attempts to open a I/O stream using the device path given at object instantiation. More... | |
void | _setupConnection (const uint32_t delay) throw ( SickIOException, SickThreadException ) |
Attempts to open a I/O stream using the device path given at object instantiation. More... | |
std::string | _sickAvailabilityToString (const uint8_t availability_code) const |
Converts given restart level to a corresponding string. More... | |
std::string | _sickContourFunctionToString (const uint8_t contour_function_code) const |
Converts Sick LMS contour function code to a corresponding string. More... | |
std::string | _sickRestartToString (const uint8_t restart_code) const |
Converts restart code to a corresponding string. More... | |
std::string | _sickSubtractiveFieldsToString (const uint8_t subt_field_code) const |
Converts Sick LMS subtractive fields code to a corresponding string. More... | |
std::string | _sickTemporaryFieldToString (const uint8_t temp_field_code) const |
Converts Sick LMS temporary field code to a corresponding string. More... | |
std::string | _sickVariantToString (const unsigned int sick_variant) const |
Converts the Sick LMS variant to a corresponding string. More... | |
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. More... | |
void | _teardownConnection () throw ( SickIOException ) |
Closes the data connection associated with the device. More... | |
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. More... | |
bool | _validSickMeasuringMode (const sick_lms_2xx_measuring_mode_t sick_measuring_mode) const |
Indicates whether the given measuring mode is defined. More... | |
bool | _validSickMeasuringUnits (const sick_lms_2xx_measuring_units_t sick_units) const |
Indicates whether the given measuring units are valid/defined. More... | |
bool | _validSickPeakThreshold (const sick_lms_2xx_peak_threshold_t sick_peak_threshold) const |
Indicates whether the given peak threshold is valid. More... | |
bool | _validSickScanAngle (const sick_lms_2xx_scan_angle_t sick_scan_angle) const |
Indicates whether the given scan angle is defined. More... | |
bool | _validSickScanResolution (const sick_lms_2xx_scan_resolution_t sick_scan_resolution) const |
Indicates whether the given scan resolution is defined. More... | |
bool | _validSickSensitivity (const sick_lms_2xx_sensitivity_t sick_sensitivity) const |
Indicates whether the given sensitivity is defined. More... | |
Protected Member Functions inherited from SickToolbox::SickLIDAR< SickLMS2xxBufferMonitor, SickLMS2xxMessage > | |
double | _computeElapsedTime (const struct timeval &beg_time, const struct timeval &end_time) const |
bool | _monitorRunning () const |
void | _recvMessage (SickLMS2xxMessage &sick_message, const unsigned int timeout_value) const throw ( SickTimeoutException ) |
Attempt to acquire the latest available message from the device. More... | |
void | _recvMessage (SickLMS2xxMessage &sick_message, const uint8_t *const byte_sequence, const unsigned int byte_sequence_length, const unsigned int timeout_value) const throw ( SickTimeoutException ) |
Attempt to acquire a message having a payload beginning w/ the given byte sequence. More... | |
void | _sendMessage (const SickLMS2xxMessage &sick_message, const unsigned int byte_interval) const throw ( SickIOException ) |
Sends a message to the Sick device. More... | |
virtual void | _sendMessageAndGetReply (const SickLMS2xxMessage &send_message, SickLMS2xxMessage &recv_message, const uint8_t *const byte_sequence, const unsigned int byte_sequence_length, const unsigned int byte_interval, const unsigned int timeout_value, const unsigned int num_tries) throw ( SickTimeoutException, SickIOException) |
void | _setBlockingIO () const throw ( SickIOException ) |
A simple method for setting blocking I/O. More... | |
void | _setNonBlockingIO () const throw ( SickIOException ) |
A simple method for setting non-blocking I/O. More... | |
void | _startListening () throw ( SickThreadException ) |
Activates the buffer monitor for the driver. More... | |
void | _stopListening () throw ( SickThreadException ) |
Activates the buffer monitor for the driver. More... | |
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.
Adopt c-style convention.
Adopt c-style convention.
Adopt c-style convention.
Adopt c-style convention.
Adopt c-style convention.
typedef struct SickToolbox::SickLMS2xx::sick_lms_2xx_restart_status_tag SickToolbox::SickLMS2xx::sick_lms_2xx_restart_status_t |
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.
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.
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.
Definition at line 198 of file SickLMS2xx.hh.
Sick peak threshold. Only valid for Sick LMS 200/220!
Definition at line 158 of file SickLMS2xx.hh.
Defines the scan angle for the Sick LMS 2xx.
Definition at line 114 of file SickLMS2xx.hh.
Defines the available resolution settings for the Sick LMS 2xx.
Definition at line 125 of file SickLMS2xx.hh.
Sick sensitivities. Only valid for Sick LMS 211/221/291!
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.
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.
SickToolbox::SickLMS2xx::SickLMS2xx | ( | const std::string | sick_device_path | ) |
Primary constructor.
Constructor
sick_device_path | The path of the device |
Definition at line 45 of file SickLMS2xx.cc.
SickToolbox::SickLMS2xx::~SickLMS2xx | ( | ) |
|
protected |
Converts a termios baud to an equivalent Sick baud.
Given a baud rate as an integer, gets a LMS baud rate command.
baud_rate | The baud rate to be converted to a Sick LMS baud |
Definition at line 5016 of file SickLMS2xx.cc.
|
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
*byte_sequence | The byte sequence holding the current measured values |
num_measurements | The number of measurements given in the byte sequence |
*measured_values | A buffer to hold the extracted measured values |
*field_a_values | Stores the Field A values associated with the given measurements (Default: NULL => Not wanted) |
*field_b_values | Stores the Field B values associated with the given measurements (Default: NULL => Not wanted) |
*field_c_values | Stores the Field C values associated with the given measurements (Default: NULL => Not wanted) |
Definition at line 4624 of file SickLMS2xx.cc.
|
protected |
Flushes terminal I/O buffers.
Flushes the terminal I/O buffers
Definition at line 2396 of file SickLMS2xx.cc.
|
protected |
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.
|
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.
|
protected |
Acquires (and buffers) the status of the Sick LMS 2xx.
Gets the status of the LMS
Definition at line 3216 of file SickLMS2xx.cc.
|
protected |
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.
|
protected |
Indicates whether the Sick is an LMS 200.
Indicates whether the Sick LMS is type 200
Definition at line 4799 of file SickLMS2xx.cc.
|
protected |
Indicates whether the Sick is an LMS 211.
Indicates whether the Sick LMS is type 211
Definition at line 4815 of file SickLMS2xx.cc.
|
protected |
Indicates whether the Sick is an LMS 220.
Indicates whether the Sick LMS is type 220
Definition at line 4843 of file SickLMS2xx.cc.
|
protected |
Indicates whether the Sick is an LMS 221.
Indicates whether the Sick LMS is type 221
Definition at line 4859 of file SickLMS2xx.cc.
|
protected |
Indicates whether the Sick is an LMS 291.
Indicates whether the Sick LMS is type 291
Definition at line 4889 of file SickLMS2xx.cc.
|
protected |
Indicates whether the Sick type is unknown.
Indicates whether the Sick LMS type is unknown
Definition at line 4909 of file SickLMS2xx.cc.
|
protected |
Parses a byte sequence into a Sick config structure.
A function for parsing a byte sequence into a device config structure
*src_buffer | The byte sequence to be parsed |
&sick_device_config | The device configuration |
Definition at line 4515 of file SickLMS2xx.cc.
|
protected |
Parses a byte sequence into a scan profile corresponding to message B0.
Parses the scan profile returned w/ message B0
*src_buffer | The byte sequence to be parsed |
&sick_scan_profile | The returned scan profile for the current round of measurements |
Definition at line 4329 of file SickLMS2xx.cc.
|
protected |
Parses a byte sequence into a scan profile corresponding to message B6.
Parses the scan profile returned w/ message B6
*src_buffer | The byte sequence to be parsed |
&sick_scan_profile | The returned scan profile for the current round of mean measurements |
Definition at line 4362 of file SickLMS2xx.cc.
|
protected |
Parses a byte sequence into a scan profile corresponding to message B7.
Parses the scan profile returned w/ message B6
*src_buffer | The byte sequence to be parsed |
&sick_scan_profile | The returned scan profile for the current round of mean measurements |
Definition at line 4392 of file SickLMS2xx.cc.
|
protected |
Parses a byte sequence into a scan profile corresponding to message B6.
Parses the scan profile returned w/ message BF
*src_buffer | The byte sequence to be parsed |
&sick_scan_profile | The returned scan profile for the current round of mean measurements |
Definition at line 4431 of file SickLMS2xx.cc.
|
protected |
Parses a byte sequence into a scan profile corresponding to message C4.
Parses the scan profile returned w/ message C4
*src_buffer | The byte sequence to be parsed |
&sick_scan_profile | The returned scan profile for the current round of measurements |
Definition at line 4467 of file SickLMS2xx.cc.
|
inlineprotected |
Tells whether the device is returning real-time indices
Definition at line 867 of file SickLMS2xx.hh.
|
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.
&send_message | The message to be sent to the Sick LMS 2xx unit |
&recv_message | The expected message reply from the Sick LMS |
timeout_value | The epoch to wait before considering a sent frame lost (in usecs) |
num_tries | The 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.
|
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.
&send_message | The message to be sent to the Sick LMS 2xx unit |
&recv_message | The expected message reply from the Sick LMS |
reply_code | The reply code associated with the expected messgage |
timeout_value | The epoch to wait before considering a sent frame lost (in usecs) |
num_tries | The number of times to send the message in the event the LMS fails to reply |
Definition at line 2485 of file SickLMS2xx.cc.
|
protected |
Sets the baud rate for the current communication session.
Sets the baud rate for communication with the LMS.
baud_rate | The desired baud rate |
Definition at line 2530 of file SickLMS2xx.cc.
|
protected |
Sets the current configuration in flash.
Sets the Sick configuration in flash
&sick_device_config | The desired Sick LMS configuration |
Definition at line 2957 of file SickLMS2xx.cc.
|
protected |
Sets the device to diagnostic mode.
Switch Sick LMS to diagnostic mode
Definition at line 3561 of file SickLMS2xx.cc.
|
protected |
Sets the device to installation mode.
Switch Sick LMS to installation mode
Definition at line 3502 of file SickLMS2xx.cc.
|
protected |
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.
|
protected |
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.
|
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)
sample_size | The number of scans to consider in computing the mean measured values |
subrange_start_index | The starting index of the desired subrange |
subrange_stop_index | The stopping index of the desired subrange |
Definition at line 4025 of file SickLMS2xx.cc.
|
protected |
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.
|
protected |
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.
|
protected |
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.
|
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)
subrange_start_index | The starting index of the desired subrange |
subrange_stop_index | The stopping index of the desired subrange |
Definition at line 3936 of file SickLMS2xx.cc.
|
protected |
Sets the local terminal baud rate.
Changes the terminal's baud rate.
baud_rate | The desired terminal baud rate |
Definition at line 2653 of file SickLMS2xx.cc.
|
protectedvirtual |
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.
|
protected |
Attempts to open a I/O stream using the device path given at object instantiation.
delay | Delay to wait for SICK to power on. (In seconds) |
Definition at line 2329 of file SickLMS2xx.cc.
|
protected |
Converts given restart level to a corresponding string.
Given a bytecode representing Sick LMS availability, returns a corresponding string
availability_flags | The availability level of the Sick LMS 2xx |
Definition at line 5039 of file SickLMS2xx.cc.
|
protected |
Converts Sick LMS contour function code to a corresponding string.
Converts the LMS's contour function status code to a string
contour_function_code | The subtractive fields code |
Definition at line 5164 of file SickLMS2xx.cc.
|
protected |
Converts restart code to a corresponding string.
Given a bytecode representing Sick LMS restart mode, returns a corresponding string
restart_code | Restart code |
Definition at line 5085 of file SickLMS2xx.cc.
|
protected |
Converts Sick LMS subtractive fields code to a corresponding string.
Converts the LMS's subtractive field value to a string
subt_field_code | The subtractive fields code |
Definition at line 5146 of file SickLMS2xx.cc.
|
protected |
Converts Sick LMS temporary field code to a corresponding string.
Converts the LMS's temporary field value to a string
temp_field_code | The temporary field code |
Definition at line 5126 of file SickLMS2xx.cc.
|
protected |
Converts the Sick LMS variant to a corresponding string.
Converts the LMS's variant to a corresponding string
sick_variant | The Sick LMS variant |
Definition at line 5188 of file SickLMS2xx.cc.
|
protected |
Attempts to switch the operating mode of the Sick LMS 2xx.
Switches the operating mode of the LMS.
sick_mode | The desired operating mode |
mode_params | Additional parameters required to set the new operating mode |
Definition at line 4122 of file SickLMS2xx.cc.
|
protectedvirtual |
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.
|
protected |
Attempts to detect whether the LMS is operating at the given baud rate.
Tests communication wit the LMS at a particular baud rate.
baud_rate | The baud rate to use when "pinging" the Sick LMS 2xx |
Definition at line 2590 of file SickLMS2xx.cc.
|
protected |
Indicates whether the given measuring mode is defined.
Indicates whether the given sensitivity is defined
sick_measuring_mode | The sick measuring mode in question |
Definition at line 4991 of file SickLMS2xx.cc.
|
protected |
Indicates whether the given measuring units are valid/defined.
Indicates whether the given unit value is defined
sick_units | The units in question |
Definition at line 4784 of file SickLMS2xx.cc.
|
protected |
Indicates whether the given peak threshold is valid.
Indicates whether the given peak threshold is defined
sick_peak_threshold | Peak threshold definition for Sick LMS 2xx |
Definition at line 4972 of file SickLMS2xx.cc.
|
protected |
Indicates whether the given scan angle is defined.
Indicates whether the given scan angle is defined
sick_scan_angle | The scan angle in question |
Definition at line 4917 of file SickLMS2xx.cc.
|
protected |
Indicates whether the given scan resolution is defined.
Indicates whether the given scan resolution is defined
sick_scan_resolution | The scan resolution in question |
Definition at line 4935 of file SickLMS2xx.cc.
|
protected |
Indicates whether the given sensitivity is defined.
Indicates whether the given sensitivity is defined
sick_sensitivity | The sick sensitivity in question |
Definition at line 4953 of file SickLMS2xx.cc.
|
static |
Converts double to corresponding Sick LMS scan resolution.
A utility function for converting doubles to lms_sick_scan_resolution_t
scan_resolution_double | Scan resolution as a double (e.g. 0.25,0.5,1.0) |
Definition at line 2100 of file SickLMS2xx.cc.
uint8_t SickToolbox::SickLMS2xx::GetSickAvailability | ( | ) | const | |
throw | ( | SickConfigException | ||
) |
Gets the current Sick LMS 2xx availability level flags.
Gets the current availability flags for the device
Definition at line 821 of file SickLMS2xx.cc.
std::string SickToolbox::SickLMS2xx::GetSickConfigAsString | ( | ) | const |
Acquire the Sick LMS's config as a printable string.
Get Sick config as a string
Definition at line 1936 of file SickLMS2xx.cc.
std::string SickToolbox::SickLMS2xx::GetSickDevicePath | ( | ) | const |
Gets the Sick LMS 2xx device path.
Gets the Sick LMS 2xx device path
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
sick_sample_size | Number of scans to consider in computing the mean measured values (NOTE: 2 <= sick_sample_size <= 250) |
*measurement_values | Destination buffer for holding the current round of measured value |
&num_measurement_values | Number of values stored in measurement_values |
*sick_telegram_index | The telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted) |
*sick_real_time_scan_index | The 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
sick_sample_size | Number of consecutive scans used to compute the mean values |
sick_subrange_start_index | The starting index of the desired subrange (See below for example) |
sick_subrange_stop_index | The stopping index of the desired subrange (See below for example) |
*measurement_values | Destination buffer for holding the current round of measured value |
&num_measurement_values | Number of values stored in measurement_values |
*sick_telegram_index | The telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted) |
*sick_real_time_scan_index | The 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.
sick_lms_2xx_measuring_mode_t SickToolbox::SickLMS2xx::GetSickMeasuringMode | ( | ) | const | |
throw | ( | SickConfigException | ||
) |
Gets the current Sick LMS 2xx measuring mode.
Get the current Sick LMS 2xx measuring mode
Definition at line 713 of file SickLMS2xx.cc.
sick_lms_2xx_measuring_units_t SickToolbox::SickLMS2xx::GetSickMeasuringUnits | ( | ) | const | |
throw | ( | SickConfigException | ||
) |
Gets the current Sick LMS 2xx measuring units.
Get the current measurement units of the device
Definition at line 424 of file SickLMS2xx.cc.
sick_lms_2xx_operating_mode_t SickToolbox::SickLMS2xx::GetSickOperatingMode | ( | ) | const | |
throw | ( | SickConfigException | ||
) |
Gets the current Sick LMS 2xx operating mode.
Get the current Sick LMS 2xx operating mode
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.
*measurement_values | Destination buffer for holding the current round of measured value |
&num_measurement_values | Number of values stored in measurement_values |
*sick_partial_scan_index | Partial 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_values | Stores the Field A values associated with the given scan (Default: NULL => Not wanted) |
*sick_field_b_values | Stores the Field B values associated with the given scan (Default: NULL => Not wanted) |
*sick_field_c_values | Stores the Field C values associated with the given scan (Default: NULL => Not wanted) |
*sick_telegram_index | The telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted) |
*sick_real_time_scan_index | The 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.
sick_lms_2xx_peak_threshold_t SickToolbox::SickLMS2xx::GetSickPeakThreshold | ( | ) | const | |
throw | ( | SickConfigException | ||
) |
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.
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.
*measurement_values | Destination buffer for holding the current round of measured values |
&num_measurement_values | Number of values stored in measurement_values |
*sick_field_a_values | Stores the Field A values associated with the given scan (Default: NULL => Not wanted) |
*sick_field_b_values | Stores the Field B values associated with the given scan (Default: NULL => Not wanted) |
*sick_field_c_values | Stores the Field C values associated with the given scan (Default: NULL => Not wanted) |
*sick_telegram_index | The telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted) |
*sick_real_time_scan_index | The 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!
*range_values | The buffer in which range measurements will be stored |
*reflect_values | The buffer in which reflectivity measurements will be stored |
reflect_subrange_start_index | The starting index of the desired measured reflectivity subrange |
relfect_subrange_stop_index | The stopping index of the desired measured relfectivity subrange |
&num_range_measurements | The number of range measurements stored in range_values |
&num_reflectivity_measurements | The number of reflectivity measurements stored in reflect_values |
*sick_field_a_values | Stores the Field A values associated with the given scan (Default: NULL => Not wanted) |
*sick_field_b_values | Stores the Field B values associated with the given scan (Default: NULL => Not wanted) |
*sick_field_c_values | Stores the Field C values associated with the given scan (Default: NULL => Not wanted) |
*sick_telegram_index | The telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted) |
*sick_real_time_scan_index | The 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.
double SickToolbox::SickLMS2xx::GetSickScanAngle | ( | ) | const | |
throw | ( | SickConfigException | ||
) |
Gets the current scan angle of the device.
Gets the scan angle currently being used by the device
Definition at line 319 of file SickLMS2xx.cc.
double SickToolbox::SickLMS2xx::GetSickScanResolution | ( | ) | const | |
throw | ( | SickConfigException | ||
) |
Gets the current angular resolution.
Gets the scan resolution currently being used by the device
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.
sick_subrange_start_index | The starting index of the desired subrange (See below for example) |
sick_subrange_stop_index | The stopping index of the desired subrange (See below for example) |
*measurement_values | Destination buffer for holding the current round of measured value |
&num_measurement_values | Number of values stored in measurement_values |
*sick_field_a_values | Stores the Field A values associated with the given scan (Default: NULL => Not wanted) |
*sick_field_b_values | Stores the Field B values associated with the given scan (Default: NULL => Not wanted) |
*sick_field_c_values | Stores the Field C values associated with the given scan (Default: NULL => Not wanted) |
*sick_telegram_index | The telegram index assigned to the message (modulo: 256) (Default: NULL => Not wanted) |
<em>sick_real_time_scan_index | The 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.
sick_lms_2xx_sensitivity_t SickToolbox::SickLMS2xx::GetSickSensitivity | ( | ) | const | |
throw | ( | SickConfigException | ||
) |
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.
Definition at line 596 of file SickLMS2xx.cc.
std::string SickToolbox::SickLMS2xx::GetSickSoftwareVersionAsString | ( | ) | const |
Acquire the Sick LMS's operating params as a printable string.
Get Sick software info as a string
Definition at line 1909 of file SickLMS2xx.cc.
sick_lms_2xx_status_t SickToolbox::SickLMS2xx::GetSickStatus | ( | ) | ||
throw | ( | SickConfigException, | ||
SickTimeoutException, | ||||
SickIOException, | ||||
SickThreadException | ||||
) |
Acquire the Sick LMS 2xx status.
Acquire the Sick LMS status
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.
std::string SickToolbox::SickLMS2xx::GetSickStatusAsString | ( | ) | const |
Acquire the Sick LMS's status as a printable string.
Get Sick status as a string
Definition at line 1876 of file SickLMS2xx.cc.
sick_lms_2xx_type_t SickToolbox::SickLMS2xx::GetSickType | ( | ) | const | |
throw | ( | SickConfigException | ||
) |
Gets the Sick LMS 2xx type.
Gets the Sick LMS 2xx device type
Definition at line 303 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::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.
Initializes the Sick
desired_baud_rate | Desired session baud rate |
delay | Delay to wait for SICK to power on (in seconds) |
Definition at line 98 of file SickLMS2xx.cc.
|
static |
Converts integer to corresponding Sick LMS baud.
A utility function for converting integers to lms_baud_t
baud_str | Baud rate as integer (e.g. 9600,19200,38400,500000) |
Definition at line 2130 of file SickLMS2xx.cc.
|
static |
Converts integer to corresponding Sick LMS scan angle.
A utility function for converting integers to lms_sick_scan_angle_t
scan_angle_int | Scan angle (FOV) as an integer (e.g. 90,100,180) |
Definition at line 2062 of file SickLMS2xx.cc.
|
static |
Converts integer to corresponding Sick LMS scan resolution.
A utility function for converting ints to lms_sick_scan_resolution_t
scan_resolution_int | Scan resolution as an integer (e.g. 25,50,100) |
Definition at line 2081 of file SickLMS2xx.cc.
bool SickToolbox::SickLMS2xx::IsSickLMS2xxFast | ( | ) | const | |
throw | ( | SickConfigException | ||
) |
Indicates whether the device is an LMS Fast.
Indicates whether the Sick is an LMS Fast
Definition at line 1783 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::PrintSickConfig | ( | ) | const |
Prints out the Sick LMS configurations parameters.
Print the Sick LMS configuration
Definition at line 2000 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::PrintSickSoftwareVersion | ( | ) | const |
Prints out relevant software versioning information.
Print the Sick LMS software versions
Definition at line 1993 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::PrintSickStatus | ( | ) | const |
Prints ths status of the Sick LMS 2xx unit.
Print the Sick LMS status
Definition at line 1986 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::ResetSick | ( | ) | ||
throw | ( | SickConfigException, | ||
SickTimeoutException, | ||||
SickIOException, | ||||
SickThreadException | ||||
) |
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.
void SickToolbox::SickLMS2xx::SetSickAvailability | ( | const uint8_t | sick_availability_flags = SICK_FLAG_AVAILABILITY_DEFAULT | ) | |
throw | ( | SickConfigException, | |||
SickTimeoutException, | |||||
SickIOException, | |||||
SickThreadException | |||||
) |
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.
sick_availability_level | Desired availability of the Sick LMS |
Definition at line 745 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::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.
Sets the measuring mode for the device (in EEPROM). See page 98 of the telegram listing for more details.
sick_measuring_mode | Desired measuring mode |
Definition at line 640 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::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.
Set the measurement units of the device (in EEPROM)
sick_units | Desired measurement units for the device |
Definition at line 351 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::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.
Sets the peak threshold mode for the device (in EEPROM). NOTE: Only applies to LMS 200/220 models
sick_sensitivity | Desired sensitivity level |
Definition at line 518 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::SetSickSensitivity | ( | const sick_lms_2xx_sensitivity_t | sick_sensitivity = SICK_SENSITIVITY_STANDARD | ) | |
throw | ( | SickConfigException, | |||
SickTimeoutException, | |||||
SickIOException, | |||||
SickThreadException | |||||
) |
Sets the Sick LMS sensitivity level.
Sets the sensitivity value for the device (in EEPROM). NOTE: Only applies to LMS 211/221/291 models.
sick_sensitivity | Desired sensitivity level |
Definition at line 440 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::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)
Sets the variant type for the device (in EEPROM)
scan_angle | The desired scan angle of the Sick LMS 2xx |
scan_resolution | The desired angular resolution of the Sick LMS 2xx |
Definition at line 838 of file SickLMS2xx.cc.
|
static |
Converts Sick LMS baud to a corresponding string.
Converts the given bad, returns a string representing that baud rate.
baud_rate | The baud rate to be represented as a string |
Definition at line 2109 of file SickLMS2xx.cc.
|
static |
Converts the Sick measuring mode to a corresponding string.
Converts the LMS's measuring mode to a corresponding string
sick_measuring_mode | The Sick measuring mode |
Definition at line 2181 of file SickLMS2xx.cc.
|
static |
Converts the Sick LMS measurement units to a corresponding string.
Converts the LMS's measuring units to a corresponding string
sick_units | The measuring units |
Definition at line 2304 of file SickLMS2xx.cc.
|
static |
Converts the Sick operating mode to a corresponding string.
Converts the LMS's measuring mode to a corresponding string
sick_operating_mode | The Sick operating mode |
Definition at line 2212 of file SickLMS2xx.cc.
|
static |
Converts Sick LMS 2xx peak threshold to a corresponding string.
Converts the LMS's peak threshold to string
sick_peak_threshold | Sick sensitivity level |
Definition at line 2282 of file SickLMS2xx.cc.
|
static |
Converts Sick LMS 2xx sensitivity level to a corresponding string.
Converts the LMS's sensitivity to string
sick_sensitivity | Sick sensitivity level |
Definition at line 2260 of file SickLMS2xx.cc.
|
static |
Converts the Sick LMS 2xx status code to a string.
Converts the LMS's status to a corresponding string
sick_status | The device status |
Definition at line 2166 of file SickLMS2xx.cc.
|
static |
Converts the Sick LMS type to a corresponding string.
Converts the LMS's type to a corresponding string
sick_type | The device type |
Definition at line 2009 of file SickLMS2xx.cc.
|
static |
Converts string to corresponding Sick LMS baud.
A utility function for converting baud strings to lms_baud_t
baud_str | Baud rate as string (e.g. "9600","19200","38400","500000") |
Definition at line 2151 of file SickLMS2xx.cc.
void SickToolbox::SickLMS2xx::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).
Uninitializes the Sick
Definition at line 229 of file SickLMS2xx.cc.
|
protected |
The baud rate at which to communicate with the Sick
Definition at line 711 of file SickLMS2xx.hh.
|
protected |
The desired baud rate for communicating w/ the Sick
Definition at line 714 of file SickLMS2xx.hh.
|
protected |
Stores information about the original terminal settings
Definition at line 753 of file SickLMS2xx.hh.
|
protected |
The baud configuration of the device
Definition at line 738 of file SickLMS2xx.hh.
|
protected |
The device configuration for the Sick
Definition at line 741 of file SickLMS2xx.hh.
|
protected |
A path to the device at which the sick can be accessed.
Definition at line 708 of file SickLMS2xx.hh.
|
protected |
The field configuration for the device
Definition at line 735 of file SickLMS2xx.hh.
|
protected |
Used when the device is streaming mean values
Definition at line 744 of file SickLMS2xx.hh.
|
protected |
The operating parameters of the device
Definition at line 720 of file SickLMS2xx.hh.
|
protected |
The pollution measurement status
Definition at line 729 of file SickLMS2xx.hh.
|
protected |
The restart configuration of the device
Definition at line 726 of file SickLMS2xx.hh.
|
protected |
The signal status of the device
Definition at line 732 of file SickLMS2xx.hh.
|
protected |
The current software version being run on the device
Definition at line 723 of file SickLMS2xx.hh.
|
protected |
A string representing the type of device
Definition at line 717 of file SickLMS2xx.hh.
|
protected |
Used when the device is streaming a scan subrange
Definition at line 747 of file SickLMS2xx.hh.
|
protected |
Used when the device is streaming a scan subrange
Definition at line 750 of file SickLMS2xx.hh.
|
static |
Dazzle evalutation has no effect on switching outputs.
Definition at line 235 of file SickLMS2xx.hh.
|
static |
Availability unspecified.
Define Sick LMS 2xx availability levels
Definition at line 232 of file SickLMS2xx.hh.
|
static |
Highest availability (comparable to LMS types 1 to 5)
Definition at line 233 of file SickLMS2xx.hh.
|
static |
Send real-time indices.
Definition at line 234 of file SickLMS2xx.hh.
|
static |
Maximum number of measurements returned by the Sick LMS.
Define the maximum number of measurements
Definition at line 56 of file SickLMS2xx.hh.