{"action":"created","issue":{"url":"https://api.github.com/repos/tum-vision/lsd_slam/issues/69","labels_url":"https://api.github.com/repos/tum-vision/lsd_slam/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/tum-vision/lsd_slam/issues/69/comments","events_url":"https://api.github.com/repos/tum-vision/lsd_slam/issues/69/events","html_url":"https://github.com/tum-vision/lsd_slam/issues/69","id":56704600,"number":69,"title":"Catkinize","user":{"login":"devbharat","id":3105122,"avatar_url":"https://avatars.githubusercontent.com/u/3105122?v=3","gravatar_id":"","url":"https://api.github.com/users/devbharat","html_url":"https://github.com/devbharat","followers_url":"https://api.github.com/users/devbharat/followers","following_url":"https://api.github.com/users/devbharat/following{/other_user}","gists_url":"https://api.github.com/users/devbharat/gists{/gist_id}","starred_url":"https://api.github.com/users/devbharat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devbharat/subscriptions","organizations_url":"https://api.github.com/users/devbharat/orgs","repos_url":"https://api.github.com/users/devbharat/repos","events_url":"https://api.github.com/users/devbharat/events{/privacy}","received_events_url":"https://api.github.com/users/devbharat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-02-05T17:51:42Z","updated_at":"2015-03-10T21:39:00Z","closed_at":null,"body":"I need to catkinize lsd-slam to use gtsam instead of g2o for map optimization. (Previously I had tried to include gtsam as a shared library in las-slam-core, but there is some issue with the version of eigen used by gtsam and lsd-slam.). \r\n\r\nHave you tried to build lsd-slam with catkin ? I have gtsam as a catkin package. How convoluted would it be to build it via catkin ?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/tum-vision/lsd_slam/issues/comments/78154118","html_url":"https://github.com/tum-vision/lsd_slam/issues/69#issuecomment-78154118","issue_url":"https://api.github.com/repos/tum-vision/lsd_slam/issues/69","id":78154118,"user":{"login":"devbharat","id":3105122,"avatar_url":"https://avatars.githubusercontent.com/u/3105122?v=3","gravatar_id":"","url":"https://api.github.com/users/devbharat","html_url":"https://github.com/devbharat","followers_url":"https://api.github.com/users/devbharat/followers","following_url":"https://api.github.com/users/devbharat/following{/other_user}","gists_url":"https://api.github.com/users/devbharat/gists{/gist_id}","starred_url":"https://api.github.com/users/devbharat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devbharat/subscriptions","organizations_url":"https://api.github.com/users/devbharat/orgs","repos_url":"https://api.github.com/users/devbharat/repos","events_url":"https://api.github.com/users/devbharat/events{/privacy}","received_events_url":"https://api.github.com/users/devbharat/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T21:39:00Z","updated_at":"2015-03-10T21:39:00Z","body":"Hey! Thanks for the reply.\r\n\r\nI agree that right/left composition to make increments in SE3/Sim3 space should both work, and my concern is regarding the 'consistency' of using the obtained covariance matrix in the pose-graph. lsd-slam 'as-is' does incremental composition on the left in all it's optimizations - SE3, Sim3 and then in pose-graph in g2o. And, as you said, they have modified the g2o's default right-composition convention in g2oTypeSim3Sophus. \r\n\r\nNow, although I essentially use the same SE3 and Sim3Tracker of lsd-slam, the final map optimization is done not by g2o but by GTSAM. In addition to the Sim3 Factors, there are also GPS Factors to the keyframe nodes to bring in realworld scale and orientation. \r\n\r\nIt seems to work fine, catching the realworld scale and orientation, although I suppose the results could be better. I suspect that the way I have included the covariance matrix from the Sim3Tracker into the gaussian noise covariance of Sim3 Factors of GTSAM is incorrect. \r\n\r\nGTSAM does right composition by default, and I am reluctant to modify it for left composition. SE3 tracker and Sim3Tracker do ls-optimization with left composition, and their obtained covariance matrices are suited for them. What, sort of a 'hack' I tried was to just switch the left-composition of Sim3Tracker to right-composition:\r\n```\r\n// apply increment. pretty sure this way round is correct, but hard to test.\r\nSim3 new_referenceToFrame =Sim3::exp(inc.cast<sophusType>()) * referenceToFrame;\r\n//Sim3 new_referenceToFrame = referenceToFrame * Sim3::exp((inc));\r\n```\r\n(line 236: https://github.com/tum-vision/lsd_slam/blob/master/lsd_slam_core/src/Tracking/Sim3Tracker.cpp)\r\n\r\nto the hacked version \r\n```\r\n// apply increment. pretty sure this way round is correct, but hard to test.\r\nSim3 new_referenceToFrame = referenceToFrame*Sim3::exp(inc.cast<sophusType>());\r\n//Sim3 new_referenceToFrame = referenceToFrame * Sim3::exp((inc));\r\n```\r\nand used the then obtained covariance matrix in GTSAM. I am not sure if that little change completely accounts for the left-right composition or if I have to make these changes in SE3 tracker as well, etc. \r\n\r\nWhat do you think ? "}}