This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

velodynelidar

Create velodynelidar object to acquire point clouds from Velodyne LiDAR sensor

Syntax

v = velodynelidar('model')
v = velodynelidar('model',Name,Value)

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
'HDL32E'HDL-32E sensor
'VLP32C'VLP-32C Ultra Puck sensor
'VLP16'VLP-16 Puck sensor
'PuckLITE'VLP-16 Puck Lite sensor
'PuckHiRes'VLP-16 Puck Hi-Res sensor

Example: v = velodynelidar('HDL32E')

Data Types: char | string

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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

Introduced in R2019a