#include <sl_lidar_driver.h>
|
virtual sl_result | ascendScanData (sl_lidar_response_measurement_node_hq_t *nodebuffer, size_t count)=0 |
|
virtual sl_result | checkMotorCtrlSupport (MotorCtrlSupport &motorCtrlSupport, sl_u32 timeout=DEFAULT_TIMEOUT)=0 |
|
virtual sl_result | connect (IChannel *channel)=0 |
|
virtual void | disconnect ()=0 |
|
virtual sl_result | getAllSupportedScanModes (std::vector< LidarScanMode > &outModes, sl_u32 timeoutInMs=DEFAULT_TIMEOUT)=0 |
| Get all scan modes that supported by lidar. More...
|
|
virtual sl_result | getDeviceInfo (sl_lidar_response_device_info_t &info, sl_u32 timeout=DEFAULT_TIMEOUT)=0 |
|
virtual sl_result | getDeviceMacAddr (sl_u8 *macAddrArray, sl_u32 timeoutInMs=DEFAULT_TIMEOUT)=0 |
|
virtual sl_result | getFrequency (const LidarScanMode &scanMode, const sl_lidar_response_measurement_node_hq_t *nodes, size_t count, float &frequency)=0 |
|
virtual sl_result | getHealth (sl_lidar_response_device_health_t &health, sl_u32 timeout=DEFAULT_TIMEOUT)=0 |
|
virtual sl_result | getMotorInfo (LidarMotorInfo &motorInfo, sl_u32 timeoutInMs=DEFAULT_TIMEOUT)=0 |
|
virtual sl_result | getScanDataWithIntervalHq (sl_lidar_response_measurement_node_hq_t *nodebuffer, size_t &count)=0 |
|
virtual sl_result | getTypicalScanMode (sl_u16 &outMode, sl_u32 timeoutInMs=DEFAULT_TIMEOUT)=0 |
| Get typical scan mode of lidar. More...
|
|
virtual sl_result | grabScanDataHq (sl_lidar_response_measurement_node_hq_t *nodebuffer, size_t &count, sl_u32 timeout=DEFAULT_TIMEOUT)=0 |
|
virtual bool | isConnected ()=0 |
|
virtual sl_result | negotiateSerialBaudRate (sl_u32 requiredBaudRate, sl_u32 *baudRateDetected=NULL)=0 |
|
virtual sl_result | reset (sl_u32 timeoutInMs=DEFAULT_TIMEOUT)=0 |
|
virtual sl_result | setLidarIpConf (const sl_lidar_ip_conf_t &conf, sl_u32 timeout=DEFAULT_TIMEOUT)=0 |
|
virtual sl_result | setMotorSpeed (sl_u16 speed=DEFAULT_MOTOR_SPEED)=0 |
|
virtual sl_result | startScan (bool force, bool useTypicalScan, sl_u32 options=0, LidarScanMode *outUsedScanMode=nullptr)=0 |
|
virtual sl_result | startScanExpress (bool force, sl_u16 scanMode, sl_u32 options=0, LidarScanMode *outUsedScanMode=nullptr, sl_u32 timeout=DEFAULT_TIMEOUT)=0 |
|
virtual sl_result | stop (sl_u32 timeout=DEFAULT_TIMEOUT)=0 |
|
virtual | ~ILidarDriver () |
|
Definition at line 253 of file sl_lidar_driver.h.
◆ anonymous enum
◆ ~ILidarDriver()
virtual sl::ILidarDriver::~ILidarDriver |
( |
| ) |
|
|
inlinevirtual |
◆ ascendScanData()
Ascending the scan data according to the angle value in the scan.
- Parameters
-
nodebuffer | Buffer provided by the caller application to do the reorder. Should be retrived from the grabScanData |
count | The caller must initialize this parameter to set the max data count of the provided buffer (in unit of rplidar_response_measurement_node_t). Once the interface returns, this parameter will store the actual received data count. The interface will return SL_RESULT_OPERATION_FAIL when all the scan data is invalid. |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ checkMotorCtrlSupport()
Check whether the device support motor control Note: this API will disable grab.
- Parameters
-
motorCtrlSupport | Return the result. |
timeout | The operation timeout value (in millisecond) for the serial port communication. |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ connect()
Connect to LIDAR via channel
- Parameters
-
channel | The communication channel Note: you should manage the lifecycle of the channel object, make sure it is alive during lidar driver's lifecycle |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ disconnect()
virtual void sl::ILidarDriver::disconnect |
( |
| ) |
|
|
pure virtual |
◆ getAllSupportedScanModes()
◆ getDeviceInfo()
virtual sl_result sl::ILidarDriver::getDeviceInfo |
( |
sl_lidar_response_device_info_t & |
info, |
|
|
sl_u32 |
timeout = DEFAULT_TIMEOUT |
|
) |
| |
|
pure virtual |
Get the device information of the RPLIDAR include the serial number, firmware version, device model etc.
- Parameters
-
info | The device information returned from the RPLIDAR |
timeout | The operation timeout value (in millisecond) for the serial port communication |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ getDeviceMacAddr()
◆ getFrequency()
Calculate LIDAR's current scanning frequency from the given scan data Please refer to the application note doc for details Remark: the calcuation will be incorrect if the specified scan data doesn't contains enough data
- Parameters
-
scanMode | Lidar's current scan mode |
nodes | Current scan's measurements |
count | The number of sample nodes inside the given buffer |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ getHealth()
virtual sl_result sl::ILidarDriver::getHealth |
( |
sl_lidar_response_device_health_t & |
health, |
|
|
sl_u32 |
timeout = DEFAULT_TIMEOUT |
|
) |
| |
|
pure virtual |
Retrieve the health status of the RPLIDAR The host system can use this operation to check whether RPLIDAR is in the self-protection mode.
- Parameters
-
health | The health status info returned from the RPLIDAR |
timeout | The operation timeout value (in millisecond) for the serial port communication |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ getMotorInfo()
Get the motor information of the RPLIDAR include the max speed, min speed, desired speed.
- Parameters
-
motorInfo | The motor information returned from the RPLIDAR |
Implemented in sl::SlamtecLidarDriver.
◆ getScanDataWithIntervalHq()
Return received scan points even if it's not complete scan
- Parameters
-
nodebuffer | Buffer provided by the caller application to store the scan data |
count | Once the interface returns, this parameter will store the actual received data count. |
The interface will return SL_RESULT_OPERATION_TIMEOUT to indicate that not even a single node can be retrieved since last call.
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ getTypicalScanMode()
◆ grabScanDataHq()
Wait and grab a complete 0-360 degree scan data previously received. The grabbed scan data returned by this interface always has the following charactistics:
1) The first node of the grabbed data array (nodebuffer[0]) must be the first sample of a scan, i.e. the start_bit == 1 2) All data nodes are belong to exactly ONE complete 360-degrees's scan 3) Note, the angle data in one scan may not be ascending. You can use API ascendScanData to reorder the nodebuffer.
- Parameters
-
nodebuffer | Buffer provided by the caller application to store the scan data |
count | The caller must initialize this parameter to set the max data count of the provided buffer (in unit of rplidar_response_measurement_node_t). Once the interface returns, this parameter will store the actual received data count. |
timeout | Max duration allowed to wait for a complete scan data, nothing will be stored to the nodebuffer if a complete 360-degrees' scan data cannot to be ready timely. |
The interface will return SL_RESULT_OPERATION_TIMEOUT to indicate that no complete 360-degrees' scan can be retrieved withing the given timeout duration.
caller application can set the timeout value to Zero(0) to make this interface always returns immediately to achieve non-block operation.
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ isConnected()
virtual bool sl::ILidarDriver::isConnected |
( |
| ) |
|
|
pure virtual |
◆ negotiateSerialBaudRate()
virtual sl_result sl::ILidarDriver::negotiateSerialBaudRate |
( |
sl_u32 |
requiredBaudRate, |
|
|
sl_u32 * |
baudRateDetected = NULL |
|
) |
| |
|
pure virtual |
Ask the LIDAR to use a new baudrate for serial communication The target LIDAR system must support such feature to work. This function does NOT check whether the target LIDAR works with the requiredBaudRate or not. In order to verifiy the result, use getDeviceInfo or other getXXXX functions instead.
- Parameters
-
requiredBaudRate | The new baudrate required to be used. It MUST matches with the baudrate of the binded channel. |
baudRateDetected | The actual baudrate detected by the LIDAR system |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ reset()
Ask the LIDAR core system to reset it self The host system can use the Reset operation to help LIDAR escape the self-protection mode.
- Parameters
-
timeout | The operation timeout value (in millisecond) |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ setLidarIpConf()
virtual sl_result sl::ILidarDriver::setLidarIpConf |
( |
const sl_lidar_ip_conf_t & |
conf, |
|
|
sl_u32 |
timeout = DEFAULT_TIMEOUT |
|
) |
| |
|
pure virtual |
Set LPX series lidar's static IP address
- Parameters
-
conf | Network parameter that LPX series lidar owned |
timeout | The operation timeout value (in millisecond) for the ethernet udp communication |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ setMotorSpeed()
Set lidar motor speed The host system can use this operation to set lidar motor speed.
- Parameters
-
speed | The speed value set to lidar |
Note: The function will stop scan if speed is DEFAULT_MOTOR_SPEED.
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ startScan()
virtual sl_result sl::ILidarDriver::startScan |
( |
bool |
force, |
|
|
bool |
useTypicalScan, |
|
|
sl_u32 |
options = 0 , |
|
|
LidarScanMode * |
outUsedScanMode = nullptr |
|
) |
| |
|
pure virtual |
Start scan
- Parameters
-
force | Force the core system to output scan data regardless whether the scanning motor is rotating or not. |
useTypicalScan | Use lidar's typical scan mode or use the compatibility mode (2k sps) |
options | Scan options (please use 0) |
outUsedScanMode | The scan mode selected by lidar |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ startScanExpress()
Start scan in specific mode
- Parameters
-
force | Force the core system to output scan data regardless whether the scanning motor is rotating or not. |
scanMode | The scan mode id (use getAllSupportedScanModes to get supported modes) |
options | Scan options (please use 0) |
outUsedScanMode | The scan mode selected by lidar |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
◆ stop()
Ask the LIDAR core system to stop the current scan operation and enter idle state. The background thread will be terminated
- Parameters
-
timeout | The operation timeout value (in millisecond) for the serial port communication |
Implemented in sl::SlamtecLidarDriver, and sl::SL_LidarDriver.
The documentation for this class was generated from the following file: