Main Content

velodynelidar

Create velodynelidar object to acquire point clouds from Velodyne LiDAR sensor

Since R2020b

Description

example

v = velodynelidar('model') creates an object v that can read point clouds from the Velodyne LiDAR® sensor of the indicated model.

v = velodynelidar('model',Name,Value)specifies additional options with one or more name-value pair arguments. For example, you can specify a timeout value. There are three properties that you can set by using the name-value pair arguments: CalibrationFile, Port, and Timeout.

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 see that the timeout is now set to 20.

Input Arguments

collapse all

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

Possible values for model include the values listed in this table.

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

Example: v = velodynelidar('HDL32E')

Data Types: char | string

Name-Value Arguments

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.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: v = velodynelidar('HDL32E','Port',3000)

Data port of the Velodyne LiDAR sensor, specified as the comma-separated pair consisting of 'Port' and a positive value of type double. The data port for your sensor is listed in the Velodyne Web Interface Data Port field. The default is 2368.

Example: v = velodynelidar('HDL32E','Port',3000)

Data Types: double

Maximum time in seconds to wait for a response from the Velodyne LiDAR sensor, specified as the comma-separated pair consisting of 'Timeout' and a positive value of type double. The timeout is for waiting for point clouds when you use the read command. The default is 10. You can change the value either during object creation or after you create the object.

Example: v = velodynelidar('HDL32E','Timeout',20)

Data Types: double

Name of XML file containing Velodyne LiDAR laser calibration data, specified as the comma-separated pair consisting of 'CalibrationFile' and a character vector or string. It must include the full path to the file as well, as shown in the example. If you do not specify a calibration file, a default calibration file with data obtained from Velodyne device manuals is chosen.

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

Data Types: char | string

Version History

Introduced in R2020b