BeamNG / BeamNGpy

Python API for BeamNG.tech
https://beamng.tech
MIT License
258 stars 47 forks source link

False LiDAR Data #211

Open CAS-LRJ opened 1 year ago

CAS-LRJ commented 1 year ago

The LiDAR receives false data in front of a tunnel when the ego vehicle was driving in the Italy map. Level: Italy Position: (1535.8941650390625, 793.4702758789062, 149.81668090820312)

In-Game LiDAR Visualization image

Recevied LiDAR Visualization (Blender) image

dstark481 commented 1 year ago

What is plotted in the Blender plot? I am not sure what you are comparing here.

CAS-LRJ commented 1 year ago

What is plotted in the Blender plot? I am not sure what you are comparing here.

I use a python script to export the readings to a .obj file

readings_data = lidar.poll()
data1 = readings_data['pointCloud'].reshape(-1, 3)
# Remove Null Data like (0,0,0)
data1_ind = np.linalg.norm(data1, axis=1) > 0.
data1 = data1[data1_ind]

# Move the coordinates
data2 = np.array(lidar.get_position())
pc_obj = data1 - data2

with open('example.obj', 'w') as f:
    for point in pc_obj:
        f.write('v '+str(point[0])+' '+str(point[1])+' '+str(point[2])+'\n')

Then I visualize the obj file in Blender, and I found that there exist some abnormal points (in white circle). These floating points shoud not be here since there is no obstacles in front of the lidar. image

dstark481 commented 1 year ago

Okay. We will take a look.