Ames Stereo Pipeline is an open source collection of tools for building 3D models from NASA’s planetary satellites. Our software is able to do this by depending on USGS’s ISIS for all the camera models. That saves me a lot of time because I no longer have to program up custom models for all the many cameras that are out there (MOC, HiRISE, MDIS, LROC, ISS, and etc ). The downside is that building ISIS is next to impossible as they expect you to use their binary releases. This means that to compile against their binaries, we must recreate their development environment, down to every third party library.
There are some base tools that you need installed on your Ubuntu Box.
sudo apt-get install g++ gfortran libtool autoconf \ automake ccache git-core subversion cmake chrpath \ xserver-xorg-dev xorg-dev libx11-dev libgl1-mesa-dev \ libglu1-mesa-dev libglut3-dev
Building an ISIS environment is incredibly difficult to do by hand. Never-mind the difficulty in sanitizing the bash shell so that it doesn’t find libraries in odd places. So a co-worker of mine created an awesome collection of scripts to make this easier. It’s called Binary Builder and it’s available on Github. The commands below checkout the scripts from Github and then run them. What BB is doing in this first step is downloading and compiling all of the dependencies of Vision Workbench and Ames Stereo Pipeline. This means we’re building Boost, GDAL, Zip, OpenSceneGraph, LAPACK, and many others. As you can imagine, this step takes a long time.
cd ~; mkdir projects; cd projects git clone https://github.com/NeoGeographyToolkit/BinaryBuilder.git cd BinaryBuilder ./build.py --dev-env
Most likely things will die at this point. Here is where your bearded powers are to be applied! Good luck. When you fix the bug or think you’ve worked it out. You should use the following command to quickly restart.
./build.py --dev-env --resume
You’ll know you’ve had a completely successful ./build.py session when it prints “All done!” and gives you a list of the environmental variables used. Next, let’s clean up by making a BaseSystem tarball.
./make-dist.py --include all --set-name BaseSystem last-completed-run/install
This tarball will house all the headers, libraries, and a copy of ISIS that you need to proceed. It will be your lighthouse when everything else fails. You can also share this tarball with other users who have similar systems. Anyways, it’s time to deploy this BaseSystem tarball into a permanent position.
mkdir ~/projects/base_system ./deploy-base.py BaseSystem-*.tar.gz ~/projects/base_system
Installing Vision Workbench
You’re ready for step 2. This is all pretty straight forward. However you should notice that the deploy-base script produced config.options for both Vision Workbench and Stereo Pipeline. A config.options script is just another way to feed the arguments to ./configure. When we install Vision Workbench, the base options in config.options.vw should be fine for us.
cd ~/projects git clone https://github.com/visionworkbench/visionworkbench.git cd visionworkbench cp ~/projects/base_system/config.options.vw config.options ./autogen && ./configure make -j <N Processors> make install make check -j <N Processors>
All unit tests should pass at this point. If not, bearded you knows what to do.
Installing Ames Stereo Pipeline
cd ~/projects git clone https://github.com/NeoGeographyToolkit/StereoPipeline.git cd StereoPipeline cp ~/projects/base_system/config.options.asp config.options
We’re going to take a moment to deviate here. At this point you will need to make some modifications to your copy of ‘config.options’ for Ames Stereo Pipeline. You need to modify the variable ‘VW’ to be equal to the install (prefix) path that you used. In this example, it should be set to ‘~/projects/visionworkbench/build’. You can also take this time to flip other bits that you find interesting. For example, there’s a ENABLE_MODULE_CONTROLNETTK variable that you can set equal to ‘yes’ which would enable prototype utilities to manipulate control networks. Once you’re done playing around, finish your build of ASP.
cd ~/projects/StereoPipeline ./autogen && ./configure make -j <N processors> make install
You can also run ‘make check’, you just need to have your ISIS3DATA set up. You can fall back to your own install of ISIS and everything should work fine. If it wasn’t clear before, you’ll find the executables in “~/projects/visionworkbench/build/bin” and “~/projects/StereoPipeline/build/bin”. That’s all folks, I hope everything worked out okay.