2015-08-20 19:16:25 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
2015-12-22 12:29:13 +00:00
|
|
|
from opendm import log
|
|
|
|
from opendm import config
|
|
|
|
from opendm import system
|
2015-08-27 12:59:35 +00:00
|
|
|
|
|
|
|
import sys
|
2015-11-26 12:15:02 +00:00
|
|
|
import ecto
|
2015-08-27 12:59:35 +00:00
|
|
|
|
2015-11-26 12:15:02 +00:00
|
|
|
from scripts.odm_app import ODMApp
|
2015-08-27 14:29:54 +00:00
|
|
|
|
2015-11-20 10:00:43 +00:00
|
|
|
def usage():
|
2015-11-26 12:15:02 +00:00
|
|
|
log.ODM_ERROR('USAGE: %s --project-path [project_path]' % sys.argv[0])
|
2015-11-20 10:00:43 +00:00
|
|
|
log.ODM_ERROR('OpenDroneMap app finished - %s' % system.now())
|
|
|
|
sys.exit(0)
|
|
|
|
|
2015-08-27 12:59:35 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
|
2015-11-20 10:00:43 +00:00
|
|
|
log.ODM_INFO('Initializing OpenDroneMap app - %s' % system.now())
|
2015-08-27 17:03:38 +00:00
|
|
|
|
2015-11-20 10:00:43 +00:00
|
|
|
# Force to provide the images path
|
2015-11-26 12:15:02 +00:00
|
|
|
if config.args.get('project_path') is None:
|
2015-11-20 10:00:43 +00:00
|
|
|
usage()
|
2015-08-27 12:59:35 +00:00
|
|
|
|
2015-11-26 12:15:02 +00:00
|
|
|
# create an instance of my App BlackBox
|
2015-11-20 10:00:43 +00:00
|
|
|
# internally configure all tasks
|
2015-11-30 15:50:51 +00:00
|
|
|
app = ODMApp(args=config.args)
|
2015-11-16 22:18:53 +00:00
|
|
|
|
2015-11-26 12:15:02 +00:00
|
|
|
# create a plasm that only contains the BlackBox
|
|
|
|
plasm = ecto.Plasm()
|
|
|
|
plasm.insert(app)
|
2015-08-27 12:59:35 +00:00
|
|
|
|
2015-11-26 12:15:02 +00:00
|
|
|
# execute the plasm
|
|
|
|
plasm.execute(niter=1)
|
2015-08-27 12:59:35 +00:00
|
|
|
|
2016-02-19 16:27:17 +00:00
|
|
|
log.ODM_INFO('OpenDroneMap app finished - %s' % system.now())
|