Product Introduction
14 / 17
Copyright (c) 2009-2013 RoboPeak Team
Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
The startScan() function will start a background worker thread to receive the
measurement scan data sequence sent from RPLIDAR asynchronously. The
received data sequence is stored in the driver’s internal cache for the
grabScanData() function to fetch.
User programs can use the grabScanData() function to retrieve the scan data
sequence previously received and cached by the driver. This function always
returns a latest and complete 360-degrees’ measurement scan data sequence.
After each grabScanData() call, the internal data cache will be cleared to ensure
the grabScanData() won’t get duplicated data.
In case a complete 360-degrees’ scan sequence hasn’t been available at the
time when grabScanData() is called, the function will wait until a complete scan
data is received by the driver or the given timeout duration is expired. User
programs can tune this timeout value to meet different application requirements.
Note: the startScan() and stop() functions don’t control the scanning motor
of the RPLIDAR directly. The host system should control the scanning motor to
rotate or stop via the PWM pin.
Please refer to the comments in the header files and the implementation of SDK
demo applications for details.
Retrieving Other Information of an RPLIDAR
The user program can retrieve other information of an RPLIDAR via the following
functions. Please refer to the comments in the header files and the implementation
of SDK demo applications for details.
Figure 3-3 RPLIDAR Functions related to Retrieving Other Information Operation
Function Name
Brief description
getHealth()
Get the healthy status of an RPLIDAR
getDeviceInfo()
Retrieve the device information, e.g. serial number,
firmware version etc, from and RPLIDAR
getFrequency()
Calculate an RPLIDAR’s scanning speed from a
complete scan sequence.
checkExpressScanSupported()
Check whether the RPLIDAR supports Express Scan
mode
getSampleDuration_uS()
Get the the single measurement duration in standard
scan mode and express scan mode respectively. The
unit is micro second.