Hauptinhalt

velodynelidar

Stream point clouds from Velodyne LiDAR sensor

Description

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

The velodynelidar object can stream point cloud data from a Velodyne LiDAR® sensor. Using this object, you can read and preview the incoming point clouds.

Creation

Description

v = velodynelidar(model) creates a velodynelidar object v that can stream point clouds from the Velodyne LiDAR sensor model model.

example

v = velodynelidar(model,Name=Value) specifies additional options with one or more name-value pair arguments. For example, velodynelidar(model,Timeout=15) sets the timeout value to 15 seconds.

example

Input Arguments

expand all

Model name of the Velodyne LiDAR sensor, specified as a character vector or string scalar.

Valid model names are:

Model ValueVelodyne® Model
"HDL64E"HDL-64E sensor
"HDL32E"HDL-32E sensor
"PuckHiRes"VLP-16 Puck Hi-Res sensor
"PuckLITE"VLP-16 Puck LITE sensor
"VLP16"VLP-16 Puck sensor
"VLP32C"VLP-32C Ultra Puck sensor
"VLS128" or "AlphaPuck"VLS-128 Alpha Puck sensor

This argument sets the Model property.

Data Types: char | string

Name-Value Arguments

expand all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: velodynelidar("HDL32E",Timeout=15,Port=2368) creates a velodynelidar object for an "HDL-32E" sensor with a timeout of 15 seconds and data port 2368.

Velodyne LiDAR sensor calibration JSON file, specified as a character vector or string scalar. You must specify the full file path if the calibration file is not in your MATLAB® path.

This argument sets the CalibrationFile property.

Example: v = velodynelidar("HDL32E",CalibrationFile="C:\utilities\velodyneFileReaderConfiguration\HDL32E.xml")

Data Types: char | string

Data port of the Velodyne LiDAR sensor, represented as a positive scalar. The data port for your sensor is listed in the Velodyne sensor web interface Data Port field.

This argument sets the Port property.

Example: velodynelidar(model,Port=3000) sets the data port as 3000.

Data Types: double

Maximum time to wait for a response from the Velodyne LiDAR sensor, specified as a positive scalar in seconds.

This argument sets the Timeout property.

Example: velodynelidar(model,Timeout=15) sets the time out value to 15 seconds.

Data Types: double

Output Arguments

expand all

Object for streaming point clouds from Velodyne LiDAR sensor, returned as a velodynelidar object.

Properties

expand all

This property is read-only after the object creation. To set this property, use the model argument when calling the velodynelidar function.

Model name of the Velodyne LiDAR sensor, represented as a character vector.

Data Types: char

This property is read-only.

IP address of the Velodyne LiDAR sensor, stored as a character vector. This value is set by the incoming UDP packets from the sensor.

Data Types: char

This property is read-only after the object creation. To set this property, use the Port name-value argument when calling the velodynelidar function.

Data port of the Velodyne LiDAR sensor, represented as a positive scalar. The data port for your sensor is listed in the Velodyne sensor web interface Data Port field.

Data Types: double

This property is read-only.

Number of point clouds available for streaming in the buffer, stored as a positive scalar. This value is set by the object buffer.

Data Types: double

Maximum time to wait for a response from the Velodyne LiDAR sensor, specified as a positive scalar in seconds.

Data Types: double

This property is read-only.

Sensor streaming status, represented as a logical 0(false) or 1(true). The value is 1 if the object receives streaming data from the sensor. Otherwise the value is 0. You can use the start and stop functions to control data streaming.

Data Types: logical

Velodyne LiDAR sensor calibration JSON file, specified as a character vector. You must specify the full file path if the calibration file is not in your MATLAB path.

Data Types: char

Object Functions

startStart streaming point clouds from Velodyne LiDAR sensor
stopStop streaming point clouds from Velodyne LiDAR sensor
previewPreview of live point cloud data from Velodyne LiDAR sensor
closePreviewClose preview of live point cloud data from Velodyne LiDAR sensor
readAcquire point clouds from velodynelidar object buffer
flushDelete point clouds in velodynelidar object buffer

Examples

collapse all

When you create the object, you must indicate your hardware model by using the model argument in the object constructor function.

Create a velodynelidar object, v, for use with a model HDL-32E sensor.

v = velodynelidar("HDL32E")
v = 

    velodynelidar object with properties:

                   Model: 'HDL32E'
               IPAddress: '192.168.1.001'
                    Port: 2368
 NumPointCloudsAvailable: 0
                 Timeout: 10
               Streaming: 0
         CalibrationFile: 'matlab\...\utilities\velodyneFileReaderConfiguration\HDL32E.xml'

The output shows the object properties. For more information about the properties, see Create a velodynelidar Object and Use Object Properties.

You can also assign other properties to the object by using name-value pairs.

Create a velodynelidar object, v, and increase the timeout to 20 seconds.

v = velodynelidar("HDL32E",Timeout=20)
v = 

    velodynelidar object with properties:

                   Model: 'HDL32E'
               IPAddress: '192.168.1.001'
                    Port: 2368
 NumPointCloudsAvailable: 0
                 Timeout: 20
               Streaming: 0
         CalibrationFile: 'matlab\...\utilities\velodyneFileReaderConfiguration\HDL32E.xml'

In the output, you notice that the timeout is now set to 20.

Version History

Introduced in R2020b

expand all