Reputation: 1
So i have LIDAR data that is being collected from two separate LIDARs, one is making a horizontal sweep (second one), while other is maping the view from above (first one), essentially one is making the view in Y while the other is in Z.
I have and can visualize a map of points from both lidars, separately, now i want to combine both data to make one map. The way the lateral sweep is made, is with the sensor at an angle, then i make some trigonometry that gives me the y and z for the lateral points. The first sensor (that make the top view) basically only has a Z component, as the x and y are both the reference.
Lateral sweep - data from second sensor (y)
Data from top view - first sensor (z)
The sensor gets the data, and then it's placed on the points map like this:
points_map.apped([(x),(y),(max_height - data[0])])
(...)
x_values = [point[0] for point in points_map]
y_values = [point[1] for point in points_map]
z_values = [point[2] for point in points_map]
#and for the second sensor
x_values2 = [point[0] for point in points_map2]
y_values2 = [point[1] for point in points_map2]
z_values2 = [point[2] for point in points_map2]
This is basically the starting point i think, then i'm trying to plot like this:
fig = plt.figure(figsize=(10, 6))
ax = fig.add_subplot(111, projection='3d')
ax.scatter(x_values, y_values, z_values, c=z_values, cmap='viridis', s=100)
for i, point in enumerate(points_map):
ax.text(point[0], point[1], point[2], f"{point[3]}", ha='center', va='center', fontsize=8, color='black')
ax.set_xlabel('X Coordinate')
ax.set_ylabel('Y Coordinate')
ax.set_zlabel('Distance')
ax.set_title('3D Map of Values')
If i just use y_values2, the graphic goes all wrong.
I'll be happy to provide any more information or code. Thank you.
TL;DR I'm trying to make the graphs overlap or have some sort of relation to one another, combining both perspectives. I tried changing the input for ax.scatter, but i can't figure out how to combine the z and y coordinates from the lateral sweep sensor, and then how to mix them to make the plot.
Upvotes: 0
Views: 34