HesaiTechnology / Pandar40_SDK

Development kit for Pandar40
BSD 2-Clause "Simplified" License
20 stars 13 forks source link

How to Rotate Pointcloud Axis/Frame/Coordinate #7

Closed Ckerrr closed 6 years ago

Ckerrr commented 6 years ago

For Hesai P40 Lidar, the y axis is aligned with the cable, but I think the cable facing backwards should be best.

May I know how can I rotate the point cloud by 90 degrees when we launch p40p.launch?

I tried:

Configure in web control for the unit: "sync angle", "starting range" and "end range". Both not working. Set the parameter in launch file: "start_angle". Not working. Please help asap. Appreciate it very much!

trickyMan commented 6 years ago

Please modify here: https://github.com/HesaiTechnology/HesaiLidarSDK/blob/master/src/rawdata.cc#L441

Just modify the code : temp = x x = y y = -temp to rotate the point cloud by 90 degrees.

Or you can rotate out of SDK using the same approach.

Ckerrr commented 6 years ago

Thanks a lot.