{"action":"created","comment":{"url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/comments/70091471","id":70091471,"diff_hunk":"@@ -0,0 +1,142 @@\n+#include <ros/ros.h>\n+\n+#include \"map_creator/capability.h\"\n+\n+\n+#include \"H5Cpp.h\"\n+#include <hdf5.h>\n+\n+using namespace H5;\n+using namespace std;\n+\n+#define CAP_DATASETNAME \"capability_dataset\"\n+#define CAP_GROUPNAME \"/Capability\"\n+#define RANK_OUT 2\n+\n+class loadHD5{\n+public:\n+\n+void h5ToMultiMapCap(const hid_t dataset, multimap<vector<double>, vector<double> >& sphereColor){\n+\n+    hsize_t dims_out[2], count[2], offset[2], dimsm[2];\n+    hid_t dataspace = H5Dget_space (dataset);    /* dataspace handle */\n+    int rank      = H5Sget_simple_extent_ndims (dataspace);\n+    herr_t status_n  = H5Sget_simple_extent_dims (dataspace, dims_out, NULL);\n+    herr_t status;\n+    offset[0] = 0;\n+    offset[1] = 0;\n+    count[0]  = dims_out[0];\n+    count[1]  = 10;\n+    double data_out[count[0]][count[1]];\n+    status = H5Sselect_hyperslab (dataspace, H5S_SELECT_SET, offset, NULL, \n+                                  count, NULL);\n+    dimsm[0] = count[0];\n+    dimsm[1] =  count[1];\n+    hid_t memspace;\n+    memspace = H5Screate_simple (RANK_OUT, dimsm, NULL);  \n+    status = H5Dread (dataset, H5T_NATIVE_DOUBLE, memspace, dataspace,\n+                      H5P_DEFAULT, data_out);\n+    for(int i=0;i<count[0];i++){\n+\tvector<double> posAndQuat;\n+\tvector<double> enumRIAngle;\n+        for(int j=0;j<2;j++)\n+\t    {\n+\t\t enumRIAngle.push_back(data_out[i][j]);\n+\t    }\n+\tfor(int j=2;j<9;j++)\n+\t    {\n+\t\t posAndQuat.push_back(data_out[i][j]);\n+\t    }\n+        for(int j=9;j<10;j++)\n+\t    {\n+\t\t enumRIAngle.push_back(data_out[i][j]);\n+\t    }\n+        \n+        sphereColor.insert(pair<vector<double>, vector<double> >(posAndQuat, enumRIAngle));\n+    }\n+  }\n+};\n+\n+\n+int main(int argc, char **argv)\n+{\n+    if (argc<2){\n+\tROS_ERROR_STREAM(\"Please provide the name of the Capability map. If you have not created it yet, Please create the map by running the create cpability map launch file in map_creator\");\n+\treturn 1;\n+    } \n+    else{\n+\t\n+    ros::init(argc, argv, \"workspace\");\n+    ros::NodeHandle n;\n+    ros::Publisher workspace_pub = n.advertise<map_creator::capability>(\"capability_map\", 1);\n+    ros::Rate loop_rate(10);\n+  \n+    int count = 0;\n+    while (ros::ok())","path":"map_creator/src/load_capability_map.cpp","position":75,"original_position":75,"commit_id":"c1cba2e75c3bf6c3c5b20e862746879a6d507e74","original_commit_id":"c1cba2e75c3bf6c3c5b20e862746879a6d507e74","user":{"login":"akgoins","id":8662812,"avatar_url":"https://avatars.githubusercontent.com/u/8662812?v=3","gravatar_id":"","url":"https://api.github.com/users/akgoins","html_url":"https://github.com/akgoins","followers_url":"https://api.github.com/users/akgoins/followers","following_url":"https://api.github.com/users/akgoins/following{/other_user}","gists_url":"https://api.github.com/users/akgoins/gists{/gist_id}","starred_url":"https://api.github.com/users/akgoins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akgoins/subscriptions","organizations_url":"https://api.github.com/users/akgoins/orgs","repos_url":"https://api.github.com/users/akgoins/repos","events_url":"https://api.github.com/users/akgoins/events{/privacy}","received_events_url":"https://api.github.com/users/akgoins/received_events","type":"User","site_admin":false},"body":"Should the while loop be placed lower?  Do you need to regenerate the capability map every time?  It would probably be better to read the file, generate the map, then loop while publishing.  Even better, and more preferable, you can create a latched topic to publish to so that the data is always available and you only have to publish once (See section 1.2 [here](http://wiki.ros.org/roscpp/Overview/Publishers%20and%20Subscribers)).  Then your loop can simply contain a sleep until roscore is shutdown.","created_at":"2016-07-08T15:21:50Z","updated_at":"2016-07-08T15:21:50Z","html_url":"https://github.com/ros-industrial-consortium/reuleaux/pull/9#discussion_r70091471","pull_request_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/comments/70091471"},"html":{"href":"https://github.com/ros-industrial-consortium/reuleaux/pull/9#discussion_r70091471"},"pull_request":{"href":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/9","id":76708098,"html_url":"https://github.com/ros-industrial-consortium/reuleaux/pull/9","diff_url":"https://github.com/ros-industrial-consortium/reuleaux/pull/9.diff","patch_url":"https://github.com/ros-industrial-consortium/reuleaux/pull/9.patch","issue_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/9","number":9,"state":"open","locked":false,"title":"Visualization","user":{"login":"jontromanab","id":3790876,"avatar_url":"https://avatars.githubusercontent.com/u/3790876?v=3","gravatar_id":"","url":"https://api.github.com/users/jontromanab","html_url":"https://github.com/jontromanab","followers_url":"https://api.github.com/users/jontromanab/followers","following_url":"https://api.github.com/users/jontromanab/following{/other_user}","gists_url":"https://api.github.com/users/jontromanab/gists{/gist_id}","starred_url":"https://api.github.com/users/jontromanab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jontromanab/subscriptions","organizations_url":"https://api.github.com/users/jontromanab/orgs","repos_url":"https://api.github.com/users/jontromanab/repos","events_url":"https://api.github.com/users/jontromanab/events{/privacy}","received_events_url":"https://api.github.com/users/jontromanab/received_events","type":"User","site_admin":false},"body":"this branch creates and loades maps and visualizes them in RVIZ","created_at":"2016-07-08T06:41:36Z","updated_at":"2016-07-08T15:21:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29544a5e1bef725758645add175bbab9930f36df","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/9/commits","review_comments_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/9/comments","review_comment_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/9/comments","statuses_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/statuses/c1cba2e75c3bf6c3c5b20e862746879a6d507e74","head":{"label":"jontromanab:visualization","ref":"visualization","sha":"c1cba2e75c3bf6c3c5b20e862746879a6d507e74","user":{"login":"jontromanab","id":3790876,"avatar_url":"https://avatars.githubusercontent.com/u/3790876?v=3","gravatar_id":"","url":"https://api.github.com/users/jontromanab","html_url":"https://github.com/jontromanab","followers_url":"https://api.github.com/users/jontromanab/followers","following_url":"https://api.github.com/users/jontromanab/following{/other_user}","gists_url":"https://api.github.com/users/jontromanab/gists{/gist_id}","starred_url":"https://api.github.com/users/jontromanab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jontromanab/subscriptions","organizations_url":"https://api.github.com/users/jontromanab/orgs","repos_url":"https://api.github.com/users/jontromanab/repos","events_url":"https://api.github.com/users/jontromanab/events{/privacy}","received_events_url":"https://api.github.com/users/jontromanab/received_events","type":"User","site_admin":false},"repo":{"id":62863872,"name":"reuleaux","full_name":"jontromanab/reuleaux","owner":{"login":"jontromanab","id":3790876,"avatar_url":"https://avatars.githubusercontent.com/u/3790876?v=3","gravatar_id":"","url":"https://api.github.com/users/jontromanab","html_url":"https://github.com/jontromanab","followers_url":"https://api.github.com/users/jontromanab/followers","following_url":"https://api.github.com/users/jontromanab/following{/other_user}","gists_url":"https://api.github.com/users/jontromanab/gists{/gist_id}","starred_url":"https://api.github.com/users/jontromanab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jontromanab/subscriptions","organizations_url":"https://api.github.com/users/jontromanab/orgs","repos_url":"https://api.github.com/users/jontromanab/repos","events_url":"https://api.github.com/users/jontromanab/events{/privacy}","received_events_url":"https://api.github.com/users/jontromanab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jontromanab/reuleaux","description":"GSoC Project for robot reachability","fork":true,"url":"https://api.github.com/repos/jontromanab/reuleaux","forks_url":"https://api.github.com/repos/jontromanab/reuleaux/forks","keys_url":"https://api.github.com/repos/jontromanab/reuleaux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jontromanab/reuleaux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jontromanab/reuleaux/teams","hooks_url":"https://api.github.com/repos/jontromanab/reuleaux/hooks","issue_events_url":"https://api.github.com/repos/jontromanab/reuleaux/issues/events{/number}","events_url":"https://api.github.com/repos/jontromanab/reuleaux/events","assignees_url":"https://api.github.com/repos/jontromanab/reuleaux/assignees{/user}","branches_url":"https://api.github.com/repos/jontromanab/reuleaux/branches{/branch}","tags_url":"https://api.github.com/repos/jontromanab/reuleaux/tags","blobs_url":"https://api.github.com/repos/jontromanab/reuleaux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jontromanab/reuleaux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jontromanab/reuleaux/git/refs{/sha}","trees_url":"https://api.github.com/repos/jontromanab/reuleaux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jontromanab/reuleaux/statuses/{sha}","languages_url":"https://api.github.com/repos/jontromanab/reuleaux/languages","stargazers_url":"https://api.github.com/repos/jontromanab/reuleaux/stargazers","contributors_url":"https://api.github.com/repos/jontromanab/reuleaux/contributors","subscribers_url":"https://api.github.com/repos/jontromanab/reuleaux/subscribers","subscription_url":"https://api.github.com/repos/jontromanab/reuleaux/subscription","commits_url":"https://api.github.com/repos/jontromanab/reuleaux/commits{/sha}","git_commits_url":"https://api.github.com/repos/jontromanab/reuleaux/git/commits{/sha}","comments_url":"https://api.github.com/repos/jontromanab/reuleaux/comments{/number}","issue_comment_url":"https://api.github.com/repos/jontromanab/reuleaux/issues/comments{/number}","contents_url":"https://api.github.com/repos/jontromanab/reuleaux/contents/{+path}","compare_url":"https://api.github.com/repos/jontromanab/reuleaux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jontromanab/reuleaux/merges","archive_url":"https://api.github.com/repos/jontromanab/reuleaux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jontromanab/reuleaux/downloads","issues_url":"https://api.github.com/repos/jontromanab/reuleaux/issues{/number}","pulls_url":"https://api.github.com/repos/jontromanab/reuleaux/pulls{/number}","milestones_url":"https://api.github.com/repos/jontromanab/reuleaux/milestones{/number}","notifications_url":"https://api.github.com/repos/jontromanab/reuleaux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jontromanab/reuleaux/labels{/name}","releases_url":"https://api.github.com/repos/jontromanab/reuleaux/releases{/id}","deployments_url":"https://api.github.com/repos/jontromanab/reuleaux/deployments","created_at":"2016-07-08T06:19:47Z","updated_at":"2016-07-08T06:19:47Z","pushed_at":"2016-07-08T06:38:14Z","git_url":"git://github.com/jontromanab/reuleaux.git","ssh_url":"git@github.com:jontromanab/reuleaux.git","clone_url":"https://github.com/jontromanab/reuleaux.git","svn_url":"https://github.com/jontromanab/reuleaux","homepage":"","size":126,"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":"ros-industrial-consortium:master","ref":"master","sha":"ba080589162eb5dd7a816f87c7ecd1df020739a8","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":59767449,"name":"reuleaux","full_name":"ros-industrial-consortium/reuleaux","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/reuleaux","description":"GSoC Project for robot reachability","fork":false,"url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux","forks_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/forks","keys_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/teams","hooks_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/hooks","issue_events_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/events{/number}","events_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/events","assignees_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/assignees{/user}","branches_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/branches{/branch}","tags_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/tags","blobs_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/statuses/{sha}","languages_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/languages","stargazers_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/stargazers","contributors_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/contributors","subscribers_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/subscribers","subscription_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/subscription","commits_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/contents/{+path}","compare_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/merges","archive_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/downloads","issues_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues{/number}","pulls_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls{/number}","milestones_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/milestones{/number}","notifications_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/labels{/name}","releases_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/releases{/id}","deployments_url":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/deployments","created_at":"2016-05-26T16:48:40Z","updated_at":"2016-06-22T14:16:15Z","pushed_at":"2016-07-08T06:41:36Z","git_url":"git://github.com/ros-industrial-consortium/reuleaux.git","ssh_url":"git@github.com:ros-industrial-consortium/reuleaux.git","clone_url":"https://github.com/ros-industrial-consortium/reuleaux.git","svn_url":"https://github.com/ros-industrial-consortium/reuleaux","homepage":"","size":74,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/9"},"html":{"href":"https://github.com/ros-industrial-consortium/reuleaux/pull/9"},"issue":{"href":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/9"},"comments":{"href":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/ros-industrial-consortium/reuleaux/statuses/c1cba2e75c3bf6c3c5b20e862746879a6d507e74"}}}}
{"actor":{"display_login":"akgoins"}}