主要内容

flush

Delete point clouds from SICK 3-D lidar object buffer

Since R2026a

    Description

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

    flush(slObj) deletes all available point clouds from the object buffer of the sicklidar object slObj. 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.

    example

    Examples

    collapse all

    Create a sicklidar object. Ensure that you specify the correct IP address for your sensor.

    slObj = sicklidar(IPAddress="192.168.0.112");

    Start streaming point clouds into the object buffer by using the start function.

    start(sickObj)

    While the function continues streaming in the background, wait for 5 seconds. Then, display the number of point clouds available in the buffer.

    pause(5)
    fprintf("Number of point clouds in the object buffer = %d\n",sickObj.NumPointClouds)
    Number of point clouds in the object buffer = 35
    

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

    flush(sickObj)
    fprintf("Number of point clouds in the object buffer = %d\n",sickObj.NumPointClouds)
    Number of point clouds in the object buffer = 0
    

    Use the stop function to stop streaming from the sensor.

    stop(sickObj)

    Input Arguments

    collapse all

    SICK 3-D lidar sensor connection, specified as a sicklidar object.

    Version History

    Introduced in R2026a