Main Content

flush

Delete point clouds in velodynelidar object buffer

Since R2020b

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

Description

example

flush(lidarobj) deletes all available point clouds in the object buffer. The state of streaming is maintained. That is, if the object was streaming before flush was called, the function deletes the existing point clouds and streaming continues.

Examples

collapse all

You can delete point cloud data stored in the buffer at any time.

Create a velodynelidar object for an HDL-32E sensor. Then start streaming point clouds. Once the start function is called, streaming continues in the background.

v = velodynelidar('HDL32E');
start(v)

View the number of point clouds currently in the buffer. This value increases while point clouds are streaming.

v.NumPointCloudsAvailable
ans =

    40

Delete the point clouds that are currently in the buffer. Then view the number of point clouds in the buffer.

flush(v)
v.NumPointCloudsAvailable
ans =

    0

There will be 0 point clouds in the buffer immediately after you delete them all. But because the object is currently in streaming mode, it continues streaming after you delete the existing point clouds and this value increases again.

Stop streaming when you are finished.

stop(v)

Input Arguments

collapse all

Velodyne LiDAR sensor connection created by using velodynelidar, specified as a velodynelidar object.

Version History

Introduced in R2020b