{"action":"created","issue":{"url":"https://api.github.com/repos/RobustFieldAutonomyLab/LeGO-LOAM/issues/38","repository_url":"https://api.github.com/repos/RobustFieldAutonomyLab/LeGO-LOAM","labels_url":"https://api.github.com/repos/RobustFieldAutonomyLab/LeGO-LOAM/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/RobustFieldAutonomyLab/LeGO-LOAM/issues/38/comments","events_url":"https://api.github.com/repos/RobustFieldAutonomyLab/LeGO-LOAM/issues/38/events","html_url":"https://github.com/RobustFieldAutonomyLab/LeGO-LOAM/issues/38","id":377462522,"node_id":"MDU6SXNzdWUzNzc0NjI1MjI=","number":38,"title":"Adapt projecting pointcloud for different LIDAR sensor?","user":{"login":"tuandle","id":18464308,"node_id":"MDQ6VXNlcjE4NDY0MzA4","avatar_url":"https://avatars0.githubusercontent.com/u/18464308?v=4","gravatar_id":"","url":"https://api.github.com/users/tuandle","html_url":"https://github.com/tuandle","followers_url":"https://api.github.com/users/tuandle/followers","following_url":"https://api.github.com/users/tuandle/following{/other_user}","gists_url":"https://api.github.com/users/tuandle/gists{/gist_id}","starred_url":"https://api.github.com/users/tuandle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuandle/subscriptions","organizations_url":"https://api.github.com/users/tuandle/orgs","repos_url":"https://api.github.com/users/tuandle/repos","events_url":"https://api.github.com/users/tuandle/events{/privacy}","received_events_url":"https://api.github.com/users/tuandle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-05T15:54:44Z","updated_at":"2018-11-08T17:36:52Z","closed_at":null,"author_association":"NONE","body":"Hi @TixiaoShan,\r\nThanks for sharing this package. \r\nI have a question about the function `projectPointcloud`. In this [line](https://github.com/RobustFieldAutonomyLab/LeGO-LOAM/blob/630a87bd446f859f616260f9729a4d0d1180e677/LeGO-LOAM/src/imageProjection.cpp#L205), you hardcoded two numbers for identifying the column index of a point:\r\n\r\n```\r\nif (horizonAngle <= -90)\r\n        columnIdn = -int(horizonAngle / ang_res_x) - 450;\r\n      else if (horizonAngle >= 0)\r\n        columnIdn = -int(horizonAngle / ang_res_x) + 1350;\r\n      else\r\n        columnIdn = 1350 - int(horizonAngle / ang_res_x);\r\n```\r\nIf I understand correct, those numbers `450,1350` are somewhat related to the `Velodyne VLP-16`. They will probably not fit for other LIDAR, whose horizontal resolution is not `0.2` as the `VLP-16`. For example, the `OS1-16` from Ouster has a horizontal resolution at `0.18`, which creates a slightly bigger range image `16x2000`. \r\nI wonder if you could help me understand the logic behind this these number so that I can adapt them to different LIDAR sensor?\r\nI appreciate your help!"},"comment":{"url":"https://api.github.com/repos/RobustFieldAutonomyLab/LeGO-LOAM/issues/comments/437089452","html_url":"https://github.com/RobustFieldAutonomyLab/LeGO-LOAM/issues/38#issuecomment-437089452","issue_url":"https://api.github.com/repos/RobustFieldAutonomyLab/LeGO-LOAM/issues/38","id":437089452,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzA4OTQ1Mg==","user":{"login":"tuandle","id":18464308,"node_id":"MDQ6VXNlcjE4NDY0MzA4","avatar_url":"https://avatars0.githubusercontent.com/u/18464308?v=4","gravatar_id":"","url":"https://api.github.com/users/tuandle","html_url":"https://github.com/tuandle","followers_url":"https://api.github.com/users/tuandle/followers","following_url":"https://api.github.com/users/tuandle/following{/other_user}","gists_url":"https://api.github.com/users/tuandle/gists{/gist_id}","starred_url":"https://api.github.com/users/tuandle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuandle/subscriptions","organizations_url":"https://api.github.com/users/tuandle/orgs","repos_url":"https://api.github.com/users/tuandle/repos","events_url":"https://api.github.com/users/tuandle/events{/privacy}","received_events_url":"https://api.github.com/users/tuandle/received_events","type":"User","site_admin":false},"created_at":"2018-11-08T17:36:52Z","updated_at":"2018-11-08T17:36:52Z","author_association":"NONE","body":"Hi @TixiaoShan\r\nI would like to ask for your help again. I adapted the function `projectPointCloud` to fit my lidar. However, I am not sure how to verify that I project it correctly.\r\nLooking at your code, I have a question about the way you calculate the horizontal angle. \r\n![ask_lego](https://user-images.githubusercontent.com/18464308/48216220-5cfbe380-e384-11e8-9891-ff4d098ddd25.png)\r\nIn my drawing, if I understand correctly, you use `atan2(x,y)` [here](https://github.com/RobustFieldAutonomyLab/LeGO-LOAM/blob/630a87bd446f859f616260f9729a4d0d1180e677/LeGO-LOAM/src/imageProjection.cpp#L202)  to calculate the horizontal angle for point p_i. According to my drawing, should we use `atan2(y,x)` to calculate the angle `gamma` as the horizontal angle for point p_i?\r\nAnd how do we verify that the all the points are projected properly? I visualize the `rangeMat` image from your function and get this (I am using your `same_position.bag`):\r\n![ask_lego2](https://user-images.githubusercontent.com/18464308/48216421-f1fedc80-e384-11e8-9d7c-c89e0f75899c.png)\r\nSo how do you know that you project the cloud correctly to `rangeMat`?\r\nI appreciate your help!\r\nThanks again!"}}
{"actor":{"display_login":"tuandle"}}