tomas789 / kitti2bag

Convert KITTI dataset to ROS bag file the easy way!
MIT License
720 stars 261 forks source link

Extracting layer ID from x,y and z coordinates #27

Open Ghallabi opened 5 years ago

Ghallabi commented 5 years ago

Hi,

I am working with Kitti dataset and I want to add a "ring id" label to each point . Instead of having XYZI points, I am wondering if we can have XYZRI points ?

versatran01 commented 5 years ago

When you say "ring id", does that mean which beam each point belongs to? For example, if one is using VLP64, then there would be 64 different ring ids?

Ghallabi commented 5 years ago

Yes, exactly. Is this label already available ? Best,

versatran01 commented 5 years ago

I don't know, but I was trying to do the same thing but looks like it is not possible just from the data.

versatran01 commented 5 years ago

One could possibly calculate the altitude of each point and then assign a corresponding ring id?

aidanjones3 commented 5 years ago

I also am interested in determining a solution to this problem. I had two thoughts on the matter: The first being if the kitti datasets somehow have the points ordered already? This may provide some structure to take advantage of. The other would be to look at the timestamp of the points in spherical coordinates per frame. Not entirely sure if this would work but just my thoughts.

geoeo commented 5 years ago

Formulae is given in https://github.com/tomas789/kitti2bag/issues/49 But it doesnt seem to work. I would love to hear if it works for you

aidanjones3 commented 5 years ago

Will attempt, and update you with results.

versatran01 commented 5 years ago

One (fixable) problem is you won't get clean data. I think kitti paper says that they undistorted the point cloud so when you convert them from euclidean to polar coordinates, it will be noisy.

geoeo commented 5 years ago

Where do they say that? In the dataset paper? Also, does that mean the synced data part should work?

versatran01 commented 5 years ago

Yeah I think in the paper. So raw data should work, not synced because that's where they corrected the lidar data.

geoeo commented 5 years ago

Thanks for the help. I checked with both and both provide angles which are outside the range of 2-24.8. I looked at the manual again for the HDL 64 E and it states it comes with a calibration.xml. :( Im not really sure how researchers used the kitti velodyne data to provide accurate reconstruction if this is missing

versatran01 commented 5 years ago

Then it's a problem with kitti.

matigolias commented 2 years ago

Check VincentCheungM/Run_based_segmentation#3 for finding the ring in a non-angle based approach

mr-abramenko commented 1 year ago

Check https://github.com/Taeyoung96/kitti2bag/commit/a77c6dffe28fc110dca8f7be6167b5b43cfedbff for finding the ring in a angle based approach