{"action":"created","comment":{"url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/comments/191059369","pull_request_review_id":123567446,"id":191059369,"diff_hunk":"@@ -0,0 +1,514 @@\n+/*\n+ * Created By: William Gu\n+ * Created On: March 31 2018\n+ * Description: GTest for ConeIdentification Implementation\n+ */\n+\n+#include \"./LaserscanBuilder.h\"\n+#include <ConeIdentification.h>\n+#include <gtest/gtest.h>\n+\n+/*\n+TEST(ConeIdentification, testRegressionSlope1) {\n+    std::vector<mapping_igvc::Point2D>edge_points;\n+    mapping_igvc::Point2D p1; p1.x = 0; p1.y = 0;\n+    mapping_igvc::Point2D p2; p2.x = 1; p2.y = 1;\n+    mapping_igvc::Point2D p3; p3.x = 2; p3.y = 2;\n+    edge_points.push_back(p1);\n+    edge_points.push_back(p2);\n+    edge_points.push_back(p3);\n+\n+    double slope = ConeIdentification::getRegressionSlope(edge_points);\n+    EXPECT_NEAR(1.0, slope, 0.001);\n+}\n+\n+TEST(ConeIdentification, testRegressionSlope2) {\n+    std::vector<mapping_igvc::Point2D>edge_points;\n+    mapping_igvc::Point2D p1; p1.x = 0; p1.y = 0;\n+    mapping_igvc::Point2D p2; p2.x = 1; p2.y = 1.1;\n+    mapping_igvc::Point2D p3; p3.x = 2; p3.y = 2.3;\n+    mapping_igvc::Point2D p4; p4.x = 3; p4.y = 3.5;\n+    mapping_igvc::Point2D p5; p5.x = 4; p5.y = 4.9;\n+    mapping_igvc::Point2D p6; p6.x = 5; p6.y = 6.0;\n+    edge_points.push_back(p1);\n+    edge_points.push_back(p2);\n+    edge_points.push_back(p3);\n+    edge_points.push_back(p4);\n+    edge_points.push_back(p5);\n+    edge_points.push_back(p6);\n+\n+    double slope = ConeIdentification::getRegressionSlope(edge_points);\n+    EXPECT_NEAR(1.217, slope, 0.02);\n+}*/","path":"src/sb_laserscan_processing/test/cone-identification-test.cpp","position":null,"original_position":42,"commit_id":"70ca732c447cc0a094416651ed39945a091bde3c","original_commit_id":"b1a752bd676798a93c913c9d32efe5964abec2da","user":{"login":"WilliamGu98","id":31490047,"avatar_url":"https://avatars3.githubusercontent.com/u/31490047?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamGu98","html_url":"https://github.com/WilliamGu98","followers_url":"https://api.github.com/users/WilliamGu98/followers","following_url":"https://api.github.com/users/WilliamGu98/following{/other_user}","gists_url":"https://api.github.com/users/WilliamGu98/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamGu98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamGu98/subscriptions","organizations_url":"https://api.github.com/users/WilliamGu98/orgs","repos_url":"https://api.github.com/users/WilliamGu98/repos","events_url":"https://api.github.com/users/WilliamGu98/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamGu98/received_events","type":"User","site_admin":false},"body":"Fixed","created_at":"2018-05-26T21:54:48Z","updated_at":"2018-05-26T21:54:48Z","html_url":"https://github.com/UBC-Snowbots/Snowflake/pull/309#discussion_r191059369","pull_request_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/309","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/comments/191059369"},"html":{"href":"https://github.com/UBC-Snowbots/Snowflake/pull/309#discussion_r191059369"},"pull_request":{"href":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/309"}},"in_reply_to_id":191058886},"pull_request":{"url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/309","id":185606302,"html_url":"https://github.com/UBC-Snowbots/Snowflake/pull/309","diff_url":"https://github.com/UBC-Snowbots/Snowflake/pull/309.diff","patch_url":"https://github.com/UBC-Snowbots/Snowflake/pull/309.patch","issue_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/issues/309","number":309,"state":"open","locked":false,"title":"Cone manager issue229","user":{"login":"WilliamGu98","id":31490047,"avatar_url":"https://avatars3.githubusercontent.com/u/31490047?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamGu98","html_url":"https://github.com/WilliamGu98","followers_url":"https://api.github.com/users/WilliamGu98/followers","following_url":"https://api.github.com/users/WilliamGu98/following{/other_user}","gists_url":"https://api.github.com/users/WilliamGu98/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamGu98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamGu98/subscriptions","organizations_url":"https://api.github.com/users/WilliamGu98/orgs","repos_url":"https://api.github.com/users/WilliamGu98/repos","events_url":"https://api.github.com/users/WilliamGu98/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamGu98/received_events","type":"User","site_admin":false},"body":"This is what I have so far for the cone extractor node. There's some comments that still need to be removed and maybe more documentation and minor stuff to be added, but the implementation works for the tests I've written so far.\r\nI would have added more tests myself but I used my own helper class to generate laserscan messages so I was wondering if it'd be better to just move on to physical testing as it'd give a better idea of what works or doesn't in this implementation. (the laserscan messages I'm generating might be \"cleaner\" than what we would see with the actual laser scan)\r\nAlso -- I found a circle fitting algorithm online that I've put in the implementation, that's more accurate than the previous algorithm I was using by simply generating a circle based on 3 points at a time from the edge points of a cone. I was wondering if it'd be okay to use it though since I'm not completely sure how it works myself and essentially just copied the code.","created_at":"2018-05-03T02:46:02Z","updated_at":"2018-05-26T21:54:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6aabde6900091e9a6d1f776bb134a309373df8bb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/309/commits","review_comments_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/309/comments","review_comment_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/issues/309/comments","statuses_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/statuses/70ca732c447cc0a094416651ed39945a091bde3c","head":{"label":"WilliamGu98:ConeManagerIssue229","ref":"ConeManagerIssue229","sha":"70ca732c447cc0a094416651ed39945a091bde3c","user":{"login":"WilliamGu98","id":31490047,"avatar_url":"https://avatars3.githubusercontent.com/u/31490047?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamGu98","html_url":"https://github.com/WilliamGu98","followers_url":"https://api.github.com/users/WilliamGu98/followers","following_url":"https://api.github.com/users/WilliamGu98/following{/other_user}","gists_url":"https://api.github.com/users/WilliamGu98/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamGu98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamGu98/subscriptions","organizations_url":"https://api.github.com/users/WilliamGu98/orgs","repos_url":"https://api.github.com/users/WilliamGu98/repos","events_url":"https://api.github.com/users/WilliamGu98/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamGu98/received_events","type":"User","site_admin":false},"repo":{"id":118268721,"name":"Snowflake","full_name":"WilliamGu98/Snowflake","owner":{"login":"WilliamGu98","id":31490047,"avatar_url":"https://avatars3.githubusercontent.com/u/31490047?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamGu98","html_url":"https://github.com/WilliamGu98","followers_url":"https://api.github.com/users/WilliamGu98/followers","following_url":"https://api.github.com/users/WilliamGu98/following{/other_user}","gists_url":"https://api.github.com/users/WilliamGu98/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamGu98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamGu98/subscriptions","organizations_url":"https://api.github.com/users/WilliamGu98/orgs","repos_url":"https://api.github.com/users/WilliamGu98/repos","events_url":"https://api.github.com/users/WilliamGu98/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamGu98/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WilliamGu98/Snowflake","description":"UBC Snowbots Codebase","fork":true,"url":"https://api.github.com/repos/WilliamGu98/Snowflake","forks_url":"https://api.github.com/repos/WilliamGu98/Snowflake/forks","keys_url":"https://api.github.com/repos/WilliamGu98/Snowflake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WilliamGu98/Snowflake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WilliamGu98/Snowflake/teams","hooks_url":"https://api.github.com/repos/WilliamGu98/Snowflake/hooks","issue_events_url":"https://api.github.com/repos/WilliamGu98/Snowflake/issues/events{/number}","events_url":"https://api.github.com/repos/WilliamGu98/Snowflake/events","assignees_url":"https://api.github.com/repos/WilliamGu98/Snowflake/assignees{/user}","branches_url":"https://api.github.com/repos/WilliamGu98/Snowflake/branches{/branch}","tags_url":"https://api.github.com/repos/WilliamGu98/Snowflake/tags","blobs_url":"https://api.github.com/repos/WilliamGu98/Snowflake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WilliamGu98/Snowflake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WilliamGu98/Snowflake/git/refs{/sha}","trees_url":"https://api.github.com/repos/WilliamGu98/Snowflake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WilliamGu98/Snowflake/statuses/{sha}","languages_url":"https://api.github.com/repos/WilliamGu98/Snowflake/languages","stargazers_url":"https://api.github.com/repos/WilliamGu98/Snowflake/stargazers","contributors_url":"https://api.github.com/repos/WilliamGu98/Snowflake/contributors","subscribers_url":"https://api.github.com/repos/WilliamGu98/Snowflake/subscribers","subscription_url":"https://api.github.com/repos/WilliamGu98/Snowflake/subscription","commits_url":"https://api.github.com/repos/WilliamGu98/Snowflake/commits{/sha}","git_commits_url":"https://api.github.com/repos/WilliamGu98/Snowflake/git/commits{/sha}","comments_url":"https://api.github.com/repos/WilliamGu98/Snowflake/comments{/number}","issue_comment_url":"https://api.github.com/repos/WilliamGu98/Snowflake/issues/comments{/number}","contents_url":"https://api.github.com/repos/WilliamGu98/Snowflake/contents/{+path}","compare_url":"https://api.github.com/repos/WilliamGu98/Snowflake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WilliamGu98/Snowflake/merges","archive_url":"https://api.github.com/repos/WilliamGu98/Snowflake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WilliamGu98/Snowflake/downloads","issues_url":"https://api.github.com/repos/WilliamGu98/Snowflake/issues{/number}","pulls_url":"https://api.github.com/repos/WilliamGu98/Snowflake/pulls{/number}","milestones_url":"https://api.github.com/repos/WilliamGu98/Snowflake/milestones{/number}","notifications_url":"https://api.github.com/repos/WilliamGu98/Snowflake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WilliamGu98/Snowflake/labels{/name}","releases_url":"https://api.github.com/repos/WilliamGu98/Snowflake/releases{/id}","deployments_url":"https://api.github.com/repos/WilliamGu98/Snowflake/deployments","created_at":"2018-01-20T18:17:24Z","updated_at":"2018-05-26T18:17:59Z","pushed_at":"2018-05-26T21:29:37Z","git_url":"git://github.com/WilliamGu98/Snowflake.git","ssh_url":"git@github.com:WilliamGu98/Snowflake.git","clone_url":"https://github.com/WilliamGu98/Snowflake.git","svn_url":"https://github.com/WilliamGu98/Snowflake","homepage":"","size":27031,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"UBC-Snowbots:master","ref":"master","sha":"5b9638f365cd974f623075d6f8c9e215edd48763","user":{"login":"UBC-Snowbots","id":7613873,"avatar_url":"https://avatars0.githubusercontent.com/u/7613873?v=4","gravatar_id":"","url":"https://api.github.com/users/UBC-Snowbots","html_url":"https://github.com/UBC-Snowbots","followers_url":"https://api.github.com/users/UBC-Snowbots/followers","following_url":"https://api.github.com/users/UBC-Snowbots/following{/other_user}","gists_url":"https://api.github.com/users/UBC-Snowbots/gists{/gist_id}","starred_url":"https://api.github.com/users/UBC-Snowbots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UBC-Snowbots/subscriptions","organizations_url":"https://api.github.com/users/UBC-Snowbots/orgs","repos_url":"https://api.github.com/users/UBC-Snowbots/repos","events_url":"https://api.github.com/users/UBC-Snowbots/events{/privacy}","received_events_url":"https://api.github.com/users/UBC-Snowbots/received_events","type":"Organization","site_admin":false},"repo":{"id":62523530,"name":"Snowflake","full_name":"UBC-Snowbots/Snowflake","owner":{"login":"UBC-Snowbots","id":7613873,"avatar_url":"https://avatars0.githubusercontent.com/u/7613873?v=4","gravatar_id":"","url":"https://api.github.com/users/UBC-Snowbots","html_url":"https://github.com/UBC-Snowbots","followers_url":"https://api.github.com/users/UBC-Snowbots/followers","following_url":"https://api.github.com/users/UBC-Snowbots/following{/other_user}","gists_url":"https://api.github.com/users/UBC-Snowbots/gists{/gist_id}","starred_url":"https://api.github.com/users/UBC-Snowbots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UBC-Snowbots/subscriptions","organizations_url":"https://api.github.com/users/UBC-Snowbots/orgs","repos_url":"https://api.github.com/users/UBC-Snowbots/repos","events_url":"https://api.github.com/users/UBC-Snowbots/events{/privacy}","received_events_url":"https://api.github.com/users/UBC-Snowbots/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UBC-Snowbots/Snowflake","description":"UBC Snowbots Codebase","fork":false,"url":"https://api.github.com/repos/UBC-Snowbots/Snowflake","forks_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/forks","keys_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/teams","hooks_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/hooks","issue_events_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/issues/events{/number}","events_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/events","assignees_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/assignees{/user}","branches_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/branches{/branch}","tags_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/tags","blobs_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/git/refs{/sha}","trees_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/statuses/{sha}","languages_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/languages","stargazers_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/stargazers","contributors_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/contributors","subscribers_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/subscribers","subscription_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/subscription","commits_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/commits{/sha}","git_commits_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/git/commits{/sha}","comments_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/comments{/number}","issue_comment_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/issues/comments{/number}","contents_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/contents/{+path}","compare_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/merges","archive_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/downloads","issues_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/issues{/number}","pulls_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls{/number}","milestones_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/milestones{/number}","notifications_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/labels{/name}","releases_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/releases{/id}","deployments_url":"https://api.github.com/repos/UBC-Snowbots/Snowflake/deployments","created_at":"2016-07-04T01:39:14Z","updated_at":"2018-05-25T03:03:46Z","pushed_at":"2018-05-26T21:43:05Z","git_url":"git://github.com/UBC-Snowbots/Snowflake.git","ssh_url":"git@github.com:UBC-Snowbots/Snowflake.git","clone_url":"https://github.com/UBC-Snowbots/Snowflake.git","svn_url":"https://github.com/UBC-Snowbots/Snowflake","homepage":"","size":23852,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":45,"license":null,"forks":14,"open_issues":45,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/309"},"html":{"href":"https://github.com/UBC-Snowbots/Snowflake/pull/309"},"issue":{"href":"https://api.github.com/repos/UBC-Snowbots/Snowflake/issues/309"},"comments":{"href":"https://api.github.com/repos/UBC-Snowbots/Snowflake/issues/309/comments"},"review_comments":{"href":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/309/comments"},"review_comment":{"href":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UBC-Snowbots/Snowflake/pulls/309/commits"},"statuses":{"href":"https://api.github.com/repos/UBC-Snowbots/Snowflake/statuses/70ca732c447cc0a094416651ed39945a091bde3c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"WilliamGu98"}}