read
Add-On Required: This feature requires the Lidar Toolbox Support Package for Velodyne LiDAR Sensors add-on.
Syntax
Description
returns a point cloud from the pcloud
= read(lidarobj
)velodynelidar
object
lidarobj
.
If the object is streaming, then this syntax returns the oldest point cloud in the
buffer. Use start
to
begin streaming point cloud data.
If the object is not streaming and there are existing point clouds in the buffer, then this syntax returns the oldest point cloud. If the object is not streaming and there are no existing point clouds in the buffer, then this syntax starts streaming for one point cloud, stops streaming, and returns it.
returns all point clouds from the pcloud
= read(lidarobj
,'all'
)velodynelidar
object
lidarobj
.
If the object is streaming, then this syntax returns all existing point clouds in the buffer at the moment when the function is called. After acquiring them, it deletes them from the buffer, then continues streaming.
If the object is not streaming and there are existing point clouds in the buffer, then this syntax returns all available point clouds and deletes them from the buffer. If the object is not streaming and there are no existing point clouds in the buffer, then this syntax returns an empty array.
returns the number of point clouds specified by pcloud
= read(lidarobj
,numPC
,mode
)numPC
from the
velodynelidar
object lidarobj
. Acquire point clouds
from a specific position in the buffer by setting the mode
to
'oldest'
or 'latest'
. After this syntax acquires
point clouds, it deletes them and any point clouds older than them from the buffer.
If the object is not streaming and there are existing point clouds in the buffer, then this syntax returns data from those point clouds. If the object is not streaming and there are no existing point clouds in the buffer, then this syntax starts streaming for the specified number of point clouds. Then, the function stops streaming and returns those specified point clouds.
The input arguments numPC
and mode
can also be
used individually in this syntax. When they are not specified, the default value for
numPC
is 1 and the default value for mode
is
'oldest'
.
[
returns point clouds and their respective timestamps from the pcloud
,timestamps
] = read(___)velodynelidar
object lidarobj
using any of the available syntaxes listed.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2020b