MATLAB Answers

Unable to continually visualize 3D point cloud from LiDAR using ROS Read Point Cloud block

6 views (last 30 days)
I am connecting a VLP16 LiDAR with Matlab through ROS. The LiDAR is a node in the network, and the lidar data is obtained in MATLAB by subscribing to that node.  
I'm using a Simulink model with the Subscribe and Read Point Cloud blocks. The data from the RPC block is sent to a MATLAB function block where I'm visualizing the data using the "reshape" and "plot3" commands.Unfortunately, I seem to be able to only visualize the LiDAR sensor data in ROS in real time as segments instead of the entire cloud. Therefore, I have the following questions:
- Is this an appropriate way to interface LiDAR with MATLAB using ROS? 
- If so, is it expected for the data to be cut off and restricted to 2D as I currently observe?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 2 Sep 2021 at 4:00
Edited: MathWorks Support Team alrededor de 7 horas ago
You seem to be approaching the problem correctly. With respect to cutoff of data, modifying the array size will allow you to visualize the entire cloud :
By default all variable size data has a set limit, which can be modified by the dialog mentioned in the above link. Providing the correct size for the lidar data will allow all the data will be output from the ReadPointCloud block.

More Answers (1)

Ankur  Bhargava
Ankur Bhargava on 20 Jul 2021
I Have to control AGV using Lidar sensor using Matlab Simulink and ROS. Please suggest the Lidar sensor.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by