{"action":"created","comment":{"url":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/comments/25863785","id":25863785,"diff_hunk":"@@ -0,0 +1,61 @@\n+#include \"k2_client.h\"\n+#include <pcl_ros/point_cloud.h>\n+#include <pcl/point_types.h>\n+using namespace std;\n+\n+typedef pcl::PointCloud<pcl::PointXYZ> PointCloud;\n+\n+int pointBufferSize = 2605056;\n+int streamSize = pointBufferSize + sizeof(double);\n+std::string cameraName = \"depth\";\n+std::string imageTopicSubName = \"image_raw\";\n+std::string cameraInfoSubName = \"camera_info\";\n+\n+int main(int argC,char **argV)\n+{\n+\tros::init(argC,argV,\"startPointCloud\");\n+\tros::NodeHandle n;\n+\t\n+\tstd::string serverAddress;\n+\tn.getParam(\"/serverNameOrIP\",serverAddress);\n+\tSocket mySocket(serverAddress.c_str(),\"9005\",streamSize);\n+\t\n+\tros::Publisher pub = n.advertise<PointCloud>(\"point_cloud\",1);\n+    \n+    PointCloud::Ptr pc (new PointCloud);\n+    \n+    pc->header.frame_id =  ros::this_node::getNamespace().substr(1,std::string::npos) + \"/kinect_pcl\"; \n+\twhile(ros::ok())","path":"src/ros/k2_client/src/k2_client/startPointCloud.cpp","position":28,"original_position":28,"commit_id":"1fb31d3523fbabc66f38c8959a3c2ea3512725d5","original_commit_id":"1fb31d3523fbabc66f38c8959a3c2ea3512725d5","user":{"login":"rjw57","id":146860,"avatar_url":"https://avatars.githubusercontent.com/u/146860?v=3","gravatar_id":"","url":"https://api.github.com/users/rjw57","html_url":"https://github.com/rjw57","followers_url":"https://api.github.com/users/rjw57/followers","following_url":"https://api.github.com/users/rjw57/following{/other_user}","gists_url":"https://api.github.com/users/rjw57/gists{/gist_id}","starred_url":"https://api.github.com/users/rjw57/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjw57/subscriptions","organizations_url":"https://api.github.com/users/rjw57/orgs","repos_url":"https://api.github.com/users/rjw57/repos","events_url":"https://api.github.com/users/rjw57/events{/privacy}","received_events_url":"https://api.github.com/users/rjw57/received_events","type":"User","site_admin":false},"body":"There's some inconsistent indentation here.","created_at":"2015-03-05T13:47:00Z","updated_at":"2015-03-05T13:47:00Z","html_url":"https://github.com/sigproc/robotic_surgery/pull/37#discussion_r25863785","pull_request_url":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/comments/25863785"},"html":{"href":"https://github.com/sigproc/robotic_surgery/pull/37#discussion_r25863785"},"pull_request":{"href":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/37","id":30547553,"html_url":"https://github.com/sigproc/robotic_surgery/pull/37","diff_url":"https://github.com/sigproc/robotic_surgery/pull/37.diff","patch_url":"https://github.com/sigproc/robotic_surgery/pull/37.patch","issue_url":"https://api.github.com/repos/sigproc/robotic_surgery/issues/37","number":37,"state":"open","locked":false,"title":"Stream point cloud","user":{"login":"Somahtr","id":4833079,"avatar_url":"https://avatars.githubusercontent.com/u/4833079?v=3","gravatar_id":"","url":"https://api.github.com/users/Somahtr","html_url":"https://github.com/Somahtr","followers_url":"https://api.github.com/users/Somahtr/followers","following_url":"https://api.github.com/users/Somahtr/following{/other_user}","gists_url":"https://api.github.com/users/Somahtr/gists{/gist_id}","starred_url":"https://api.github.com/users/Somahtr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Somahtr/subscriptions","organizations_url":"https://api.github.com/users/Somahtr/orgs","repos_url":"https://api.github.com/users/Somahtr/repos","events_url":"https://api.github.com/users/Somahtr/events{/privacy}","received_events_url":"https://api.github.com/users/Somahtr/received_events","type":"User","site_admin":false},"body":"Updated the Kinect 2 Client to stream point cloud data directly over the network.\r\n\r\nThe PR adds a new node \"startPointCloud\" which is launched and run in the same way as the other nodes in the K2_client package. The node accepts a bytestring from a network socket, deserializes it into a PCL PointXYZ point cloud, and then publishes to ros using the topic \"/head/kinect2/point_cloud\". ","created_at":"2015-03-05T11:00:29Z","updated_at":"2015-03-05T13:47:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc38b59a3747281a21f2a82533fa0681cb3b2d28","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/37/commits","review_comments_url":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/37/comments","review_comment_url":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sigproc/robotic_surgery/issues/37/comments","statuses_url":"https://api.github.com/repos/sigproc/robotic_surgery/statuses/1fb31d3523fbabc66f38c8959a3c2ea3512725d5","head":{"label":"Somahtr:stream-point-cloud","ref":"stream-point-cloud","sha":"1fb31d3523fbabc66f38c8959a3c2ea3512725d5","user":{"login":"Somahtr","id":4833079,"avatar_url":"https://avatars.githubusercontent.com/u/4833079?v=3","gravatar_id":"","url":"https://api.github.com/users/Somahtr","html_url":"https://github.com/Somahtr","followers_url":"https://api.github.com/users/Somahtr/followers","following_url":"https://api.github.com/users/Somahtr/following{/other_user}","gists_url":"https://api.github.com/users/Somahtr/gists{/gist_id}","starred_url":"https://api.github.com/users/Somahtr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Somahtr/subscriptions","organizations_url":"https://api.github.com/users/Somahtr/orgs","repos_url":"https://api.github.com/users/Somahtr/repos","events_url":"https://api.github.com/users/Somahtr/events{/privacy}","received_events_url":"https://api.github.com/users/Somahtr/received_events","type":"User","site_admin":false},"repo":{"id":24646142,"name":"robotic_surgery","full_name":"Somahtr/robotic_surgery","owner":{"login":"Somahtr","id":4833079,"avatar_url":"https://avatars.githubusercontent.com/u/4833079?v=3","gravatar_id":"","url":"https://api.github.com/users/Somahtr","html_url":"https://github.com/Somahtr","followers_url":"https://api.github.com/users/Somahtr/followers","following_url":"https://api.github.com/users/Somahtr/following{/other_user}","gists_url":"https://api.github.com/users/Somahtr/gists{/gist_id}","starred_url":"https://api.github.com/users/Somahtr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Somahtr/subscriptions","organizations_url":"https://api.github.com/users/Somahtr/orgs","repos_url":"https://api.github.com/users/Somahtr/repos","events_url":"https://api.github.com/users/Somahtr/events{/privacy}","received_events_url":"https://api.github.com/users/Somahtr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Somahtr/robotic_surgery","description":"Repository for the 2014 MEng robotic surgery project","fork":true,"url":"https://api.github.com/repos/Somahtr/robotic_surgery","forks_url":"https://api.github.com/repos/Somahtr/robotic_surgery/forks","keys_url":"https://api.github.com/repos/Somahtr/robotic_surgery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Somahtr/robotic_surgery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Somahtr/robotic_surgery/teams","hooks_url":"https://api.github.com/repos/Somahtr/robotic_surgery/hooks","issue_events_url":"https://api.github.com/repos/Somahtr/robotic_surgery/issues/events{/number}","events_url":"https://api.github.com/repos/Somahtr/robotic_surgery/events","assignees_url":"https://api.github.com/repos/Somahtr/robotic_surgery/assignees{/user}","branches_url":"https://api.github.com/repos/Somahtr/robotic_surgery/branches{/branch}","tags_url":"https://api.github.com/repos/Somahtr/robotic_surgery/tags","blobs_url":"https://api.github.com/repos/Somahtr/robotic_surgery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Somahtr/robotic_surgery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Somahtr/robotic_surgery/git/refs{/sha}","trees_url":"https://api.github.com/repos/Somahtr/robotic_surgery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Somahtr/robotic_surgery/statuses/{sha}","languages_url":"https://api.github.com/repos/Somahtr/robotic_surgery/languages","stargazers_url":"https://api.github.com/repos/Somahtr/robotic_surgery/stargazers","contributors_url":"https://api.github.com/repos/Somahtr/robotic_surgery/contributors","subscribers_url":"https://api.github.com/repos/Somahtr/robotic_surgery/subscribers","subscription_url":"https://api.github.com/repos/Somahtr/robotic_surgery/subscription","commits_url":"https://api.github.com/repos/Somahtr/robotic_surgery/commits{/sha}","git_commits_url":"https://api.github.com/repos/Somahtr/robotic_surgery/git/commits{/sha}","comments_url":"https://api.github.com/repos/Somahtr/robotic_surgery/comments{/number}","issue_comment_url":"https://api.github.com/repos/Somahtr/robotic_surgery/issues/comments{/number}","contents_url":"https://api.github.com/repos/Somahtr/robotic_surgery/contents/{+path}","compare_url":"https://api.github.com/repos/Somahtr/robotic_surgery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Somahtr/robotic_surgery/merges","archive_url":"https://api.github.com/repos/Somahtr/robotic_surgery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Somahtr/robotic_surgery/downloads","issues_url":"https://api.github.com/repos/Somahtr/robotic_surgery/issues{/number}","pulls_url":"https://api.github.com/repos/Somahtr/robotic_surgery/pulls{/number}","milestones_url":"https://api.github.com/repos/Somahtr/robotic_surgery/milestones{/number}","notifications_url":"https://api.github.com/repos/Somahtr/robotic_surgery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Somahtr/robotic_surgery/labels{/name}","releases_url":"https://api.github.com/repos/Somahtr/robotic_surgery/releases{/id}","created_at":"2014-09-30T16:36:40Z","updated_at":"2014-10-30T17:47:01Z","pushed_at":"2015-03-05T10:55:43Z","git_url":"git://github.com/Somahtr/robotic_surgery.git","ssh_url":"git@github.com:Somahtr/robotic_surgery.git","clone_url":"https://github.com/Somahtr/robotic_surgery.git","svn_url":"https://github.com/Somahtr/robotic_surgery","homepage":null,"size":36610,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"sigproc:master","ref":"master","sha":"276d45b838f685ac1a32923f9dada6edb67641cd","user":{"login":"sigproc","id":5550983,"avatar_url":"https://avatars.githubusercontent.com/u/5550983?v=3","gravatar_id":"","url":"https://api.github.com/users/sigproc","html_url":"https://github.com/sigproc","followers_url":"https://api.github.com/users/sigproc/followers","following_url":"https://api.github.com/users/sigproc/following{/other_user}","gists_url":"https://api.github.com/users/sigproc/gists{/gist_id}","starred_url":"https://api.github.com/users/sigproc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigproc/subscriptions","organizations_url":"https://api.github.com/users/sigproc/orgs","repos_url":"https://api.github.com/users/sigproc/repos","events_url":"https://api.github.com/users/sigproc/events{/privacy}","received_events_url":"https://api.github.com/users/sigproc/received_events","type":"Organization","site_admin":false},"repo":{"id":21064669,"name":"robotic_surgery","full_name":"sigproc/robotic_surgery","owner":{"login":"sigproc","id":5550983,"avatar_url":"https://avatars.githubusercontent.com/u/5550983?v=3","gravatar_id":"","url":"https://api.github.com/users/sigproc","html_url":"https://github.com/sigproc","followers_url":"https://api.github.com/users/sigproc/followers","following_url":"https://api.github.com/users/sigproc/following{/other_user}","gists_url":"https://api.github.com/users/sigproc/gists{/gist_id}","starred_url":"https://api.github.com/users/sigproc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigproc/subscriptions","organizations_url":"https://api.github.com/users/sigproc/orgs","repos_url":"https://api.github.com/users/sigproc/repos","events_url":"https://api.github.com/users/sigproc/events{/privacy}","received_events_url":"https://api.github.com/users/sigproc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sigproc/robotic_surgery","description":"Repository for the 2014 MEng robotic surgery project","fork":false,"url":"https://api.github.com/repos/sigproc/robotic_surgery","forks_url":"https://api.github.com/repos/sigproc/robotic_surgery/forks","keys_url":"https://api.github.com/repos/sigproc/robotic_surgery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sigproc/robotic_surgery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sigproc/robotic_surgery/teams","hooks_url":"https://api.github.com/repos/sigproc/robotic_surgery/hooks","issue_events_url":"https://api.github.com/repos/sigproc/robotic_surgery/issues/events{/number}","events_url":"https://api.github.com/repos/sigproc/robotic_surgery/events","assignees_url":"https://api.github.com/repos/sigproc/robotic_surgery/assignees{/user}","branches_url":"https://api.github.com/repos/sigproc/robotic_surgery/branches{/branch}","tags_url":"https://api.github.com/repos/sigproc/robotic_surgery/tags","blobs_url":"https://api.github.com/repos/sigproc/robotic_surgery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sigproc/robotic_surgery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sigproc/robotic_surgery/git/refs{/sha}","trees_url":"https://api.github.com/repos/sigproc/robotic_surgery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sigproc/robotic_surgery/statuses/{sha}","languages_url":"https://api.github.com/repos/sigproc/robotic_surgery/languages","stargazers_url":"https://api.github.com/repos/sigproc/robotic_surgery/stargazers","contributors_url":"https://api.github.com/repos/sigproc/robotic_surgery/contributors","subscribers_url":"https://api.github.com/repos/sigproc/robotic_surgery/subscribers","subscription_url":"https://api.github.com/repos/sigproc/robotic_surgery/subscription","commits_url":"https://api.github.com/repos/sigproc/robotic_surgery/commits{/sha}","git_commits_url":"https://api.github.com/repos/sigproc/robotic_surgery/git/commits{/sha}","comments_url":"https://api.github.com/repos/sigproc/robotic_surgery/comments{/number}","issue_comment_url":"https://api.github.com/repos/sigproc/robotic_surgery/issues/comments{/number}","contents_url":"https://api.github.com/repos/sigproc/robotic_surgery/contents/{+path}","compare_url":"https://api.github.com/repos/sigproc/robotic_surgery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sigproc/robotic_surgery/merges","archive_url":"https://api.github.com/repos/sigproc/robotic_surgery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sigproc/robotic_surgery/downloads","issues_url":"https://api.github.com/repos/sigproc/robotic_surgery/issues{/number}","pulls_url":"https://api.github.com/repos/sigproc/robotic_surgery/pulls{/number}","milestones_url":"https://api.github.com/repos/sigproc/robotic_surgery/milestones{/number}","notifications_url":"https://api.github.com/repos/sigproc/robotic_surgery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sigproc/robotic_surgery/labels{/name}","releases_url":"https://api.github.com/repos/sigproc/robotic_surgery/releases{/id}","created_at":"2014-06-21T09:09:19Z","updated_at":"2015-03-04T14:44:45Z","pushed_at":"2015-03-04T14:44:44Z","git_url":"git://github.com/sigproc/robotic_surgery.git","ssh_url":"git@github.com:sigproc/robotic_surgery.git","clone_url":"https://github.com/sigproc/robotic_surgery.git","svn_url":"https://github.com/sigproc/robotic_surgery","homepage":null,"size":45557,"stargazers_count":2,"watchers_count":2,"language":"Python","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":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/37"},"html":{"href":"https://github.com/sigproc/robotic_surgery/pull/37"},"issue":{"href":"https://api.github.com/repos/sigproc/robotic_surgery/issues/37"},"comments":{"href":"https://api.github.com/repos/sigproc/robotic_surgery/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sigproc/robotic_surgery/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/sigproc/robotic_surgery/statuses/1fb31d3523fbabc66f38c8959a3c2ea3512725d5"}}}}