{"action":"created","comment":{"url":"https://api.github.com/repos/openhumanoids/pronto/pulls/comments/46545503","id":46545503,"diff_hunk":"@@ -231,12 +245,37 @@ void LidarOdom::doOdometry(std::vector<float> x, std::vector<float> y, int npoin\n     }\n \n     //Actually do the matching\n-    ScanTransform r = sm_->matchSuccessive(points, numValidPoints,\n-            cfg_.laserType, utime, NULL); //don't have a better estimate than prev, so just set prior to NULL\n+//====================== Modified by Simona Nobili on 02 Dec 2015 ===================\n+    ScanTransform r;\n+    if (scan_number > 1 && cfg_.do_two_scans_matching)\n+    {\n+      ScanTransform init;\n+      memset(&init, 0, sizeof(init));\n+      init.x = cfg_.startPoseInputX;\n+      init.y = cfg_.startPoseInputY;\n+      init.theta = (cfg_.startPoseInputTheta * M_PI)/180;\n+\n+      r = sm_->matchSuccessive(points, numValidPoints,\n+              cfg_.laserType, utime, false, &init);\n+    }\n+    else\n+    {\n+      r = sm_->matchSuccessive(points, numValidPoints,\n+              cfg_.laserType, utime, NULL); //don't have a better estimate than prev, so just set prior to NULL\n                                       //utime is ONLY used to tag the scans that get added to the map, doesn't actually matter\n+    }\n+//=================================================================================\n+\n     Eigen::Isometry3d r_Iso = getScanTransformAsIsometry3d(r);\n+\n     prevOdom_ = currOdom_;\n+    //cout << \"PREVIOUS\" << endl;\n+    //cout << \"Translation: \" << endl << prevOdom_.translation() << endl;","path":"lidar_odometry/src/lidar_odometry/lidar-odometry.cpp","position":91,"original_position":91,"commit_id":"28f3960e662c1aadf80463e43ffa519a36c8d5e3","original_commit_id":"28f3960e662c1aadf80463e43ffa519a36c8d5e3","user":{"login":"mauricefallon","id":6404227,"avatar_url":"https://avatars.githubusercontent.com/u/6404227?v=3","gravatar_id":"","url":"https://api.github.com/users/mauricefallon","html_url":"https://github.com/mauricefallon","followers_url":"https://api.github.com/users/mauricefallon/followers","following_url":"https://api.github.com/users/mauricefallon/following{/other_user}","gists_url":"https://api.github.com/users/mauricefallon/gists{/gist_id}","starred_url":"https://api.github.com/users/mauricefallon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauricefallon/subscriptions","organizations_url":"https://api.github.com/users/mauricefallon/orgs","repos_url":"https://api.github.com/users/mauricefallon/repos","events_url":"https://api.github.com/users/mauricefallon/events{/privacy}","received_events_url":"https://api.github.com/users/mauricefallon/received_events","type":"User","site_admin":false},"body":"remove these comments.","created_at":"2015-12-03T12:32:16Z","updated_at":"2015-12-03T12:32:16Z","html_url":"https://github.com/openhumanoids/pronto/pull/37#discussion_r46545503","pull_request_url":"https://api.github.com/repos/openhumanoids/pronto/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/openhumanoids/pronto/pulls/comments/46545503"},"html":{"href":"https://github.com/openhumanoids/pronto/pull/37#discussion_r46545503"},"pull_request":{"href":"https://api.github.com/repos/openhumanoids/pronto/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/openhumanoids/pronto/pulls/37","id":52524667,"html_url":"https://github.com/openhumanoids/pronto/pull/37","diff_url":"https://github.com/openhumanoids/pronto/pull/37.diff","patch_url":"https://github.com/openhumanoids/pronto/pull/37.patch","issue_url":"https://api.github.com/repos/openhumanoids/pronto/issues/37","number":37,"state":"open","locked":false,"title":"Added possibility to set initial transformation for input cloud.","user":{"login":"simalpha","id":10845170,"avatar_url":"https://avatars.githubusercontent.com/u/10845170?v=3","gravatar_id":"","url":"https://api.github.com/users/simalpha","html_url":"https://github.com/simalpha","followers_url":"https://api.github.com/users/simalpha/followers","following_url":"https://api.github.com/users/simalpha/following{/other_user}","gists_url":"https://api.github.com/users/simalpha/gists{/gist_id}","starred_url":"https://api.github.com/users/simalpha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simalpha/subscriptions","organizations_url":"https://api.github.com/users/simalpha/orgs","repos_url":"https://api.github.com/users/simalpha/repos","events_url":"https://api.github.com/users/simalpha/events{/privacy}","received_events_url":"https://api.github.com/users/simalpha/received_events","type":"User","site_admin":false},"body":"Added possibility to set initial transformation for input cloud (cloud B which will be matched to the reference cloud A).","created_at":"2015-12-03T11:53:31Z","updated_at":"2015-12-03T12:32:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62c8d70ca685c638d5a265e385d54560e01d5a7f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openhumanoids/pronto/pulls/37/commits","review_comments_url":"https://api.github.com/repos/openhumanoids/pronto/pulls/37/comments","review_comment_url":"https://api.github.com/repos/openhumanoids/pronto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openhumanoids/pronto/issues/37/comments","statuses_url":"https://api.github.com/repos/openhumanoids/pronto/statuses/28f3960e662c1aadf80463e43ffa519a36c8d5e3","head":{"label":"simalpha:sn-2Dscan-matching","ref":"sn-2Dscan-matching","sha":"28f3960e662c1aadf80463e43ffa519a36c8d5e3","user":{"login":"simalpha","id":10845170,"avatar_url":"https://avatars.githubusercontent.com/u/10845170?v=3","gravatar_id":"","url":"https://api.github.com/users/simalpha","html_url":"https://github.com/simalpha","followers_url":"https://api.github.com/users/simalpha/followers","following_url":"https://api.github.com/users/simalpha/following{/other_user}","gists_url":"https://api.github.com/users/simalpha/gists{/gist_id}","starred_url":"https://api.github.com/users/simalpha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simalpha/subscriptions","organizations_url":"https://api.github.com/users/simalpha/orgs","repos_url":"https://api.github.com/users/simalpha/repos","events_url":"https://api.github.com/users/simalpha/events{/privacy}","received_events_url":"https://api.github.com/users/simalpha/received_events","type":"User","site_admin":false},"repo":{"id":47328551,"name":"pronto","full_name":"simalpha/pronto","owner":{"login":"simalpha","id":10845170,"avatar_url":"https://avatars.githubusercontent.com/u/10845170?v=3","gravatar_id":"","url":"https://api.github.com/users/simalpha","html_url":"https://github.com/simalpha","followers_url":"https://api.github.com/users/simalpha/followers","following_url":"https://api.github.com/users/simalpha/following{/other_user}","gists_url":"https://api.github.com/users/simalpha/gists{/gist_id}","starred_url":"https://api.github.com/users/simalpha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simalpha/subscriptions","organizations_url":"https://api.github.com/users/simalpha/orgs","repos_url":"https://api.github.com/users/simalpha/repos","events_url":"https://api.github.com/users/simalpha/events{/privacy}","received_events_url":"https://api.github.com/users/simalpha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simalpha/pronto","description":"Robot Motion Estimator","fork":true,"url":"https://api.github.com/repos/simalpha/pronto","forks_url":"https://api.github.com/repos/simalpha/pronto/forks","keys_url":"https://api.github.com/repos/simalpha/pronto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simalpha/pronto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simalpha/pronto/teams","hooks_url":"https://api.github.com/repos/simalpha/pronto/hooks","issue_events_url":"https://api.github.com/repos/simalpha/pronto/issues/events{/number}","events_url":"https://api.github.com/repos/simalpha/pronto/events","assignees_url":"https://api.github.com/repos/simalpha/pronto/assignees{/user}","branches_url":"https://api.github.com/repos/simalpha/pronto/branches{/branch}","tags_url":"https://api.github.com/repos/simalpha/pronto/tags","blobs_url":"https://api.github.com/repos/simalpha/pronto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simalpha/pronto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simalpha/pronto/git/refs{/sha}","trees_url":"https://api.github.com/repos/simalpha/pronto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simalpha/pronto/statuses/{sha}","languages_url":"https://api.github.com/repos/simalpha/pronto/languages","stargazers_url":"https://api.github.com/repos/simalpha/pronto/stargazers","contributors_url":"https://api.github.com/repos/simalpha/pronto/contributors","subscribers_url":"https://api.github.com/repos/simalpha/pronto/subscribers","subscription_url":"https://api.github.com/repos/simalpha/pronto/subscription","commits_url":"https://api.github.com/repos/simalpha/pronto/commits{/sha}","git_commits_url":"https://api.github.com/repos/simalpha/pronto/git/commits{/sha}","comments_url":"https://api.github.com/repos/simalpha/pronto/comments{/number}","issue_comment_url":"https://api.github.com/repos/simalpha/pronto/issues/comments{/number}","contents_url":"https://api.github.com/repos/simalpha/pronto/contents/{+path}","compare_url":"https://api.github.com/repos/simalpha/pronto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simalpha/pronto/merges","archive_url":"https://api.github.com/repos/simalpha/pronto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simalpha/pronto/downloads","issues_url":"https://api.github.com/repos/simalpha/pronto/issues{/number}","pulls_url":"https://api.github.com/repos/simalpha/pronto/pulls{/number}","milestones_url":"https://api.github.com/repos/simalpha/pronto/milestones{/number}","notifications_url":"https://api.github.com/repos/simalpha/pronto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simalpha/pronto/labels{/name}","releases_url":"https://api.github.com/repos/simalpha/pronto/releases{/id}","created_at":"2015-12-03T11:45:09Z","updated_at":"2015-12-03T11:45:11Z","pushed_at":"2015-12-03T11:50:18Z","git_url":"git://github.com/simalpha/pronto.git","ssh_url":"git@github.com:simalpha/pronto.git","clone_url":"https://github.com/simalpha/pronto.git","svn_url":"https://github.com/simalpha/pronto","homepage":null,"size":648,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openhumanoids:master","ref":"master","sha":"3c5cfef4b2b467ca3e40f9940ac4a3bebc743cdf","user":{"login":"openhumanoids","id":6392416,"avatar_url":"https://avatars.githubusercontent.com/u/6392416?v=3","gravatar_id":"","url":"https://api.github.com/users/openhumanoids","html_url":"https://github.com/openhumanoids","followers_url":"https://api.github.com/users/openhumanoids/followers","following_url":"https://api.github.com/users/openhumanoids/following{/other_user}","gists_url":"https://api.github.com/users/openhumanoids/gists{/gist_id}","starred_url":"https://api.github.com/users/openhumanoids/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openhumanoids/subscriptions","organizations_url":"https://api.github.com/users/openhumanoids/orgs","repos_url":"https://api.github.com/users/openhumanoids/repos","events_url":"https://api.github.com/users/openhumanoids/events{/privacy}","received_events_url":"https://api.github.com/users/openhumanoids/received_events","type":"Organization","site_admin":false},"repo":{"id":24773355,"name":"pronto","full_name":"openhumanoids/pronto","owner":{"login":"openhumanoids","id":6392416,"avatar_url":"https://avatars.githubusercontent.com/u/6392416?v=3","gravatar_id":"","url":"https://api.github.com/users/openhumanoids","html_url":"https://github.com/openhumanoids","followers_url":"https://api.github.com/users/openhumanoids/followers","following_url":"https://api.github.com/users/openhumanoids/following{/other_user}","gists_url":"https://api.github.com/users/openhumanoids/gists{/gist_id}","starred_url":"https://api.github.com/users/openhumanoids/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openhumanoids/subscriptions","organizations_url":"https://api.github.com/users/openhumanoids/orgs","repos_url":"https://api.github.com/users/openhumanoids/repos","events_url":"https://api.github.com/users/openhumanoids/events{/privacy}","received_events_url":"https://api.github.com/users/openhumanoids/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openhumanoids/pronto","description":"Robot Motion Estimator","fork":false,"url":"https://api.github.com/repos/openhumanoids/pronto","forks_url":"https://api.github.com/repos/openhumanoids/pronto/forks","keys_url":"https://api.github.com/repos/openhumanoids/pronto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openhumanoids/pronto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openhumanoids/pronto/teams","hooks_url":"https://api.github.com/repos/openhumanoids/pronto/hooks","issue_events_url":"https://api.github.com/repos/openhumanoids/pronto/issues/events{/number}","events_url":"https://api.github.com/repos/openhumanoids/pronto/events","assignees_url":"https://api.github.com/repos/openhumanoids/pronto/assignees{/user}","branches_url":"https://api.github.com/repos/openhumanoids/pronto/branches{/branch}","tags_url":"https://api.github.com/repos/openhumanoids/pronto/tags","blobs_url":"https://api.github.com/repos/openhumanoids/pronto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openhumanoids/pronto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openhumanoids/pronto/git/refs{/sha}","trees_url":"https://api.github.com/repos/openhumanoids/pronto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openhumanoids/pronto/statuses/{sha}","languages_url":"https://api.github.com/repos/openhumanoids/pronto/languages","stargazers_url":"https://api.github.com/repos/openhumanoids/pronto/stargazers","contributors_url":"https://api.github.com/repos/openhumanoids/pronto/contributors","subscribers_url":"https://api.github.com/repos/openhumanoids/pronto/subscribers","subscription_url":"https://api.github.com/repos/openhumanoids/pronto/subscription","commits_url":"https://api.github.com/repos/openhumanoids/pronto/commits{/sha}","git_commits_url":"https://api.github.com/repos/openhumanoids/pronto/git/commits{/sha}","comments_url":"https://api.github.com/repos/openhumanoids/pronto/comments{/number}","issue_comment_url":"https://api.github.com/repos/openhumanoids/pronto/issues/comments{/number}","contents_url":"https://api.github.com/repos/openhumanoids/pronto/contents/{+path}","compare_url":"https://api.github.com/repos/openhumanoids/pronto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openhumanoids/pronto/merges","archive_url":"https://api.github.com/repos/openhumanoids/pronto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openhumanoids/pronto/downloads","issues_url":"https://api.github.com/repos/openhumanoids/pronto/issues{/number}","pulls_url":"https://api.github.com/repos/openhumanoids/pronto/pulls{/number}","milestones_url":"https://api.github.com/repos/openhumanoids/pronto/milestones{/number}","notifications_url":"https://api.github.com/repos/openhumanoids/pronto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openhumanoids/pronto/labels{/name}","releases_url":"https://api.github.com/repos/openhumanoids/pronto/releases{/id}","created_at":"2014-10-03T20:51:06Z","updated_at":"2015-11-16T10:16:49Z","pushed_at":"2015-12-03T11:53:31Z","git_url":"git://github.com/openhumanoids/pronto.git","ssh_url":"git@github.com:openhumanoids/pronto.git","clone_url":"https://github.com/openhumanoids/pronto.git","svn_url":"https://github.com/openhumanoids/pronto","homepage":null,"size":664,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openhumanoids/pronto/pulls/37"},"html":{"href":"https://github.com/openhumanoids/pronto/pull/37"},"issue":{"href":"https://api.github.com/repos/openhumanoids/pronto/issues/37"},"comments":{"href":"https://api.github.com/repos/openhumanoids/pronto/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/openhumanoids/pronto/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/openhumanoids/pronto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openhumanoids/pronto/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/openhumanoids/pronto/statuses/28f3960e662c1aadf80463e43ffa519a36c8d5e3"}}}}