Main Content

read

Return target detections using ultrasonic sensor

Since R2024b

    Description

    [hasObject,point] = read(ultrasonicSensor) returns target detections from range measurements taken by the ultrasonic sensor specified by ultrasonicSensor in the 3D environment.

    Input Arguments

    collapse all

    Virtual ultrasonic sensor that detects target in the 3D environment, specified as a sim3d.sensors.UltrasonicSensor object.

    Example: ultrasonicSensor = sim3d.sensors.UltrasonicSensor

    Output Arguments

    collapse all

    Detectable object present in the sensor field-of-view, returned as a Boolean scalar. An object is considered detectable if its closest distance to the sensor is greater than the minimum detection-only range specified in the Range argument.

    Distance to the closest object in (x,y,z), returned as a real 1-by-3 vector, in meters.

    Version History

    Introduced in R2024b