Go to the documentation of this file.
87 std::vector<float>& ranges,
unsigned char& LMS_status,
133 const std::string& iniSection)
override;
188 bool& outThereIsObservation,
190 bool& hardwareError)
override;
int getScanResolution() const
void initialize() override
Set-up communication with the laser.
unsigned int getCurrentConnectTry() const
If performing several tries in initialize(), this is the current try loop number.
~CSickLaserSerial() override
Destructor
bool LMS_statusQuery()
Send a status query and wait for the answer.
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
void setMillimeterMode(bool mm_mode=true)
Enables/Disables the millimeter mode, with a greater accuracy but a shorter range (default=false) (ca...
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection) override
See the class documentation at the top for expected parameters.
int m_com_baudRate
Baudrate: 9600, 38400, 500000.
std::string getSerialPort() const
std::string m_com_port
If set to non-empty, the serial port will be attempted to be opened automatically when this class is ...
Contains classes for various device interfaces.
bool m_skip_laser_config
If true, doesn't send the initialization commands to the laser and go straight to capturing.
bool LMS_setupBaudrate(int baud)
Send a command to change the LMS comms baudrate, return true if ACK is OK.
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
CSickLaserSerial()
Constructor
bool tryToOpenComms(std::string *err_msg=nullptr)
Tries to open the com port and setup all the LMS protocol.
mrpt::math::TPose3D m_sensorPose
The sensor 6D pose:
bool LMS_setupSerialComms()
Assures laser is connected and operating at 38400, in its case returns true.
This is the base, abstract class for "software drivers" interfaces to 2D scanners (laser range finder...
bool turnOn() override
Enables the scanning mode (in this class this has no effect).
uint8_t m_received_frame_buffer[2000]
void setScanFOV(int fov_degrees)
Set the scanning field of view - possible values are 100 or 180 (default) (call prior to 'doProcess')...
bool SendCommandToSICK(const uint8_t *cmd, const uint16_t cmd_len)
Send header+command-data+crc and waits for ACK.
This class allows loading and storing values and vectors of different types from a configuration text...
bool LMS_waitIncomingFrame(uint16_t timeout)
Returns false if timeout.
int m_scans_res
1/100th of deg: 100, 50 or 25
unsigned int m_nTries_current
bool waitContinuousSampleFrame(std::vector< float > &ranges, unsigned char &LMS_status, bool &is_mm_mode)
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
This "software driver" implements the communication protocol for interfacing a SICK LMS 2XX laser sca...
void setScanResolution(int res_1_100th_degree)
Set the scanning resolution, in units of 1/100 degree - Possible values are 25, 50 and 100,...
void setBaudRate(int baud)
Changes the serial port baud rate (call prior to 'doProcess'); valid values are 9600,...
unsigned int m_nTries_connect
Default = 1.
std::shared_ptr< mrpt::comms::CSerialPort > m_mySerialPort
Will be !=nullptr only if I created it, so I must destroy it at the end.
bool LMS_endContinuousMode()
bool LMS_sendMeasuringMode_cm_mm()
Returns false on error.
int m_scans_FOV
100 or 180 deg
bool turnOff() override
Disables the scanning mode (in this class this has no effect).
void setSerialPort(const std::string &port)
Changes the serial port to connect to (call prior to 'doProcess'), for example "COM1" or "ttyS0".
bool LMS_startContinuousMode()
bool LMS_waitACK(uint16_t timeout_ms)
Returns false if timeout.
void doProcessSimple(bool &outThereIsObservation, mrpt::obs::CObservation2DRangeScan &outObservation, bool &hardwareError) override
Specific laser scanner "software drivers" must process here new data from the I/O stream,...
Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Thu May 21 21:53:32 UTC 2020 | |