HViktorTsoi / rs_to_velodyne

A ros tool for converting Robosense pointcloud to Velodyne pointcloud format.
189 stars 58 forks source link

Ruby ring mapping #6

Open 0xd1ma opened 2 years ago

0xd1ma commented 2 years ago

Hi,

I have a question regarding ring mapping functional. Why use this https://github.com/HViktorTsoi/rs_to_velodyne/blob/0a4b344398064770a17ccc153b92d5dbc5b40480/src/rs_to_velodyne.cpp#L12

instead according to datasheet table https://www.generationrobots.com/media/robosense/RS-Ruby-Users-Guide-v1.0-EN.pdf page 20: 8.2 Laser Channel in spatial Distribution

static int RING_ID_MAP_RUBY[] = { 35, 18, 49, 0, 99, 82, 113, 64, 39, 22, 53, 4, 103, 86, 117, 68, 43, 26, 57, 8, 107, 90, 121, 72, 47, 30, 61, 12, 111, 94, 125, 76, 51, 2, 33, 16, 115, 66, 97, 80, 55, 6, 37, 20, 119, 70, 101, 84, 59, 10, 41, 24, 123, 74, 105, 88, 63, 14, 45, 28, 127, 78, 109, 92, 19, 50, 1, 32, 83, 114, 65, 96, 23, 54, 5, 36, 87, 118, 69, 100, 27, 58, 9, 40, 91, 122, 73, 104, 31, 62, 13, 44, 95, 126, 77, 108, 3, 34, 17, 48, 67, 98, 81, 112, 7, 38, 21, 52, 71, 102, 85, 116, 11, 42, 25, 56, 75, 106, 89, 120, 15, 46, 29, 60, 79, 110, 93, 124 };

HViktorTsoi commented 2 years ago

Hi,

I have a question regarding ring mapping functional. Why use this

https://github.com/HViktorTsoi/rs_to_velodyne/blob/0a4b344398064770a17ccc153b92d5dbc5b40480/src/rs_to_velodyne.cpp#L12

instead according to datasheet table https://www.generationrobots.com/media/robosense/RS-Ruby-Users-Guide-v1.0-EN.pdf page 20: 8.2 Laser Channel in spatial Distribution

static int RING_ID_MAP_RUBY[] = { 35, 18, 49, 0, 99, 82, 113, 64, 39, 22, 53, 4, 103, 86, 117, 68, 43, 26, 57, 8, 107, 90, 121, 72, 47, 30, 61, 12, 111, 94, 125, 76, 51, 2, 33, 16, 115, 66, 97, 80, 55, 6, 37, 20, 119, 70, 101, 84, 59, 10, 41, 24, 123, 74, 105, 88, 63, 14, 45, 28, 127, 78, 109, 92, 19, 50, 1, 32, 83, 114, 65, 96, 23, 54, 5, 36, 87, 118, 69, 100, 27, 58, 9, 40, 91, 122, 73, 104, 31, 62, 13, 44, 95, 126, 77, 108, 3, 34, 17, 48, 67, 98, 81, 112, 7, 38, 21, 52, 71, 102, 85, 116, 11, 42, 25, 56, 75, 106, 89, 120, 15, 46, 29, 60, 79, 110, 93, 124 };

Hi, it's just legacy code, the ring-map is provided by robosense official documentation, because the rings of RUBY(maybe also other LiDAR types) is not ordered from top to bottom. For recent robosense LiDARs, just config the driver to publish XYZIRT pointcloud, and then use this tool.