Main Content

ousterlidar

Stream point clouds from Ouster lidar sensor

Since R2022a

    Add-On Required: This feature requires the Lidar Toolbox Support Package for Ouster Lidar Sensors add-on.

    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

    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.

    example

    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-32"OS0-32 sensor
    "OS1-32"OS1-32 sensor
    "OS2-32"OS2-32 sensor
    "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

    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

    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.

    Return modes of the point cloud data, stored as {'strongest'}, {'secondStrongest'}, or {'strongest','secondStrongest'}.

    This property is read-only.

    Firmware version of the Ouster sensor, stored as a character vector. For more information on supported firmware versions, see Release-by-Release Version Support.

    This property is read-only.

    Lidar data packet format, stored as one of these values.

    • 'LEGACY' — Legacy data packet format

    • 'RNG19_RFL8_SIG16_NIR16' — Single return profile that is similar to the channel data block present in the LEGACY format.

    • 'RNG19_RFL8_SIG16_NIR16_DUAL'— Dual return profile that enables the sensor to output strongest and second-strongest returns.

    • 'RNG15_RFL8_NIR8' — Low data rate profile, where the data rate and data packet size are smaller compared to other formats.

    For more information on the data profiles, see the Sensor Data section in the Ouster Firmware User Manual.

    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'
                CalibrationFile: 'C:\ouster\OS0-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 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'
                CalibrationFile: 'C:\ouster\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'

    Tips

    Release-by-Release Version Support

    ReleaseSupported Firmware Versions
    R2022a

    Support added for:

    • 2.0

    • 2.1

    R2023b

    Support added for:

    • 2.2

    • 2.3

    • 2.4

    R2024a

    Support added for:

    • 2.5

    • 3.0

    Version History

    Introduced in R2022a

    expand all