pyodm version fixed, skip merge point cloud on failure

pull/979/head
Piero Toffanin 2019-05-06 14:17:23 -04:00
rodzic 83edf2d45b
commit b0480ae156
5 zmienionych plików z 34 dodań i 11 usunięć

Wyświetl plik

@ -75,7 +75,8 @@ RUN pip install -U \
shapely \
xmltodict \
rasterio \
attrs==19.1.0
attrs==19.1.0 \
pyodm==1.5.0
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"

Wyświetl plik

@ -79,7 +79,8 @@ install() {
loky \
repoze.lru \
rasterio \
attrs==19.1.0
attrs==19.1.0 \
pyodm==1.5.0
echo "Installing OpenDroneMap Dependencies"
apt-get install -y -qq python-scipy \

Wyświetl plik

@ -1,17 +1,33 @@
from opendm import log
from pyodm import Node, exceptions
class HybridDistributedExecutor:
def __init__(self, nodeUrl):
self.nodeUrl = nodeUrl
log.ODM_INFO("Initializing hybrid distributed executor with cluster node: %s" % nodeUrl)
self.node = Node.from_url(nodeUrl)
log.ODM_INFO("Initializing hybrid distributed executor using cluster node %s" % nodeUrl)
try:
odm_version = self.node.info().odm_version
log.ODM_INFO("Node is online and running ODM version: %s" % odm_version)
except exceptions.NodeConnectionError:
log.ODM_WARNING("The node seems to be offline! We'll still process the dataset, but it's going to run entirely locally.")
except Exception as e:
log.ODM_ERROR("An unexpected problem happened while opening the node connection: %s" % str(e))
exit(1)
def set_projects(self, paths):
self.project_paths = paths
def run_reconstruct(self):
print(self.project_paths)
exit(1)
def run_reconstruction(self):
if not self.project_paths:
return
def run_toolchain(self):
pass
if not self.project_paths:
return

Wyświetl plik

@ -75,7 +75,8 @@ RUN pip install -U \
shapely \
xmltodict \
rasterio \
attrs==19.1.0
attrs==19.1.0 \
pyodm==1.5.0
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"

Wyświetl plik

@ -165,7 +165,11 @@ class ODMMergeStage(types.ODM_Stage):
if args.merge in ['all', 'pointcloud']:
if not io.file_exists(tree.odm_georeferencing_model_laz) or self.rerun():
all_point_clouds = get_submodel_paths(tree.submodels_path, "odm_georeferencing", "odm_georeferenced_model.laz")
pdal.merge_point_clouds(all_point_clouds, tree.odm_georeferencing_model_laz, args.verbose)
try:
pdal.merge_point_clouds(all_point_clouds, tree.odm_georeferencing_model_laz, args.verbose)
except Exception as e:
log.ODM_WARNING("Could not merge point cloud: %s (skipping)" % str(e))
else:
log.ODM_WARNING("Found merged point cloud in %s" % tree.odm_georeferencing_model_laz)