Create an ousterlidar
Object and Use Object Properties
You can stream point cloud data from an Ouster® lidar sensor by using an ousterlidar
object. After creating the object, you can preview and read
point clouds from the supported sensors by using the preview
and read
object functions, respectively.
Create ousterlidar
Object
To create an ousterlidar
object, you must specify the model name and the path to
a corresponding calibration file for one of these Ouster lidar sensors.
Supported Ouster lidar sensor models:
Ouster Model | Value |
---|---|
OS0-32 sensor | "OS0-32" |
OS1-32 sensor | "OS1-32" |
OS2-32 sensor | "OS2-32" |
OS0-64 sensor | "OS0-64" |
OS1-64 sensor | "OS1-64" |
OS2-64 sensor | "OS2-64" |
OS0-128 sensor | "OS0-128" |
OS1-128 sensor | "OS1-128" |
OS2-128 sensor | "OS2-128" |
Create an ousterlidar
object for the OS1-64 sensor
model.
obj = ousterlidar("OS1-64","OS1-64G_sample.json")
obj = ousterlidar with properties: Model: 'OS1-64' CalibrationFile: 'OS1-64G_sample.json' IPAddress: '127.0.0.1' Port: 7502 NumPointCloudsAvailable: 0 Timeout: 10 Streaming: 0 ReturnMode: {'strongest'} FirmwareVersion: 'v2.1.1' LidarUDPProfile: 'LEGACY'
Create Object by Specifying Object Properties
You can specify ousterlidar
object properties, such as the data
port and time out value for the sensor, when creating the object.
You can set these properties at object creation.
Property | Value |
---|---|
Port | UDP data port of the sensor. For more information on the sensor data ports, see the software user manual in the Downloads section on the Ouster website. Default:
|
Timeout | Maximum time, in seconds, to wait for a response from the Ouster lidar sensor. Default:
|
Create an ousterlidar
object for the OS0-64 sensor model, and specify the data
port and time out value for the sensor.
obj = ousterlidar("OS0-64","OS0-64G_sample.json", ... Port=7506,Timeout=15)
obj = ousterlidar with properties: Model: 'OS0-64' CalibrationFile: 'OS0-64G_sample.json' IPAddress: '127.0.0.1' Port: 7506 NumPointCloudsAvailable: 0 Timeout: 15 Streaming: 0 ReturnMode: {'strongest'} FirmwareVersion: 'v2.1.1' LidarUDPProfile: 'LEGACY'
Use Properties After Object Creation
Most ousterlidar
object properties are read-only after object
creation, but you can change the value of the Timeout
property
directly at any time.
Change the time out value of the ousterlidar
object
obj
. View the object properties to verify the change in
value.
obj.Timeout = 20; obj
obj = ousterlidar with properties: Model: 'OS0-64' CalibrationFile: 'OS0-64G_sample.json' IPAddress: '127.0.0.1' Port: 7506 NumPointCloudsAvailable: 0 Timeout: 20 Streaming: 0 ReturnMode: {'strongest'} FirmwareVersion: 'v2.1.1' LidarUDPProfile: 'LEGACY'
While you cannot set the NumPointCloudsAvailable
and
Streaming
property values directly, both are affected by
ousterlidar
object functions, such as start
and stop
.
Note that the current NumPointCloudsAvailable
and
Streaming
values of obj
are both
0
. Start streaming into the object buffer, and then check the
value of the Streaming
property.
start(obj) obj.Streaming
ans = 1
Stop streaming data. Display the number of point clouds available in the object buffer.
stop(obj) n = obj.NumPointCloudsAvailable
n = 491
You cannot change the other properties of an ousterlidar
object
after creation, but you can view them at any time. Display the
Model
value of obj
.
obj.Model
ans = 'OS0-64'
See Also
ousterlidar
| preview
| start
| read