MATLAB: RP lidar data plotting

displaylidarplotting

I'm currently working on a project where I want to plot a 3d diagram (sort of like terrain mapping) with the data obtain by Rp lidar.
I am able to get x,y,z axis in .csv format but I am not sure how I can display these values accurately so that it represents a terrain map.
I have tried scatter2, mesh and pcshow but those graphs have not been accurate and just shows me noise.
Any help will be highly apperciated.
Thank you.
K.

Best Answer

Hi,
The problem is not in the plotting/visualisation part. We advise implementing the equations first to get proper values and then look into the visualisation part. If the values are recorded correct, then pcshow will be enough to visualise the plot.
My advice to get the desired values will be first to understand how a Lidar works and then try to record the Lidar range and theta (given by the lidar sensor) along with the time step. Then rotate the Lidar using the stepper along Y-axis( you should not need the Z stepper as the entire 3D area will be swept) and also record the angles(phi) along with the timestamp. Then you can try to sync both the set of readings(range and theta from RPLidar and phi from the stepper) with the help of the timestamp.
Then you can use sph2cart(theta will be the azimuth and phi will be elevation) to get the xyz values for each Lidar reading, after that use the PointCloud to store them as a point cloud. The use the pcshow function to get the desired Visualisation.
Related Question