Robotics Library  0.7.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
rl::hal::SickLms200 Class Reference

Sick LMS 200 laser measurement system. More...

#include <SickLms200.h>

Inheritance diagram for rl::hal::SickLms200:
Inheritance graph
[legend]

Public Types

enum  BaudRate { BAUDRATE_9600BPS, BAUDRATE_19200BPS, BAUDRATE_38400BPS, BAUDRATE_500000BPS }
 
enum  Measuring {
  MEASURING_8M, MEASURING_16M, MEASURING_32M, MEASURING_80M,
  MEASURING_160M, MEASURING_320M
}
 
enum  Monitoring { MONITORING_CONTINUOUS, MONITORING_SINGLE }
 
enum  Variant {
  VARIANT_100_25, VARIANT_100_50, VARIANT_100_100, VARIANT_180_50,
  VARIANT_180_100
}
 

Public Member Functions

 SickLms200 (const ::std::string &device="/dev/ttyS0", const BaudRate &baudRate=BAUDRATE_9600BPS, const Monitoring &monitoring=MONITORING_SINGLE, const Variant &variant=VARIANT_180_50, const Measuring &measuring=MEASURING_8M, const ::std::string &password="SICK_LMS")
 
virtual ~SickLms200 ()
 
void close ()
 
void dumpConfiguration ()
 
void dumpStatus ()
 
BaudRate getBaudRate () const
 
::rl::math::Vector getDistances () const
 
::std::size_t getDistancesCount () const
 
::rl::math::Real getDistancesMaximum (const ::std::size_t &i) const
 
::rl::math::Real getDistancesMinimum (const ::std::size_t &i) const
 
Measuring getMeasuring () const
 
Monitoring getMonitoring () const
 
::rl::math::Real getResolution () const
 
::rl::math::Real getStartAngle () const
 
::rl::math::Real getStopAngle () const
 
::std::string getType ()
 
Variant getVariant () const
 
void open ()
 
void reset ()
 
void setBaudRate (const BaudRate &baudRate)
 
void setMeasuring (const Measuring &measuring)
 
void setMonitoring (const Monitoring &monitoring)
 
void setVariant (const Variant &variant)
 
void start ()
 
void step ()
 
void stop ()
 
- Public Member Functions inherited from rl::hal::CyclicDevice
 CyclicDevice (const ::std::chrono::nanoseconds &updateRate)
 
virtual ~CyclicDevice ()
 
virtual ::std::chrono::nanoseconds getUpdateRate () const
 
- Public Member Functions inherited from rl::hal::Device
 Device ()
 
virtual ~Device ()
 
bool isConnected () const
 
bool isRunning () const
 
- Public Member Functions inherited from rl::hal::Lidar
 Lidar ()
 
virtual ~Lidar ()
 
- Public Member Functions inherited from rl::hal::RangeSensor
 RangeSensor ()
 
virtual ~RangeSensor ()
 

Private Member Functions

::std::uint16_t crc (const ::std::uint8_t *buf, const ::std::size_t &len) const
 
::std::size_t recv (::std::uint8_t *buf, const ::std::size_t &len, const ::std::uint8_t &command)
 
void send (::std::uint8_t *buf, const ::std::size_t &len)
 
bool waitAck ()
 

Private Attributes

BaudRate baudRate
 
::std::uint8_t configuration
 
::std::array< ::std::uint8_t, 812 > data
 
BaudRate desired
 
Measuring measuring
 
Monitoring monitoring
 
::std::string password
 
Serial serial
 
Variant variant
 

Additional Inherited Members

- Protected Member Functions inherited from rl::hal::Device
void setConnected (const bool &connected)
 
void setRunning (const bool &running)
 

Detailed Description

Sick LMS 200 laser measurement system.

Member Enumeration Documentation

◆ BaudRate

Enumerator
BAUDRATE_9600BPS 

9,600 bps.

BAUDRATE_19200BPS 

19,200 bps.

BAUDRATE_38400BPS 

38,400 bps.

BAUDRATE_500000BPS 

500,000 bps.

◆ Measuring

Enumerator
MEASURING_8M 
MEASURING_16M 
MEASURING_32M 
MEASURING_80M 
MEASURING_160M 
MEASURING_320M 

◆ Monitoring

Enumerator
MONITORING_CONTINUOUS 
MONITORING_SINGLE 

◆ Variant

Enumerator
VARIANT_100_25 

Angle = 100 degrees, resolution = 0.25 degrees.

VARIANT_100_50 

Angle = 100 degrees, resolution = 0.5 degrees.

VARIANT_100_100 

Angle = 100 degrees, resolution = 1 degree.

VARIANT_180_50 

Angle = 180 degrees, resolution = 0.5 degrees.

VARIANT_180_100 

Angle = 180 degrees, resolution = 1 degree.

Constructor & Destructor Documentation

◆ SickLms200()

rl::hal::SickLms200::SickLms200 ( const ::std::string &  device = "/dev/ttyS0",
const BaudRate baudRate = BAUDRATE_9600BPS,
const Monitoring monitoring = MONITORING_SINGLE,
const Variant variant = VARIANT_180_50,
const Measuring measuring = MEASURING_8M,
const ::std::string &  password = "SICK_LMS" 
)
Parameters
[in]passwordString with 8 characters comprising "0...9", "a...z", "A...Z", and "_".

◆ ~SickLms200()

rl::hal::SickLms200::~SickLms200 ( )
virtual

Member Function Documentation

◆ close()

void rl::hal::SickLms200::close ( )
virtual
Precondition
stop()

Implements rl::hal::Device.

◆ crc()

std::uint16_t rl::hal::SickLms200::crc ( const ::std::uint8_t *  buf,
const ::std::size_t &  len 
) const
private

◆ dumpConfiguration()

void rl::hal::SickLms200::dumpConfiguration ( )

◆ dumpStatus()

void rl::hal::SickLms200::dumpStatus ( )

◆ getBaudRate()

SickLms200::BaudRate rl::hal::SickLms200::getBaudRate ( ) const

◆ getDistances()

rl::math::Vector rl::hal::SickLms200::getDistances ( ) const
virtual
Parameters
[out]distances[m]

Implements rl::hal::RangeSensor.

◆ getDistancesCount()

std::size_t rl::hal::SickLms200::getDistancesCount ( ) const
virtual

Implements rl::hal::RangeSensor.

◆ getDistancesMaximum()

rl::math::Real rl::hal::SickLms200::getDistancesMaximum ( const ::std::size_t &  i) const
virtual
Returns
[m]

Implements rl::hal::RangeSensor.

◆ getDistancesMinimum()

rl::math::Real rl::hal::SickLms200::getDistancesMinimum ( const ::std::size_t &  i) const
virtual
Returns
[m]

Implements rl::hal::RangeSensor.

◆ getMeasuring()

SickLms200::Measuring rl::hal::SickLms200::getMeasuring ( ) const

◆ getMonitoring()

SickLms200::Monitoring rl::hal::SickLms200::getMonitoring ( ) const

◆ getResolution()

rl::math::Real rl::hal::SickLms200::getResolution ( ) const
virtual

Implements rl::hal::Lidar.

◆ getStartAngle()

rl::math::Real rl::hal::SickLms200::getStartAngle ( ) const
virtual

Implements rl::hal::Lidar.

◆ getStopAngle()

rl::math::Real rl::hal::SickLms200::getStopAngle ( ) const
virtual

Implements rl::hal::Lidar.

◆ getType()

std::string rl::hal::SickLms200::getType ( )

◆ getVariant()

SickLms200::Variant rl::hal::SickLms200::getVariant ( ) const

◆ open()

void rl::hal::SickLms200::open ( )
virtual

Implements rl::hal::Device.

◆ recv()

std::size_t rl::hal::SickLms200::recv ( ::std::uint8_t *  buf,
const ::std::size_t &  len,
const ::std::uint8_t &  command 
)
private

◆ reset()

void rl::hal::SickLms200::reset ( )

◆ send()

void rl::hal::SickLms200::send ( ::std::uint8_t *  buf,
const ::std::size_t &  len 
)
private

◆ setBaudRate()

void rl::hal::SickLms200::setBaudRate ( const BaudRate baudRate)

◆ setMeasuring()

void rl::hal::SickLms200::setMeasuring ( const Measuring measuring)

◆ setMonitoring()

void rl::hal::SickLms200::setMonitoring ( const Monitoring monitoring)

◆ setVariant()

void rl::hal::SickLms200::setVariant ( const Variant variant)

◆ start()

void rl::hal::SickLms200::start ( )
virtual
Precondition
open()

Implements rl::hal::Device.

◆ step()

void rl::hal::SickLms200::step ( )
virtual
Precondition
start()

Implements rl::hal::CyclicDevice.

◆ stop()

void rl::hal::SickLms200::stop ( )
virtual
Precondition
open()

Implements rl::hal::Device.

◆ waitAck()

bool rl::hal::SickLms200::waitAck ( )
private

Member Data Documentation

◆ baudRate

BaudRate rl::hal::SickLms200::baudRate
private

◆ configuration

::std::uint8_t rl::hal::SickLms200::configuration
private

◆ data

::std::array< ::std::uint8_t, 812> rl::hal::SickLms200::data
private

◆ desired

BaudRate rl::hal::SickLms200::desired
private

◆ measuring

Measuring rl::hal::SickLms200::measuring
private

◆ monitoring

Monitoring rl::hal::SickLms200::monitoring
private

◆ password

::std::string rl::hal::SickLms200::password
private

◆ serial

Serial rl::hal::SickLms200::serial
private

◆ variant

Variant rl::hal::SickLms200::variant
private

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