主要内容

read

Read lidar scans from SICK 2-D lidar sensor

Since R2026a

    Description

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

    scan = read(slObj) reads the latest 2-D lidar scan from the sicklidar2d object slObj.

    example

    [scan,intensities] = read(slObj) returns received signal strength indicator (RSSI) values corresponding to each data point.

    Examples

    collapse all

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

    slObj = sicklidar2d(IPAddress="172.18.252.146");

    Read the latest 2-D lidar scan by using the read function of the sicklidar2d object.

    scan = read(slObj);

    Plot all the points of the lidar scan.

    plot(scan)

    Input Arguments

    collapse all

    SICK 2-D lidar sensor connection, specified as a sicklidar2d object.

    Output Arguments

    collapse all

    Lidar scan data read from the SICK 2-D lidar sensor, returned as a lidarScan object or vector of lidarScan objects.

    • When the sensor returns a single echo per scan, the function returns a single lidarScan object.

    • When the sensor returns multiple echoes E per scan, the function returns an E-element vector of lidarScan objects.

    Intensity values of the lidar scan data read from the SICK 2-D lidar sensor, returned as a vector or array.

    • When the sensor returns a single echo per scan, the function returns an N-by-1 vector of intensity values. N is the number of points per scan.

    • When the sensor returns multiple echoes E per scan, the function returns an N-by-E array of intensity values. N is the number of points per scan.

    Data Types: double

    Version History

    Introduced in R2026a