ryan-brazeal-ufl / OpenPyLivox

Python3 driver for Livox lidar sensors
GNU General Public License v3.0
85 stars 44 forks source link

what's the usage of the parameter: firmwareType and secsToWait in the class _dataCaptureThread #17

Closed yinshuli-dot closed 3 years ago

yinshuli-dot commented 3 years ago

Hello Ryan: After some small modification, I can use this driver for the horizon lidar; thanks, it's very good; What's the usage of firmware type of the firmwareType and secsToWait ? I see you use it to adjust the duration time. I know the first version of this driver is for Mid-40. it has the firmware version problem for horizon or not? My horizon version is 06.10.0061. In addition, in the "run" function of _dataCaptureThread, before getting into the main data capturing loop, I see you use 2 while True loop. About the first while loop, you mark "# keep looping to 'consume' data that we don't want included in the captured point cloud data" . I cann't fully understand, do you mean that data of first few seconds are not very good? About the second while loop before the main while loop, you use the secsToWait as the conditional judgement, what's that purpose? thanks Steven

ryan-brazeal-ufl commented 3 years ago

Hello,

The firmwareType property is solely used for properly detecting and handling multiple return data (dual and triple returns) for Mid-40 sensors. The Horizon sensor has a direct SDK command, as well as different return data type identifiers for dealing with multiple return data.

The while loop that 'consumes' data before the start of the primary data collection while loop is/was for experimental research. I guess it's now an artifact within OPL and could be removed. The data is good once the sensor starts transmitting data (as far as I understand it). The secsToWait argument was implemented as a simple time delay before data collection (nothing more complicated than that).

Thanks,

-Ryan