3. Object Properties - ryan-brazeal-ufl/OpenPyLivox GitHub Wiki
There are several properties associated with an OpenPyLivox object. These properties can be used to acquire the current value(s) of specific elements (data) about the OpenPyLivox object. The majority of the properties are read-only.
As previously mentioned in section 1.4, the .showMessages property is boolean type, and is used to indicate whether or not information messages should be printed to the screen (sys.stdout) during runtime. The important ERROR messages that may occur during runtime, are ALWAYS printed to the screen. It is strongly recommended that this property to set to True when a user is first starting to use the OpenPyLivox library. Usage examples are:
sensor.showMessages = True
sensor.showMessages = False
if sensor.showMessages:
print("The sensor is currently set to display information messages")
else:
print("The sensor is currently not set to display information messages")The .connectionParameters() property returns a list with 4 string elements. The returned list has the following definition.
[computerIP, sensorIP, dataPort, cmdPort]
If .showMessage is True, then a message like the example below will be printed to the screen.
Computer IP Address: 192.168.1.20
Sensor IP Address: 192.168.1.42
Data Port Number: 60001
Command Port Number: 50001
Usage Example,
connParamsStrList = sensor.connectionParameters()The .extrinsicParameters() property returns a list with 6 float elements. The returned list has the following definition.
[X, Y, Z, Roll, Pitch, Yaw]
If .showMessage is True, then a message like the example below will be printed to the screen.
x: 12.345 m
y: -23.456 m
z: 34.567 m
roll: -0.05 deg
pitch: 8.77 deg
yaw: -174.14 deg
Usage Example,
extParamsFloatList = sensor.extrinsicParameters()NOTE: this property is similar to the object method .readExtrinsic() (See section 4.4) but this property returns the current extrinsic values associated with the OpenPyLivox object, while the .readExtrinsic() method gets the current extrinsic values associated with the physical Livox lidar sensor.
The .firmware() property returns a string value.
If .showMessage is True, then a message like the example below will be printed to the screen.
192.168.1.42 --> F/W Version: 03.06.0000
Usage Example,
firmwareStr = sensor.firmware()The .serialNumber() property returns a string value.
If .showMessage is True, then a message like the example below will be printed to the screen.
192.168.1.42 --> Serial # 0TFDFCE0050323
Usage Example,
serialNumStr = sensor.serialNumber()The .lidarStatusCodes() property returns a list with 8 integer elements. The returned list has the following definition.
[systemCode, temperatureCode, voltageCode, motorCode, dirtyCode, firmwareCode, ppsCode, deviceCode]
If .showMessage is True, then a message like the example below will be printed to the screen.
System Status: OK
Temperature Status: OK
Voltage Status: OK
Motor Status: OK
Clean Status: OK
Firmware Status: OK
PPS Status: OK, but not detected
Device Status: OK
Usage Example,
statusCodesIntList = sensor.lidarStatusCodes()NOTE: the explanation of each returned integer element can be found directly in section 3.4 of the Livox SDK documentation. Please note that the OpenPyLivox library returns the System Status Code first in the returned integer list, while in the SDK documentation, this code is reported last. Also, a return value of -1 indicates an UNKNOWN status for the respective code.
The .doneCapturing() property returns a boolean value. This property is used to determine if an OpenPyLivox object is currently in the process of capturing point cloud data. It is designed to be used within a loop and therefore called a lot during runtime. As a result, this property never displays a message and therefore is unaffected by the value of .showMessage. The property returns True if the object is not currently capturing data and False if it is currently capturing data.
Usage Example,
while True:
#doing some very important stuff here
if sensor.doneCapturing():
#data capture is complete
break