I have been working on a project that utilizes multiple LiDARs. I specifically require these LiDARs for confirming position and rotation within our custom environments. I have already developed an extension that imports our environment models and uses a CSV file containing initial LiDAR positions, rotations, and configuration types.
The simulation is functioning perfectly, and I can export the updated positions and rotations to an output CSV after adjusting the LiDARs. However, I am encountering an issue due to the overlap of points rendered by multiple LiDARs in a confined space. This overlap makes it difficult to distinguish the points from the LiDARs I am currently adjusting versus those from other LiDARs.
To address this, I am considering adding functionality where the user can select a LiDAR and toggle its visibility in “RtxLidarDebugDrawPointCloudBuffer”.
Below is the code snippet used to attach the LiDAR to render points into the scene:
# Create and attach a render product to the camera
render_product = rep.create.render_product(sensor.GetPath(), [1, 1])
# Create a Replicator Writer that "writes" points into the scene for debug viewing
writer = rep.writers.get("RtxLidarDebugDrawPointCloudBuffer")
writer.attach(render_product)
I have searched forums but did not find relevant information for my specific use case. I did find a command that detaches the writer, but it removes all LiDARs from the scene viewport render:
writer.detach()
Is there any way to achieve toggling of individual LiDARs?
Alternatively, if toggling isn’t possible, is there a way to change the render point colors in the viewport? Different colors for LiDAR points might also solve our visibility issue.
Any assistance would be greatly appreciated.
Regards,