Skip to content

RisleyPrismCsv simulation #26

Description

@AitorIglesias

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions