Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RisleyPrismCsv simulation #26

Open
AitorIglesias opened this issue Aug 21, 2024 · 0 comments
Open

RisleyPrismCsv simulation #26

AitorIglesias opened this issue Aug 21, 2024 · 0 comments

Comments

@AitorIglesias
Copy link

I'm trying to simulate Livox lidars outside of CARLA, and I thought about using the RisleyPrismCsv files for this purpose. However, I'm having trouble understanding the meaning of each parameter in the rows of these files. Initially, I assumed the first two parameters represented the elevation angle and the azimuth angle, respectively. But when I projected the beams onto a plane, I ended up with a circular pattern rather than the characteristic pattern of Livox lidars. I suspect the last parameter might be the index of the beam, but I'm unsure of the role of the third parameter.

Could someone clarify the purpose of each parameter in the RisleyPrismCsv file and provide guidance on how to correctly interpret and use these values for simulating Livox lidars?

import numpy as np
import matplotlib.pyplot as plt

livox_paramas = np.genfromtxt('tele.csv', delimiter=',', encoding='utf-8-sig')
plane_distance = 80.0

projected_points = []

range = slice(None, 510)

x_coords = plane_distance * np.cos(livox_paramas[range,0]) * np.cos(livox_paramas[range,1])
y_coords = plane_distance * np.cos(livox_paramas[range,0]) * np.sin(livox_paramas[range,1])

plt.figure(figsize=(16, 12))
plt.scatter(x_coords, y_coords, c='blue', marker='o')
plt.title('Projection of laser beams on the plane at 80 meters')
plt.xlabel('X (meters)')
plt.ylabel('Y (meters)')
plt.grid(True)
plt.axis('equal')
plt.show()

tele

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant