#mobilerobotics project ##Example-Car Factory
This repository has multiple nested Git submodules
, so the cloning procedure is slightly more complex than usual. To clone the entirety of the repository:
git clone https://github.com/RaghavM11/LIMap-Extension.git
cd LIMap-Extension/
git submodule update --init --recursive
There's multiple ways to install this correctly, but Dylan likes pipenv
and it seems to work okay for him.
Tested on:
- Ubuntu 20.04
- CMake version 3.17
The process is:
While it is not perfect by any means, we have attempted to write a comprehensive installation script. This script:
- Verifies that your
cmake
version is compatible with LIMap - Recursively updates the submodules in case you forgot to do so in Cloning the Repo
- Attempts to find
colmap
andPoseLib
via CMake, though this is easily the most brittle of the steps. - Checks
apt
dependencies are installed for LIMap- The script does not download these so as to preserve the system's state.
- Installs
asdf
for downloading Python executables for virtual environments - Installs
pipenv
for Python virtual environment management (a personal favorite of Dylan's) - Installs the
pipenv
environment Dylan used for the project- This:
- installs Python 3.9 via
asdf
- installs all LIMap Python dependencies
- installs LIMap
- installs Python 3.9 via
- This:
- Finally, this script overrides a file in one of the third-party directories.
- This is likely due to LIMap not specifying a version requirement for Hierarchical-Localization, as they updated to using
pathlib.Path
instead ofos.path
among other syntactic changes.
- This is likely due to LIMap not specifying a version requirement for Hierarchical-Localization, as they updated to using
- Follow LIMAP installation (apt packages included), up to the point where you need to start installing Python dependencies (minus opencv).
- This includes installing colmap, building poselib, etc.
- Don't install torch or torchvision yet but do apt-install opencv libraries and such.
- Make sure your cmake is 3.17 or greater, I downloaded 3.17 and prepended the binary's parent path to my
PATH
variable.- THIS IS CRUCIAL!
- This includes installing colmap, building poselib, etc.
- Install pipenv with
pip install pipenv
- In the LIMap-Extension directory, create pipenv environment with
pipenv install --python 3.9 --site-packages
- If you do not have Python 3.9 and don't have certain packages necessary to fetch new Python versions, you'll get an error. Just follow the instructions in the error to install packages for fixing this.
- Install pytorch and torchvision with
pipenv install torch==1.13.1 torchvision==0.14.1 --index https://download.pytorch.org/whl/cu116
- Install limap dependencies. It is very important that this is done from the LIMap-Extension directory and not the limap sub-directory.
pipenv install -r ./limap/requirements.txt
- Install limap
pipenv install -vv -e ./limap
- Attempt to run a job. If the job fails due to not being able to find a third party library that LIMap uses, do the following:
pipenv install -vv -e ./limap/third-party/[THIRD PARTY PACKAGE THAT WASN'T FOUND]
- Setup Conda env. (should have miniconda installed)
conda create -n myenv python=3.9
- Activate conda
conda activate myenv
- Install dependecies in conda env following Via Installation Script (mentioned above) --Change CUDA version to 11.8 [if using 12]
- install package
python -m pip install -Ive ./limap
- To double check if the package is successfully installed:
python -c "import limap"
- For above example the files can be found here
##todo script Downloader script for sample dataset uploaded to drive (small, ~100 images)
python limap/runners/hypersim/fitnmerge.py --output_dir limap/outputs/quickstart_fitnmerge
python limap/visualize_3d_lines.py --input_dir outputs/quickstart_triangulation/finaltracks \
# add the camera frustums with "--imagecols outputs/quickstart_triangulation/imagecols.npy"
python limap/runners/tests/localization.py --data limap/runners/tests/data/localization/localization_test_data_stairs_1.npy