Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor modifications to the code #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion digiforest_analysis/src/digiforest_analysis/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,17 @@ def load_cloud(self, filename):
assert len(self._cloud.point.positions) > 0

# Compute normals if not available
if not hasattr(self._cloud.point, "normals"):
try:
if not hasattr(self._cloud.point, "normals"):
print("No normals found in cloud, computing...", end="")
self._cloud.estimate_normals()
print("done")
except KeyError:
print("No normals found in cloud, computing...", end="")
self._cloud.estimate_normals()
print("done")
except Exception as e:
print("The following error occurred: " + str(e))

def setup_output(self, output_dir):
self._output_dir = Path(output_dir)
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ shapely
pyyaml
ipympl
open3d>=0.17.0
pytest
pytest
hdbscan