payload: {"action":"created","issue":{"url":"https://api.github.com/repos/MRPT/mrpt/issues/940","repository_url":"https://api.github.com/repos/MRPT/mrpt","labels_url":"https://api.github.com/repos/MRPT/mrpt/issues/940/labels{/name}","comments_url":"https://api.github.com/repos/MRPT/mrpt/issues/940/comments","events_url":"https://api.github.com/repos/MRPT/mrpt/issues/940/events","html_url":"https://github.com/MRPT/mrpt/issues/940","id":470906667,"node_id":"MDU6SXNzdWU0NzA5MDY2Njc=","number":940,"title":"RFC (Request for comments): New generic observation to unify 2D and 3D rotating LiDARs ","user":{"login":"jlblancoc","id":5497818,"node_id":"MDQ6VXNlcjU0OTc4MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/5497818?v=4","gravatar_id":"","url":"https://api.github.com/users/jlblancoc","html_url":"https://github.com/jlblancoc","followers_url":"https://api.github.com/users/jlblancoc/followers","following_url":"https://api.github.com/users/jlblancoc/following{/other_user}","gists_url":"https://api.github.com/users/jlblancoc/gists{/gist_id}","starred_url":"https://api.github.com/users/jlblancoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlblancoc/subscriptions","organizations_url":"https://api.github.com/users/jlblancoc/orgs","repos_url":"https://api.github.com/users/jlblancoc/repos","events_url":"https://api.github.com/users/jlblancoc/events{/privacy}","received_events_url":"https://api.github.com/users/jlblancoc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/MRPT/mrpt/milestones/10","html_url":"https://github.com/MRPT/mrpt/milestone/10","labels_url":"https://api.github.com/repos/MRPT/mrpt/milestones/10/labels","id":4058433,"node_id":"MDk6TWlsZXN0b25lNDA1ODQzMw==","number":10,"title":"Release 2.0.0-beta","description":"","creator":{"login":"jlblancoc","id":5497818,"node_id":"MDQ6VXNlcjU0OTc4MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/5497818?v=4","gravatar_id":"","url":"https://api.github.com/users/jlblancoc","html_url":"https://github.com/jlblancoc","followers_url":"https://api.github.com/users/jlblancoc/followers","following_url":"https://api.github.com/users/jlblancoc/following{/other_user}","gists_url":"https://api.github.com/users/jlblancoc/gists{/gist_id}","starred_url":"https://api.github.com/users/jlblancoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlblancoc/subscriptions","organizations_url":"https://api.github.com/users/jlblancoc/orgs","repos_url":"https://api.github.com/users/jlblancoc/repos","events_url":"https://api.github.com/users/jlblancoc/events{/privacy}","received_events_url":"https://api.github.com/users/jlblancoc/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":0,"state":"open","created_at":"2019-02-14T22:44:07Z","updated_at":"2019-07-22T05:57:20Z","due_on":"2019-08-15T07:00:00Z","closed_at":null},"comments":1,"created_at":"2019-07-22T05:57:19Z","updated_at":"2019-07-22T19:17:50Z","closed_at":null,"author_association":"MEMBER","body":"To be merged before mrpt 2.0.0-beta. \r\nThe WIP code is in this branch: https://github.com/MRPT/mrpt/commits/add-rotating-scan-obs\r\n\r\nThis issue is intended to be a public place of discussion for ideas on how to achieve having a container for raw range data (**not** point clouds) for (mainly) 3D and (also) 2D scans.\r\nRight now we have a good container for 2D scans, and a 3D container for Velodyne scans only, but it would be strongly desirable to have a unified container for 3D scans from different vendors, especially thinking of LIDAR modules in the MOLA architecture. \r\n\r\nPlease, check the code in the PR #941  where each data field in `mrpt::obs::CObservationRotatingScan.h ` has comments explaining the design criteria.\r\nPlease, comment here, or review the PR #941  with suggestions. \r\n\r\nSome main decisions explained:\r\n- We must support having at least one \"main\" (strongest) range for each direction and each lidar (\"different heights\").\r\n- Ranges are stored as structured images (matrices). For efficiency, it would be desired to store ranges as integers, to enable fast filters to run on \"range images\" as if they were regular images. However, using 8bit or 16 bit is convenient for some models (u8: good old SICK lidars; 16u: velodyne) but may render insufficient for future models, so I propose using a variant of matrix types.\r\n- Apart of this range image, there may be an optional intensity image, which is assumed to always be of type u8 (I think it will never get short??).\r\n- An optional std::map of alternative range images, e.g. first returns, N-th return, etc.\r\n- Having GPS-based precise timing, \r\n- etc.\r\n\r\nThe area of calibration parameters is still open. I'll check the current ones for Velodyne, and those of Ouster, and try to reach to a set of parameters that fit, at least, those two models.\r\n\r\nThoughts?\r\n\r\n(cc: @jolting )\r\n\r\nEdit: the concept of \"distorted\" / \"undistorted\" due to lidar motion does directly not apply here. Raw range data, when converted to point cloud will need to account for the motion of the vehicle to generate distortion-free point cloud."},"comment":{"url":"https://api.github.com/repos/MRPT/mrpt/issues/comments/513917662","html_url":"https://github.com/MRPT/mrpt/issues/940#issuecomment-513917662","issue_url":"https://api.github.com/repos/MRPT/mrpt/issues/940","id":513917662,"node_id":"MDEyOklzc3VlQ29tbWVudDUxMzkxNzY2Mg==","user":{"login":"jolting","id":241397,"node_id":"MDQ6VXNlcjI0MTM5Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/241397?v=4","gravatar_id":"","url":"https://api.github.com/users/jolting","html_url":"https://github.com/jolting","followers_url":"https://api.github.com/users/jolting/followers","following_url":"https://api.github.com/users/jolting/following{/other_user}","gists_url":"https://api.github.com/users/jolting/gists{/gist_id}","starred_url":"https://api.github.com/users/jolting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolting/subscriptions","organizations_url":"https://api.github.com/users/jolting/orgs","repos_url":"https://api.github.com/users/jolting/repos","events_url":"https://api.github.com/users/jolting/events{/privacy}","received_events_url":"https://api.github.com/users/jolting/received_events","type":"User","site_admin":false},"created_at":"2019-07-22T19:17:50Z","updated_at":"2019-07-22T19:17:50Z","author_association":"MEMBER","body":"Consider the following\r\n```c++\r\n#include <variant>\r\n#include <iostream>\r\n\r\nstruct VectorFloat {\r\n    float x;\r\n    float y;\r\n    float z;\r\n};\r\n\r\nstruct VectorDouble {\r\n    double x;\r\n    double y;\r\n    double z;\r\n};\r\nint main(int argc, char* argv[])\r\n{\r\n    auto print =[](auto &result){\r\n        std::cout << result.x << \" \" << result.y << \" \" << result.z << std::endl; \r\n    } ;\r\n#ifdef VARIANT\r\n    using MyVariant = std::variant <VectorFloat, VectorDouble>;\r\n    auto someRandomFunc = [](const auto &v)->MyVariant {\r\n        return decltype(v){v.x+v.z,v.x*v.y*v.z,v.x+v.y+v.y};\r\n    };\r\n    MyVariant test1 = VectorFloat{1,2,3};\r\n    MyVariant test2 = VectorDouble{1,2,3};\r\n    auto result1 = std::visit(someRandomFunc, test1);\r\n    auto result2 = std::visit(someRandomFunc, test2);\r\n    std::visit(print, result1);\r\n    std::visit(print, result2);\r\n#else\r\n    auto someRandomFunc = [](const auto &v) {\r\n        return decltype(v){v.x+v.z,v.x*v.y*v.z,v.x+v.y+v.y};\r\n    };\r\n    auto test1 = VectorFloat{1,2,3};\r\n    auto test2 = VectorDouble{1,2,3};\r\n    auto result1 = someRandomFunc(test1);\r\n    auto result2 = someRandomFunc(test2);\r\n    print(result1);\r\n    print(result2);\r\n#endif\r\n    return 0;\r\n}\r\n```\r\nI prefer the non-variant version since it allows for better optimization and avoids the dynamic polymorphism. Finally, it's a bit easier to read, requiring fewer type conversions and avoiding the std::visit function.\r\n\r\nIf you go the MyVariant route you will be using MyVariant in many unexpected places."}}
other: {"actor":{"display_login":"jolting"}}