Main Content

flush

Delete point clouds from ousterlidar object buffer

Since R2022a

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

    Description

    example

    flush(ousterObj) deletes all available point clouds in the object buffer of the ousterlidar object ousterObj. If the object is streaming when you use this function, the function deletes all existing point clouds in the buffer and the continues streaming point clouds from the sensor.

    Examples

    collapse all

    Create an ousterlidar object, ousterObj, for OS0-64 sensor model. Specify the file path to the corresponding calibration file.

    ousterObj = ousterlidar("OS0-64","OS0-64G_sample.json");

    Start streaming point clouds into the object buffer by using the start function. The function continues streaming in the background.

    start(ousterObj)

    Display the number of point clouds currently available in the buffer.

    ousterObj.NumPointCloudsAvailable
    ans =
    
        40

    Delete the point clouds that are currently in the buffer and display the number of point clouds available.

    There are no point clouds in the buffer immediately after you flush them, but because the object continues streaming, after you delete the existing point clouds, the number of point clouds increases again.

    flush(ousterObj)
    ousterObj.NumPointCloudsAvailable
    ans =
    
        0

    Use the stop function to stop streaming from the sensor.

    stop(ousterObj)

    Input Arguments

    collapse all

    Ouster lidar sensor connection, specified as an ousterlidar object.

    Version History

    Introduced in R2022a