Main Content

ousterlidar

Stream point clouds from Ouster lidar sensor

Since R2022a

    Description

    The ousterlidar object can stream point cloud data from an Ouster® lidar sensor. Using this object, you can read and preview the incoming point clouds.

    Creation

    Description

    example

    ousterObj = ousterlidar(model,calibrationFile) creates an ousterlidar object, ousterObj, that can stream point cloud data from the specified Ouster lidar sensor model model.

    example

    ousterObj = ousterlidar(model,calibrationFile,Name=Value) specifies options using one or more name-value arguments. For example, ousterlidar(model,calibrationFile,Port=7503) specifies the data port of the Ouster lidar sensor as 7503.

    Properties

    expand all

    This property is read-only.

    Model name of the Ouster sensor, specified as a character vector or string. You must set this property at object creation by using the input argument model.

    Valid model names are:

    Model ValueOuster Model
    "OS0-64"OS0-64 sensor
    "OS1-64"OS1-64 sensor
    "OS2-64"OS2-64 sensor
    "OS0-128"OS0-128 sensor
    "OS1-128"OS1-128 sensor
    "OS2-128"OS2-128 sensor

    Data Types: char | string

    This property is read-only.

    IP address of the Ouster lidar sensor, stored as a character vector. This value is set by the incoming UDP packets from the sensor.

    Data Types: char

    This property is read-only.

    Data port of the Ouster lidar sensor, specified as a positive scalar. The data port for your sensor is listed in the Ouster sensor web interface Data Port field.

    To set this property, you must specify it as a name-value argument at object creation. For example, ousterlidar(model,calibrationFile,Port=7503) sets the data port as 7503.

    Data Types: double

    This property is read-only.

    Number of point clouds available for streaming in the buffer, stored as a positive scalar. This value is set by the object buffer.

    Data Types: double

    Maximum time to wait for a response from the Ouster lidar sensor, specified as a positive scalar in seconds.

    Example: ousterlidar(model,calibrationFile,Timeout=15) sets the time out value to 15 seconds.

    Data Types: double

    This property is read-only.

    Sensor streams data, stored as a logical 0(false) or 1(true). The value is 1 if the object receives streaming data from the sensor. You can use the start and stop functions to control data streaming.

    Data Types: logical

    This property is read-only.

    Ouster lidar sensor calibration JSON file, specified as a character vector or string. You must set this property at object creation by using the input argument calibrationFile. You must specify the full file path if the calibration file is not in your MATLAB path.

    Data Types: char | string

    Object Functions

    previewPreview live point cloud data from Ouster lidar sensor
    closePreviewClose preview of live point cloud data from Ouster lidar sensor
    startStart streaming point clouds from Ouster lidar sensor
    flushDelete point clouds from ousterlidar object buffer
    readRead point clouds from ousterlidar object buffer
    stopStop streaming point clouds from Ouster lidar sensor

    Examples

    collapse all

    Specify the model name of an Ouster lidar sensor and the file path of the corresponding calibration file to create an ousterlidar object, obj. The output shows the object properties.

    obj = ousterlidar("OS0-64","C:\ouster\OS0-64G_sample.json")
    obj = 
      ousterlidar with properties:
    
                          Model: 'OS0-64'
                      IPAddress: '127.0.0.1'
                           Port: 7502
        NumPointCloudsAvailable: 0
                        Timeout: 10
                      Streaming: 0
                CalibrationFile: 'C:\ouster\OS0-64G_sample.json'

    Create an ousterlidar object, obj, for the OS0-64 sensor model. Specify the port number and the time out value. The output shows the object properties with the specified port number, 7506, and time out value, 15 seconds.

    obj = ousterlidar("OS0-64","OS0-64G_sample.json", ...
                Port=7506,Timeout=15)
    obj = 
      ousterlidar with properties:
    
                          Model: 'OS0-64'
                      IPAddress: '127.0.0.1'
                           Port: 7506
        NumPointCloudsAvailable: 0
                        Timeout: 15
                      Streaming: 0
                CalibrationFile: 'OS0-64G_sample.json'

    Version History

    Introduced in R2022a

    expand all