You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/tutorials.rst
+93Lines changed: 93 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -981,3 +981,96 @@ Port 3000 is ClusterODM's proxy. This is the place we assign tasks to ClusterODM
981
981
:align:center
982
982
983
983
After adding images in this browser, you can press Start Task and see ClusterODM assigning tasks to the nodes you have wired to. Go for a walk and check the progress.
984
+
985
+
Development and testing of ODM
986
+
==============================
987
+
988
+
Development and testing of code changes can be difficult. The simplest way to do so is modify the code and rebuild docker images from source, much as documented in the `README for the ODM repository <https://github.com/OpenDroneMap/ODM?tab=readme-ov-file#build-docker-images-from-source>`_.
989
+
990
+
However, having to do a full docker rebuild for each change is time consuming and wasteful. What might be better is to have a dedicated, long running node that allows us to test out changes in near real time.
991
+
992
+
#. Fork and clone repository
993
+
#. Set up local NodeODM docker instance
994
+
#. Modify code
995
+
#. Connect to NodeODM instance
996
+
#. Install and use changes
997
+
998
+
Fork and clone repository
999
+
-------------------------
1000
+
1001
+
First, let's fork the ODM repo, and checkout a new branch locally that will function as our development branch.
1002
+
1003
+
::
1004
+
1005
+
git checkout -b my_clever_new_change
1006
+
# Switched to a new branch 'my_clever_new_change'
1007
+
1008
+
Set up local NodeODM docker instance
1009
+
------------------------------------
1010
+
1011
+
Next, we will set up a NodeODM instance with a locally mounted volume that points to our development branch of ODM
1012
+
1013
+
::
1014
+
1015
+
docker run -d --restart unless-stopped -p 3000:3000 -v /path/to/cloned/ODM/repository/data:/code opendronemap/nodeodm
1016
+
1017
+
Modify code
1018
+
-----------
1019
+
1020
+
For our test today, we will attempt to upgrade Ceres Solver to version 2.2.0. Most external libraries like Ceres can be found in the Superbuild directory. In this case we edit SuperBuild/cmake/External-Ceres.cmake, and set it to use version 2.2.0
1021
+
1022
+
.. figure:: images/vimdiff_ceres_change.png
1023
+
1024
+
Now that we've made that small, but substantive change, we need to rebuild Ceres on the docker image for testing.
1025
+
1026
+
1027
+
Connect to NodeODM instance
1028
+
---------------------------
1029
+
1030
+
Let us find out our container name, in case we forgot:
1031
+
1032
+
::
1033
+
1034
+
docker ps
1035
+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1036
+
c997a4c5611b opendronemap/nodeodm "/usr/bin/node /var/…" 2 minutes ago Up 2 minutes 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp affectionate_yalow
1037
+
1038
+
Now that we know the container name, we will connect to that instance using docker exec as follows:
1039
+
1040
+
::
1041
+
1042
+
docker exec -it affectionate_yalow bash
1043
+
1044
+
Install and use changes
1045
+
-----------------------
1046
+
1047
+
Let us get the environment prepared for our testing:
Success! Now we can either run ODM directly inside this container, use the NodeODM interface to process data, or connect in with WebODM for additional testing.
0 commit comments