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

Lidar point cloud coordinate #12

Open
ruiiu opened this issue Apr 3, 2024 · 1 comment
Open

Lidar point cloud coordinate #12

ruiiu opened this issue Apr 3, 2024 · 1 comment

Comments

@ruiiu
Copy link

ruiiu commented Apr 3, 2024

Thanks for sharing the code. I have a question:

I am using open3d to visualize the lidar data. If doing the following transform of the lidar point cloud in point_transformer_loader.py, the point cloud data looks different from the generated video 0_0_hud_info.mp4 in the bird eye view that the car is driving,

lidar[:,2] = -lidar[:,2]
def pc_to_car_alignment(_pc):
        # Car alignment is a weird coordinate, upside down
        # Rest assured this is the right matrix, double checked
        alignment = np.array([[0, 1, 0],
                                [-1, 0, 0],
                                [0, 0, -1]])
        return np.matmul(_pc, alignment)
lidar = Utils.pc_to_car_alignment(lidar)

if i only do lidar[:,1] = -lidar[:,1], but not do pc_to_car_alignment, the view looks consistent as in the hud_info video.

@cuijiaxun
Copy link
Collaborator

It is because pygame coordinate is different from world coordinate (x,y are swapped), while the pc_to_car_alignment is doing 1. swap x, y 2. make the lidar upside down. Let me know if it causes any issues running the experiments - I know it is lame, so I am fixing it in the new version of the project.

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

2 participants