{"action":"created","comment":{"url":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/comments/31659862","id":31659862,"diff_hunk":"@@ -0,0 +1,237 @@\n+#include \"godel_surface_detection/scan/profilimeter_scan.h\"\n+#include <ros/ros.h>\n+using namespace godel_process_path;\n+\n+// Local types\n+namespace\n+{\n+  // stub for gift-wrapping algorithm to compute convex hull\n+  // stub for rotating-calipers algorithm to compute min rectangle\n+\n+  /**\n+   * Rotated rectangle structure for use with striping algorithm\n+   * (x,y) is the center (of mass)\n+   * w, h are the edge lengths\n+   * a is the clockwise rotation from upright\n+   */\n+  struct RotatedRect\n+  {\n+    double x, y, w, h, a;\n+  };\n+\n+  RotatedRect simpleBoundingBox(const PolygonBoundary& boundary)\n+  {\n+    double min_x = boundary[0].x;\n+    double min_y = boundary[0].y;\n+    double max_x = boundary[0].x;\n+    double max_y = boundary[0].y;\n+\n+    for (std::size_t i = 1; i < boundary.size(); ++i)\n+    {\n+      const PolygonPt& pt = boundary[i];\n+      min_x = std::min(pt.x, min_x);\n+      min_y = std::min(pt.y, min_y);\n+      max_x = std::max(pt.x, max_x);\n+      max_y = std::max(pt.y, max_y); \n+    }\n+\n+    RotatedRect result;\n+    result.a = 0.0; // non-rotated, hence the simple bounding box\n+    result.x = (max_x + min_x) / 2;\n+    result.y = (max_y + min_y) / 2;\n+    result.w = max_x - min_x;\n+    result.h = max_y - min_y;\n+    return result;\n+  }\n+\n+  // Vertically or horizontally?\n+  std::vector<RotatedRect> sliceBoundingBox(const RotatedRect& bbox, double slice_width, double overlap)\n+  {\n+    // we assume slice_width > overlap\n+    int n_slices;\n+    float dx, dy; // unit vector\n+    float x, y; // start position\n+    float w, h;\n+\n+    float adjusted_width = slice_width - overlap;","path":"godel_surface_detection/src/scan/profilimeter_scan.cpp","position":56,"original_position":56,"commit_id":"70cf3b850f1e267a7c34ece2910f9fb8ab7f5116","original_commit_id":"bdb7828b4681a9c78b2b842367e1de5eb371536f","user":{"login":"jrgnicho","id":3279718,"avatar_url":"https://avatars.githubusercontent.com/u/3279718?v=3","gravatar_id":"","url":"https://api.github.com/users/jrgnicho","html_url":"https://github.com/jrgnicho","followers_url":"https://api.github.com/users/jrgnicho/followers","following_url":"https://api.github.com/users/jrgnicho/following{/other_user}","gists_url":"https://api.github.com/users/jrgnicho/gists{/gist_id}","starred_url":"https://api.github.com/users/jrgnicho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrgnicho/subscriptions","organizations_url":"https://api.github.com/users/jrgnicho/orgs","repos_url":"https://api.github.com/users/jrgnicho/repos","events_url":"https://api.github.com/users/jrgnicho/events{/privacy}","received_events_url":"https://api.github.com/users/jrgnicho/received_events","type":"User","site_admin":false},"body":"+1","created_at":"2015-06-03T19:23:00Z","updated_at":"2015-06-03T19:23:00Z","html_url":"https://github.com/ros-industrial-consortium/godel/pull/61#discussion_r31659862","pull_request_url":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/comments/31659862"},"html":{"href":"https://github.com/ros-industrial-consortium/godel/pull/61#discussion_r31659862"},"pull_request":{"href":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/61","id":36642693,"html_url":"https://github.com/ros-industrial-consortium/godel/pull/61","diff_url":"https://github.com/ros-industrial-consortium/godel/pull/61.diff","patch_url":"https://github.com/ros-industrial-consortium/godel/pull/61.patch","issue_url":"https://api.github.com/repos/ros-industrial-consortium/godel/issues/61","number":61,"state":"open","locked":false,"title":"Keyence Profilimeter Analysis Code","user":{"login":"Jmeyer1292","id":4960180,"avatar_url":"https://avatars.githubusercontent.com/u/4960180?v=3","gravatar_id":"","url":"https://api.github.com/users/Jmeyer1292","html_url":"https://github.com/Jmeyer1292","followers_url":"https://api.github.com/users/Jmeyer1292/followers","following_url":"https://api.github.com/users/Jmeyer1292/following{/other_user}","gists_url":"https://api.github.com/users/Jmeyer1292/gists{/gist_id}","starred_url":"https://api.github.com/users/Jmeyer1292/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jmeyer1292/subscriptions","organizations_url":"https://api.github.com/users/Jmeyer1292/orgs","repos_url":"https://api.github.com/users/Jmeyer1292/repos","events_url":"https://api.github.com/users/Jmeyer1292/events{/privacy}","received_events_url":"https://api.github.com/users/Jmeyer1292/received_events","type":"User","site_admin":false},"body":"This PR adds a package for performing analysis of keyence data. Also included is supporting algorithms for generating scan paths, URDFs, etc... ","created_at":"2015-06-01T15:54:21Z","updated_at":"2015-06-03T19:23:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c66d7540994c65d7efde15faeb7d933406d61e8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/61/commits","review_comments_url":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/61/comments","review_comment_url":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros-industrial-consortium/godel/issues/61/comments","statuses_url":"https://api.github.com/repos/ros-industrial-consortium/godel/statuses/70cf3b850f1e267a7c34ece2910f9fb8ab7f5116","head":{"label":"Jmeyer1292:pr_laser_scan_pkg","ref":"pr_laser_scan_pkg","sha":"70cf3b850f1e267a7c34ece2910f9fb8ab7f5116","user":{"login":"Jmeyer1292","id":4960180,"avatar_url":"https://avatars.githubusercontent.com/u/4960180?v=3","gravatar_id":"","url":"https://api.github.com/users/Jmeyer1292","html_url":"https://github.com/Jmeyer1292","followers_url":"https://api.github.com/users/Jmeyer1292/followers","following_url":"https://api.github.com/users/Jmeyer1292/following{/other_user}","gists_url":"https://api.github.com/users/Jmeyer1292/gists{/gist_id}","starred_url":"https://api.github.com/users/Jmeyer1292/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jmeyer1292/subscriptions","organizations_url":"https://api.github.com/users/Jmeyer1292/orgs","repos_url":"https://api.github.com/users/Jmeyer1292/repos","events_url":"https://api.github.com/users/Jmeyer1292/events{/privacy}","received_events_url":"https://api.github.com/users/Jmeyer1292/received_events","type":"User","site_admin":false},"repo":{"id":30308164,"name":"godel","full_name":"Jmeyer1292/godel","owner":{"login":"Jmeyer1292","id":4960180,"avatar_url":"https://avatars.githubusercontent.com/u/4960180?v=3","gravatar_id":"","url":"https://api.github.com/users/Jmeyer1292","html_url":"https://github.com/Jmeyer1292","followers_url":"https://api.github.com/users/Jmeyer1292/followers","following_url":"https://api.github.com/users/Jmeyer1292/following{/other_user}","gists_url":"https://api.github.com/users/Jmeyer1292/gists{/gist_id}","starred_url":"https://api.github.com/users/Jmeyer1292/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jmeyer1292/subscriptions","organizations_url":"https://api.github.com/users/Jmeyer1292/orgs","repos_url":"https://api.github.com/users/Jmeyer1292/repos","events_url":"https://api.github.com/users/Jmeyer1292/events{/privacy}","received_events_url":"https://api.github.com/users/Jmeyer1292/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Jmeyer1292/godel","description":"ROS-Industrial Focused Technical Project: Robotic Blending","fork":true,"url":"https://api.github.com/repos/Jmeyer1292/godel","forks_url":"https://api.github.com/repos/Jmeyer1292/godel/forks","keys_url":"https://api.github.com/repos/Jmeyer1292/godel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Jmeyer1292/godel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Jmeyer1292/godel/teams","hooks_url":"https://api.github.com/repos/Jmeyer1292/godel/hooks","issue_events_url":"https://api.github.com/repos/Jmeyer1292/godel/issues/events{/number}","events_url":"https://api.github.com/repos/Jmeyer1292/godel/events","assignees_url":"https://api.github.com/repos/Jmeyer1292/godel/assignees{/user}","branches_url":"https://api.github.com/repos/Jmeyer1292/godel/branches{/branch}","tags_url":"https://api.github.com/repos/Jmeyer1292/godel/tags","blobs_url":"https://api.github.com/repos/Jmeyer1292/godel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Jmeyer1292/godel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Jmeyer1292/godel/git/refs{/sha}","trees_url":"https://api.github.com/repos/Jmeyer1292/godel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Jmeyer1292/godel/statuses/{sha}","languages_url":"https://api.github.com/repos/Jmeyer1292/godel/languages","stargazers_url":"https://api.github.com/repos/Jmeyer1292/godel/stargazers","contributors_url":"https://api.github.com/repos/Jmeyer1292/godel/contributors","subscribers_url":"https://api.github.com/repos/Jmeyer1292/godel/subscribers","subscription_url":"https://api.github.com/repos/Jmeyer1292/godel/subscription","commits_url":"https://api.github.com/repos/Jmeyer1292/godel/commits{/sha}","git_commits_url":"https://api.github.com/repos/Jmeyer1292/godel/git/commits{/sha}","comments_url":"https://api.github.com/repos/Jmeyer1292/godel/comments{/number}","issue_comment_url":"https://api.github.com/repos/Jmeyer1292/godel/issues/comments{/number}","contents_url":"https://api.github.com/repos/Jmeyer1292/godel/contents/{+path}","compare_url":"https://api.github.com/repos/Jmeyer1292/godel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Jmeyer1292/godel/merges","archive_url":"https://api.github.com/repos/Jmeyer1292/godel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Jmeyer1292/godel/downloads","issues_url":"https://api.github.com/repos/Jmeyer1292/godel/issues{/number}","pulls_url":"https://api.github.com/repos/Jmeyer1292/godel/pulls{/number}","milestones_url":"https://api.github.com/repos/Jmeyer1292/godel/milestones{/number}","notifications_url":"https://api.github.com/repos/Jmeyer1292/godel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Jmeyer1292/godel/labels{/name}","releases_url":"https://api.github.com/repos/Jmeyer1292/godel/releases{/id}","created_at":"2015-02-04T16:20:33Z","updated_at":"2015-03-30T19:19:02Z","pushed_at":"2015-06-03T18:17:40Z","git_url":"git://github.com/Jmeyer1292/godel.git","ssh_url":"git@github.com:Jmeyer1292/godel.git","clone_url":"https://github.com/Jmeyer1292/godel.git","svn_url":"https://github.com/Jmeyer1292/godel","homepage":"","size":15932,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"hydro-devel"}},"base":{"label":"ros-industrial-consortium:hydro-devel","ref":"hydro-devel","sha":"43ff64fcb5286e082641717654e541451662b446","user":{"login":"ros-industrial-consortium","id":6336074,"avatar_url":"https://avatars.githubusercontent.com/u/6336074?v=3","gravatar_id":"","url":"https://api.github.com/users/ros-industrial-consortium","html_url":"https://github.com/ros-industrial-consortium","followers_url":"https://api.github.com/users/ros-industrial-consortium/followers","following_url":"https://api.github.com/users/ros-industrial-consortium/following{/other_user}","gists_url":"https://api.github.com/users/ros-industrial-consortium/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-industrial-consortium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-industrial-consortium/subscriptions","organizations_url":"https://api.github.com/users/ros-industrial-consortium/orgs","repos_url":"https://api.github.com/users/ros-industrial-consortium/repos","events_url":"https://api.github.com/users/ros-industrial-consortium/events{/privacy}","received_events_url":"https://api.github.com/users/ros-industrial-consortium/received_events","type":"Organization","site_admin":false},"repo":{"id":17028696,"name":"godel","full_name":"ros-industrial-consortium/godel","owner":{"login":"ros-industrial-consortium","id":6336074,"avatar_url":"https://avatars.githubusercontent.com/u/6336074?v=3","gravatar_id":"","url":"https://api.github.com/users/ros-industrial-consortium","html_url":"https://github.com/ros-industrial-consortium","followers_url":"https://api.github.com/users/ros-industrial-consortium/followers","following_url":"https://api.github.com/users/ros-industrial-consortium/following{/other_user}","gists_url":"https://api.github.com/users/ros-industrial-consortium/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-industrial-consortium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-industrial-consortium/subscriptions","organizations_url":"https://api.github.com/users/ros-industrial-consortium/orgs","repos_url":"https://api.github.com/users/ros-industrial-consortium/repos","events_url":"https://api.github.com/users/ros-industrial-consortium/events{/privacy}","received_events_url":"https://api.github.com/users/ros-industrial-consortium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros-industrial-consortium/godel","description":"ROS-Industrial Focused Technical Project: Robotic Blending","fork":false,"url":"https://api.github.com/repos/ros-industrial-consortium/godel","forks_url":"https://api.github.com/repos/ros-industrial-consortium/godel/forks","keys_url":"https://api.github.com/repos/ros-industrial-consortium/godel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros-industrial-consortium/godel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros-industrial-consortium/godel/teams","hooks_url":"https://api.github.com/repos/ros-industrial-consortium/godel/hooks","issue_events_url":"https://api.github.com/repos/ros-industrial-consortium/godel/issues/events{/number}","events_url":"https://api.github.com/repos/ros-industrial-consortium/godel/events","assignees_url":"https://api.github.com/repos/ros-industrial-consortium/godel/assignees{/user}","branches_url":"https://api.github.com/repos/ros-industrial-consortium/godel/branches{/branch}","tags_url":"https://api.github.com/repos/ros-industrial-consortium/godel/tags","blobs_url":"https://api.github.com/repos/ros-industrial-consortium/godel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros-industrial-consortium/godel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros-industrial-consortium/godel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros-industrial-consortium/godel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros-industrial-consortium/godel/statuses/{sha}","languages_url":"https://api.github.com/repos/ros-industrial-consortium/godel/languages","stargazers_url":"https://api.github.com/repos/ros-industrial-consortium/godel/stargazers","contributors_url":"https://api.github.com/repos/ros-industrial-consortium/godel/contributors","subscribers_url":"https://api.github.com/repos/ros-industrial-consortium/godel/subscribers","subscription_url":"https://api.github.com/repos/ros-industrial-consortium/godel/subscription","commits_url":"https://api.github.com/repos/ros-industrial-consortium/godel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros-industrial-consortium/godel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros-industrial-consortium/godel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros-industrial-consortium/godel/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros-industrial-consortium/godel/contents/{+path}","compare_url":"https://api.github.com/repos/ros-industrial-consortium/godel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros-industrial-consortium/godel/merges","archive_url":"https://api.github.com/repos/ros-industrial-consortium/godel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros-industrial-consortium/godel/downloads","issues_url":"https://api.github.com/repos/ros-industrial-consortium/godel/issues{/number}","pulls_url":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls{/number}","milestones_url":"https://api.github.com/repos/ros-industrial-consortium/godel/milestones{/number}","notifications_url":"https://api.github.com/repos/ros-industrial-consortium/godel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros-industrial-consortium/godel/labels{/name}","releases_url":"https://api.github.com/repos/ros-industrial-consortium/godel/releases{/id}","created_at":"2014-02-20T17:20:25Z","updated_at":"2015-05-20T22:32:21Z","pushed_at":"2015-06-03T18:17:41Z","git_url":"git://github.com/ros-industrial-consortium/godel.git","ssh_url":"git@github.com:ros-industrial-consortium/godel.git","clone_url":"https://github.com/ros-industrial-consortium/godel.git","svn_url":"https://github.com/ros-industrial-consortium/godel","homepage":"","size":16505,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":12,"forks":7,"open_issues":12,"watchers":1,"default_branch":"hydro-devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/61"},"html":{"href":"https://github.com/ros-industrial-consortium/godel/pull/61"},"issue":{"href":"https://api.github.com/repos/ros-industrial-consortium/godel/issues/61"},"comments":{"href":"https://api.github.com/repos/ros-industrial-consortium/godel/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros-industrial-consortium/godel/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/ros-industrial-consortium/godel/statuses/70cf3b850f1e267a7c34ece2910f9fb8ab7f5116"}}}}