valgur / velodyne_decoder

Fully-featured C++/Python Velodyne packet decoder
BSD 3-Clause "New" or "Revised" License
39 stars 12 forks source link

Message decode issue with VLP16 #16

Open XinyuC opened 2 weeks ago

XinyuC commented 2 weeks ago

We are using the velodyne_decoder to decode the velodyne_packets topic obtained from the VLP16 Lidar. Previously, I was using version 2.3.0 or 2.0.0, and for each scan, I would usually get an array of N-by-6. Today I installed the latest 3.0.0 version, and although I still get an N-by-8 array, I found that each row contains the same values, which seems to indicate an error after the update. For the same bag file, version 2.3.0 gives me the correct results. However, it is obvious that version 3.0.0 is easier to use, and I hope this error can be fixed.

valgur commented 2 weeks ago

Interesting. I have used version 3.0.0 without issues so far. I would like to investigate this. Would it be possible for you to share a small slice of data? A couple of scans should be sufficient.

XinyuC commented 2 weeks ago

Sure, I am willing to share some data with you. Unfortunately, the bag files I have right now are too big to use. I am going to collect some small data and share with you today afternoon. The image shown below is the output points generated with 3.0.0 image

XinyuC commented 1 week ago

Hi Martin, the attached bag file contains the /velodyne_packets topic, I think it can be used for testing. I forgot to mention earlier when I used the 3.0.0, I was set model=vd.Model.VLP16, it showed that the model was incorrect, then I changed to vd.Model.PuckHiRes to fix the error. I am not sure whether this setting results in identical data points in one scan. Please let me know if you need more data, thank you.

test_bag.zip

valgur commented 1 week ago

Thanks! The bag you shared contains already decoded point clouds as sensor_msgs/PointCloud2, though. Would it be possible to share the actual data you are feeding into velodyne_decoder? Also, can you please share a snippet of the code you are using for decoding? I assume you are using vd.read_bag(<bag>)? I would recommend leaving the model config parameter unset in v3. Filling it has basically no benefit unless you are using HDL-64, where that info is not available from the data.

XinyuC commented 1 week ago

Hi Martin, I am sorry I didn't realize the previous bag file doesn't contain the raw Velodyne data packets (velodyne_msgs/VelodyneScan). I have attached another bag file that contains velodyne_packets topic and the scripts we used to parse the bag file. The bag file may contain other topics from different sensors. Please let me know if you have any questions or concerns. Bag file and parse function.zip