kopia lustrzana https://github.com/OpenDroneMap/ODM
pyodm version fixed, skip merge point cloud on failure
rodzic
83edf2d45b
commit
b0480ae156
|
@ -75,7 +75,8 @@ RUN pip install -U \
|
||||||
shapely \
|
shapely \
|
||||||
xmltodict \
|
xmltodict \
|
||||||
rasterio \
|
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/install/lib/python2.7/dist-packages"
|
||||||
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
||||||
|
|
|
@ -79,7 +79,8 @@ install() {
|
||||||
loky \
|
loky \
|
||||||
repoze.lru \
|
repoze.lru \
|
||||||
rasterio \
|
rasterio \
|
||||||
attrs==19.1.0
|
attrs==19.1.0 \
|
||||||
|
pyodm==1.5.0
|
||||||
|
|
||||||
echo "Installing OpenDroneMap Dependencies"
|
echo "Installing OpenDroneMap Dependencies"
|
||||||
apt-get install -y -qq python-scipy \
|
apt-get install -y -qq python-scipy \
|
||||||
|
|
|
@ -1,17 +1,33 @@
|
||||||
from opendm import log
|
from opendm import log
|
||||||
|
from pyodm import Node, exceptions
|
||||||
|
|
||||||
class HybridDistributedExecutor:
|
class HybridDistributedExecutor:
|
||||||
def __init__(self, nodeUrl):
|
def __init__(self, nodeUrl):
|
||||||
self.nodeUrl = nodeUrl
|
self.node = Node.from_url(nodeUrl)
|
||||||
log.ODM_INFO("Initializing hybrid distributed executor with cluster node: %s" % 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):
|
def set_projects(self, paths):
|
||||||
self.project_paths = paths
|
self.project_paths = paths
|
||||||
|
|
||||||
def run_reconstruct(self):
|
def run_reconstruction(self):
|
||||||
print(self.project_paths)
|
if not self.project_paths:
|
||||||
exit(1)
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def run_toolchain(self):
|
def run_toolchain(self):
|
||||||
pass
|
if not self.project_paths:
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,8 @@ RUN pip install -U \
|
||||||
shapely \
|
shapely \
|
||||||
xmltodict \
|
xmltodict \
|
||||||
rasterio \
|
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/install/lib/python2.7/dist-packages"
|
||||||
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
||||||
|
|
|
@ -165,7 +165,11 @@ class ODMMergeStage(types.ODM_Stage):
|
||||||
if args.merge in ['all', 'pointcloud']:
|
if args.merge in ['all', 'pointcloud']:
|
||||||
if not io.file_exists(tree.odm_georeferencing_model_laz) or self.rerun():
|
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")
|
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:
|
else:
|
||||||
log.ODM_WARNING("Found merged point cloud in %s" % tree.odm_georeferencing_model_laz)
|
log.ODM_WARNING("Found merged point cloud in %s" % tree.odm_georeferencing_model_laz)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue