{"action":"created","comment":{"url":"https://api.github.com/repos/ethz-asl/voxblox/pulls/comments/147565157","pull_request_review_id":72682226,"id":147565157,"diff_hunk":"@@ -208,6 +208,93 @@ inline float TsdfIntegratorBase::getVoxelWeight(const Point& point_C) const {\n   return 0.0f;\n }\n \n+void SimpleTsdfIntegrator::fillSphereAroundPoint(const Point& center,\n+                                                 FloatingPoint radius,\n+                                                 FloatingPoint weight) const {\n+  // search a cube with side length 2*radius\n+  for (FloatingPoint x = -radius; x <= radius; x += voxel_size_) {\n+    for (FloatingPoint y = -radius; y <= radius; y += voxel_size_) {\n+      for (FloatingPoint z = -radius; z <= radius; z += voxel_size_) {\n+        Point point(x, y, z);\n+\n+        // check if point is inside the spheres radius\n+        FloatingPoint radius_squared_norm = radius * radius;\n+        if (point.squaredNorm() <= radius_squared_norm) {\n+          // convert to global coordinate\n+          point += center;\n+\n+          Block<TsdfVoxel>::Ptr block_ptr =\n+              layer_->allocateBlockPtrByCoordinates(point);\n+          VoxelIndex voxel_index =\n+              block_ptr->computeVoxelIndexFromCoordinates(point);\n+          TsdfVoxel& voxel = block_ptr->getVoxelByVoxelIndex(voxel_index);\n+          Point voxel_center =\n+              block_ptr->computeCoordinatesFromVoxelIndex(voxel_index);\n+\n+          Point voxel_center_vec = voxel_center - point;\n+\n+          // how far is voxel from center of filled sphere\n+          FloatingPoint new_distance = sqrt(voxel_center_vec.squaredNorm());\n+\n+          if ((voxel.distance == 0) || (new_distance < voxel.distance)) {\n+            voxel.distance = new_distance;\n+            voxel.weight = weight;\n+            block_ptr->updated() = true;\n+            block_ptr->has_data() = true;\n+          }\n+        }\n+      }\n+    }\n+  }\n+}\n+\n+// TODO(mereweth@jpl.nasa.gov) - make a version of this that only allocates or\n+// increases the free radius\n+void SimpleTsdfIntegrator::clearSphereAroundPoint(const Point& center,\n+                                                  FloatingPoint radius,\n+                                                  FloatingPoint weight) const {\n+  // search a cube with side length 2*radius\n+  for (FloatingPoint x = -radius; x <= radius; x += voxel_size_) {\n+    for (FloatingPoint y = -radius; y <= radius; y += voxel_size_) {\n+      for (FloatingPoint z = -radius; z <= radius; z += voxel_size_) {\n+        Point point(x, y, z);\n+\n+        // check if point is inside the spheres radius\n+        FloatingPoint radius_squared_norm = radius * radius;\n+        if (point.squaredNorm() <= radius_squared_norm) {\n+          // convert to global coordinate\n+          point += center;\n+\n+          Block<TsdfVoxel>::Ptr block_ptr =\n+              layer_->allocateBlockPtrByCoordinates(point);\n+          VoxelIndex voxel_index =\n+              block_ptr->computeVoxelIndexFromCoordinates(point);\n+          TsdfVoxel& voxel = block_ptr->getVoxelByVoxelIndex(voxel_index);\n+          Point voxel_center =\n+              block_ptr->computeCoordinatesFromVoxelIndex(voxel_index);\n+\n+          Point voxel_center_vec = voxel_center - point;\n+          /* TODO(mereweth@jpl.nasa.gov) - depending on the minimum distance for\n+           * TSDF voxels to be considered fixed, this may effectively fix voxels\n+           * near the edge of the free spheres. How to handle this?\n+           */\n+\n+          // how far is voxel from edge of free sphere\n+          FloatingPoint new_distance =\n+              sqrt(radius_squared_norm) - sqrt(voxel_center_vec.squaredNorm());\n+\n+          if (new_distance > voxel.distance) {","path":"voxblox/src/integrator/tsdf_integrator.cc","position":79,"original_position":79,"commit_id":"a3c832ae6d724f0ea2aeffceec8cdc37c5b596dd","original_commit_id":"a3c832ae6d724f0ea2aeffceec8cdc37c5b596dd","user":{"login":"genemerewether","id":8856777,"avatar_url":"https://avatars0.githubusercontent.com/u/8856777?v=4","gravatar_id":"","url":"https://api.github.com/users/genemerewether","html_url":"https://github.com/genemerewether","followers_url":"https://api.github.com/users/genemerewether/followers","following_url":"https://api.github.com/users/genemerewether/following{/other_user}","gists_url":"https://api.github.com/users/genemerewether/gists{/gist_id}","starred_url":"https://api.github.com/users/genemerewether/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genemerewether/subscriptions","organizations_url":"https://api.github.com/users/genemerewether/orgs","repos_url":"https://api.github.com/users/genemerewether/repos","events_url":"https://api.github.com/users/genemerewether/events{/privacy}","received_events_url":"https://api.github.com/users/genemerewether/received_events","type":"User","site_admin":false},"body":"sounds good!","created_at":"2017-10-28T21:39:29Z","updated_at":"2017-10-28T21:39:29Z","html_url":"https://github.com/ethz-asl/voxblox/pull/118#discussion_r147565157","pull_request_url":"https://api.github.com/repos/ethz-asl/voxblox/pulls/118","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ethz-asl/voxblox/pulls/comments/147565157"},"html":{"href":"https://github.com/ethz-asl/voxblox/pull/118#discussion_r147565157"},"pull_request":{"href":"https://api.github.com/repos/ethz-asl/voxblox/pulls/118"}},"in_reply_to_id":146188940},"pull_request":{"url":"https://api.github.com/repos/ethz-asl/voxblox/pulls/118","id":145755476,"html_url":"https://github.com/ethz-asl/voxblox/pull/118","diff_url":"https://github.com/ethz-asl/voxblox/pull/118.diff","patch_url":"https://github.com/ethz-asl/voxblox/pull/118.patch","issue_url":"https://api.github.com/repos/ethz-asl/voxblox/issues/118","number":118,"state":"open","locked":false,"title":"Add additional Python utility bindings","user":{"login":"genemerewether","id":8856777,"avatar_url":"https://avatars0.githubusercontent.com/u/8856777?v=4","gravatar_id":"","url":"https://api.github.com/users/genemerewether","html_url":"https://github.com/genemerewether","followers_url":"https://api.github.com/users/genemerewether/followers","following_url":"https://api.github.com/users/genemerewether/following{/other_user}","gists_url":"https://api.github.com/users/genemerewether/gists{/gist_id}","starred_url":"https://api.github.com/users/genemerewether/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genemerewether/subscriptions","organizations_url":"https://api.github.com/users/genemerewether/orgs","repos_url":"https://api.github.com/users/genemerewether/repos","events_url":"https://api.github.com/users/genemerewether/events{/privacy}","received_events_url":"https://api.github.com/users/genemerewether/received_events","type":"User","site_admin":false},"body":"Hi Helen/all,\r\n\r\nThis is continuing on from https://github.com/ethz-asl/voxblox/pull/81\r\n\r\nWe have restructured the Python bindings, and added additional Python utility functions. The added use cases involve manual editing of a TSDF structure recorded using Tango, and then processing of that TSDF into an ESDF for offline planning.","created_at":"2017-10-10T17:34:47Z","updated_at":"2017-10-28T21:39:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"baaa1c9bd5b4465c94cbb1ea58682ffea335be13","assignee":null,"assignees":[],"requested_reviewers":[{"login":"helenol","id":5616392,"avatar_url":"https://avatars3.githubusercontent.com/u/5616392?v=4","gravatar_id":"","url":"https://api.github.com/users/helenol","html_url":"https://github.com/helenol","followers_url":"https://api.github.com/users/helenol/followers","following_url":"https://api.github.com/users/helenol/following{/other_user}","gists_url":"https://api.github.com/users/helenol/gists{/gist_id}","starred_url":"https://api.github.com/users/helenol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helenol/subscriptions","organizations_url":"https://api.github.com/users/helenol/orgs","repos_url":"https://api.github.com/users/helenol/repos","events_url":"https://api.github.com/users/helenol/events{/privacy}","received_events_url":"https://api.github.com/users/helenol/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ethz-asl/voxblox/pulls/118/commits","review_comments_url":"https://api.github.com/repos/ethz-asl/voxblox/pulls/118/comments","review_comment_url":"https://api.github.com/repos/ethz-asl/voxblox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethz-asl/voxblox/issues/118/comments","statuses_url":"https://api.github.com/repos/ethz-asl/voxblox/statuses/a3c832ae6d724f0ea2aeffceec8cdc37c5b596dd","head":{"label":"genemerewether:jpldev/integrate_upstream_2017_09_24","ref":"jpldev/integrate_upstream_2017_09_24","sha":"a3c832ae6d724f0ea2aeffceec8cdc37c5b596dd","user":{"login":"genemerewether","id":8856777,"avatar_url":"https://avatars0.githubusercontent.com/u/8856777?v=4","gravatar_id":"","url":"https://api.github.com/users/genemerewether","html_url":"https://github.com/genemerewether","followers_url":"https://api.github.com/users/genemerewether/followers","following_url":"https://api.github.com/users/genemerewether/following{/other_user}","gists_url":"https://api.github.com/users/genemerewether/gists{/gist_id}","starred_url":"https://api.github.com/users/genemerewether/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genemerewether/subscriptions","organizations_url":"https://api.github.com/users/genemerewether/orgs","repos_url":"https://api.github.com/users/genemerewether/repos","events_url":"https://api.github.com/users/genemerewether/events{/privacy}","received_events_url":"https://api.github.com/users/genemerewether/received_events","type":"User","site_admin":false},"repo":{"id":96648826,"name":"voxblox","full_name":"genemerewether/voxblox","owner":{"login":"genemerewether","id":8856777,"avatar_url":"https://avatars0.githubusercontent.com/u/8856777?v=4","gravatar_id":"","url":"https://api.github.com/users/genemerewether","html_url":"https://github.com/genemerewether","followers_url":"https://api.github.com/users/genemerewether/followers","following_url":"https://api.github.com/users/genemerewether/following{/other_user}","gists_url":"https://api.github.com/users/genemerewether/gists{/gist_id}","starred_url":"https://api.github.com/users/genemerewether/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genemerewether/subscriptions","organizations_url":"https://api.github.com/users/genemerewether/orgs","repos_url":"https://api.github.com/users/genemerewether/repos","events_url":"https://api.github.com/users/genemerewether/events{/privacy}","received_events_url":"https://api.github.com/users/genemerewether/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/genemerewether/voxblox","description":"A library for flexible voxel-based mapping, mainly focusing on truncated and Euclidean signed distance fields.","fork":true,"url":"https://api.github.com/repos/genemerewether/voxblox","forks_url":"https://api.github.com/repos/genemerewether/voxblox/forks","keys_url":"https://api.github.com/repos/genemerewether/voxblox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/genemerewether/voxblox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/genemerewether/voxblox/teams","hooks_url":"https://api.github.com/repos/genemerewether/voxblox/hooks","issue_events_url":"https://api.github.com/repos/genemerewether/voxblox/issues/events{/number}","events_url":"https://api.github.com/repos/genemerewether/voxblox/events","assignees_url":"https://api.github.com/repos/genemerewether/voxblox/assignees{/user}","branches_url":"https://api.github.com/repos/genemerewether/voxblox/branches{/branch}","tags_url":"https://api.github.com/repos/genemerewether/voxblox/tags","blobs_url":"https://api.github.com/repos/genemerewether/voxblox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/genemerewether/voxblox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/genemerewether/voxblox/git/refs{/sha}","trees_url":"https://api.github.com/repos/genemerewether/voxblox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/genemerewether/voxblox/statuses/{sha}","languages_url":"https://api.github.com/repos/genemerewether/voxblox/languages","stargazers_url":"https://api.github.com/repos/genemerewether/voxblox/stargazers","contributors_url":"https://api.github.com/repos/genemerewether/voxblox/contributors","subscribers_url":"https://api.github.com/repos/genemerewether/voxblox/subscribers","subscription_url":"https://api.github.com/repos/genemerewether/voxblox/subscription","commits_url":"https://api.github.com/repos/genemerewether/voxblox/commits{/sha}","git_commits_url":"https://api.github.com/repos/genemerewether/voxblox/git/commits{/sha}","comments_url":"https://api.github.com/repos/genemerewether/voxblox/comments{/number}","issue_comment_url":"https://api.github.com/repos/genemerewether/voxblox/issues/comments{/number}","contents_url":"https://api.github.com/repos/genemerewether/voxblox/contents/{+path}","compare_url":"https://api.github.com/repos/genemerewether/voxblox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/genemerewether/voxblox/merges","archive_url":"https://api.github.com/repos/genemerewether/voxblox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/genemerewether/voxblox/downloads","issues_url":"https://api.github.com/repos/genemerewether/voxblox/issues{/number}","pulls_url":"https://api.github.com/repos/genemerewether/voxblox/pulls{/number}","milestones_url":"https://api.github.com/repos/genemerewether/voxblox/milestones{/number}","notifications_url":"https://api.github.com/repos/genemerewether/voxblox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/genemerewether/voxblox/labels{/name}","releases_url":"https://api.github.com/repos/genemerewether/voxblox/releases{/id}","deployments_url":"https://api.github.com/repos/genemerewether/voxblox/deployments","created_at":"2017-07-08T23:06:26Z","updated_at":"2017-07-08T23:06:27Z","pushed_at":"2017-10-18T14:46:56Z","git_url":"git://github.com/genemerewether/voxblox.git","ssh_url":"git@github.com:genemerewether/voxblox.git","clone_url":"https://github.com/genemerewether/voxblox.git","svn_url":"https://github.com/genemerewether/voxblox","homepage":"","size":79155,"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,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ethz-asl:master","ref":"master","sha":"a29e72bca5462d1ea40594e79c392ea07a4a9cd5","user":{"login":"ethz-asl","id":475362,"avatar_url":"https://avatars0.githubusercontent.com/u/475362?v=4","gravatar_id":"","url":"https://api.github.com/users/ethz-asl","html_url":"https://github.com/ethz-asl","followers_url":"https://api.github.com/users/ethz-asl/followers","following_url":"https://api.github.com/users/ethz-asl/following{/other_user}","gists_url":"https://api.github.com/users/ethz-asl/gists{/gist_id}","starred_url":"https://api.github.com/users/ethz-asl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethz-asl/subscriptions","organizations_url":"https://api.github.com/users/ethz-asl/orgs","repos_url":"https://api.github.com/users/ethz-asl/repos","events_url":"https://api.github.com/users/ethz-asl/events{/privacy}","received_events_url":"https://api.github.com/users/ethz-asl/received_events","type":"Organization","site_admin":false},"repo":{"id":56137228,"name":"voxblox","full_name":"ethz-asl/voxblox","owner":{"login":"ethz-asl","id":475362,"avatar_url":"https://avatars0.githubusercontent.com/u/475362?v=4","gravatar_id":"","url":"https://api.github.com/users/ethz-asl","html_url":"https://github.com/ethz-asl","followers_url":"https://api.github.com/users/ethz-asl/followers","following_url":"https://api.github.com/users/ethz-asl/following{/other_user}","gists_url":"https://api.github.com/users/ethz-asl/gists{/gist_id}","starred_url":"https://api.github.com/users/ethz-asl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethz-asl/subscriptions","organizations_url":"https://api.github.com/users/ethz-asl/orgs","repos_url":"https://api.github.com/users/ethz-asl/repos","events_url":"https://api.github.com/users/ethz-asl/events{/privacy}","received_events_url":"https://api.github.com/users/ethz-asl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethz-asl/voxblox","description":"A library for flexible voxel-based mapping, mainly focusing on truncated and Euclidean signed distance fields.","fork":false,"url":"https://api.github.com/repos/ethz-asl/voxblox","forks_url":"https://api.github.com/repos/ethz-asl/voxblox/forks","keys_url":"https://api.github.com/repos/ethz-asl/voxblox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethz-asl/voxblox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethz-asl/voxblox/teams","hooks_url":"https://api.github.com/repos/ethz-asl/voxblox/hooks","issue_events_url":"https://api.github.com/repos/ethz-asl/voxblox/issues/events{/number}","events_url":"https://api.github.com/repos/ethz-asl/voxblox/events","assignees_url":"https://api.github.com/repos/ethz-asl/voxblox/assignees{/user}","branches_url":"https://api.github.com/repos/ethz-asl/voxblox/branches{/branch}","tags_url":"https://api.github.com/repos/ethz-asl/voxblox/tags","blobs_url":"https://api.github.com/repos/ethz-asl/voxblox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethz-asl/voxblox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethz-asl/voxblox/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethz-asl/voxblox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethz-asl/voxblox/statuses/{sha}","languages_url":"https://api.github.com/repos/ethz-asl/voxblox/languages","stargazers_url":"https://api.github.com/repos/ethz-asl/voxblox/stargazers","contributors_url":"https://api.github.com/repos/ethz-asl/voxblox/contributors","subscribers_url":"https://api.github.com/repos/ethz-asl/voxblox/subscribers","subscription_url":"https://api.github.com/repos/ethz-asl/voxblox/subscription","commits_url":"https://api.github.com/repos/ethz-asl/voxblox/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethz-asl/voxblox/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethz-asl/voxblox/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethz-asl/voxblox/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethz-asl/voxblox/contents/{+path}","compare_url":"https://api.github.com/repos/ethz-asl/voxblox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethz-asl/voxblox/merges","archive_url":"https://api.github.com/repos/ethz-asl/voxblox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethz-asl/voxblox/downloads","issues_url":"https://api.github.com/repos/ethz-asl/voxblox/issues{/number}","pulls_url":"https://api.github.com/repos/ethz-asl/voxblox/pulls{/number}","milestones_url":"https://api.github.com/repos/ethz-asl/voxblox/milestones{/number}","notifications_url":"https://api.github.com/repos/ethz-asl/voxblox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethz-asl/voxblox/labels{/name}","releases_url":"https://api.github.com/repos/ethz-asl/voxblox/releases{/id}","deployments_url":"https://api.github.com/repos/ethz-asl/voxblox/deployments","created_at":"2016-04-13T09:07:07Z","updated_at":"2017-10-24T17:31:17Z","pushed_at":"2017-10-24T11:30:24Z","git_url":"git://github.com/ethz-asl/voxblox.git","ssh_url":"git@github.com:ethz-asl/voxblox.git","clone_url":"https://github.com/ethz-asl/voxblox.git","svn_url":"https://github.com/ethz-asl/voxblox","homepage":"","size":79103,"stargazers_count":31,"watchers_count":31,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":13,"forks":13,"open_issues":13,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethz-asl/voxblox/pulls/118"},"html":{"href":"https://github.com/ethz-asl/voxblox/pull/118"},"issue":{"href":"https://api.github.com/repos/ethz-asl/voxblox/issues/118"},"comments":{"href":"https://api.github.com/repos/ethz-asl/voxblox/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/ethz-asl/voxblox/pulls/118/comments"},"review_comment":{"href":"https://api.github.com/repos/ethz-asl/voxblox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethz-asl/voxblox/pulls/118/commits"},"statuses":{"href":"https://api.github.com/repos/ethz-asl/voxblox/statuses/a3c832ae6d724f0ea2aeffceec8cdc37c5b596dd"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"genemerewether"}}