Main Content

hokuyolidar2d

Stream lidar scans from Hokuyo 2-D lidar sensor

Since R2024a

Description

The hokuyolidar2d object can stream lidar scans from a Hokuyo™ 2-D lidar sensor. Using this object, you can read and preview the incoming lidar scan data.

Creation

Description

hokuyoObj = hokuyolidar2d creates a default hokuyolidar2d object that can stream 2-D lidar scans from the Hokuyo lidar sensor over TCP communication. The object supports only those sensors that are compatible with sensor communication interface protocol (SCIP) 2.x [1].

Note

Before you create a hokuyolidar2d object in MATLAB®, you must close any other software that is using the Hokuyo sensor.

example

hokuyoObj = hokuyolidar2d(Name=Value) sets one or more of these properties using name-value arguments: DeviceAddress, Port, and Timeout. For example, hokuyolidar2d(Timeout=15) sets the time out value to 15 seconds.

Note

This feature requires the Lidar Toolbox™ Support Package for Hokuyo Lidar Sensors. You can install the support package from the Add-On Explorer. For more information, see Download and Install Lidar Toolbox Support Package for Hokuyo Lidar Sensors.

Properties

expand all

This property is read-only.

Device address of the sensor, specified as a string scalar or character vector. To set this property, specify it at object creation.

Data Types: char | string

This property is read-only.

Data port of the sensor, specified as a positive integer. To set this property, specify it at object creation.

Data Types: double

This property is read-only.

Model name of the sensor, stored as a string scalar.

Note

The object supports only those Hokuyo 2-D lidar sensor models that follow the SCIP protocol 2.x.

Data Types: string

This property is read-only.

Serial number of the sensor, stored as a string scalar.

Data Types: string

This property is read-only.

Detection range limits of the sensor, stored as a two-element vector of the form [min max]. Units are in meters.

Data Types: double

This property is read-only.

Azimuth limits of the sensor, stored as a two-element vector of the form [min max]. Units are in degrees.

Data Types: double

This property is read-only.

Angular resolution of the sensor, stored as a positive scalar in degrees.

Data Types: double

This property is read-only.

Valid connection flag, stored as a logical 1 (true) or 0 (false). The flag indicates whether a valid connection is established with the Hokuyo 2-D lidar sensor.

Data Types: logical

This property is read-only.

Firmware version of the sensor, stored as a string scalar.

Data Types: string

This property is read-only.

Version of the SCIP protocol, stored as a string scalar.

Data Types: char

This property is read-only.

Azimuth angle of the front axis of the sensor, stored as a scalar in the range [0, 270]. Units are in degrees.

Data Types: double

This property is read-only.

Standard motor speed of the sensor, stored as a positive scalar in revolutions per minute (rpm).

Data Types: double

This property is read-only.

Maximum time to wait for a response from the sensor, specified as a positive integer in seconds. To set this property, specify it at object creation.

Data Types: double

Object Functions

readRead lidar scans from Hokuyo 2-D lidar sensor
previewPreview live lidar scan data from Hokuyo 2-D lidar sensor
getStatusGet status of Hokuyo 2-D lidar sensor parameter

Examples

collapse all

Create a hokuyolidar2d object, and specify a time out of 20 seconds.

hokuyoObj = hokuyolidar2d(Timeout=20)
hokuyoObj = 

    hokuyolidar2d object with properties:

                   DeviceAddress: "localhost"
                            Port: 19040
                           Model: "UST-10LX"
                    SerialNumber: "H1880720"
                 ScanRangeLimits: [0.0200 30]
                 ScanAngleLimits: [0 270]
             ScanAngleResolution: 0.2500
               IsConnectionValid: 1
                        Firmware: "3.00.0000"
                        Protocol: "SCIP 2.2"
                  FrontAxisAngle: 135
              StandardMotorSpeed: 2400
                         Timeout: 20

References

[1] Kawata, Hirohiko, Satofumi Kamimura, Akihisa Ohya, Jun’ich Iijima, and Shin’ich Yuta. “Advanced Functions of the Scanning Laser Range Sensor for Environment Recognition in Mobile Robots.” In 2006 IEEE International Conference on Multisensor Fusion and Integration for Intelligent Systems, 414–19, 2006. https://doi.org/10.1109/MFI.2006.265678.

Version History

Introduced in R2024a