RP lidar data plotting
25 views (last 30 days)
Show older comments
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.
7 Comments
Amrtanshu Raj
on 6 Oct 2020
Can you share the document or link you used to model these equation. As you are multiplying with sin(pi) which is 0 to get the y values. I do not think it is the correct way to do it.
Also can you tell what do the Distance X. Distance Y, Distance Z, Angle X, Angle Y, Angle Z mean in the csv file.
Ideally when a lidar is recording data it should record the range value at a instant and the corresponding Y and Z angles.
Accepted Answer
Amrtanshu Raj
on 6 Oct 2020
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.
More Answers (0)
See Also
Categories
Find more on Labeling, Segmentation, and Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!