Project template using GTSAM + Python wrapping
-
Python 3.6+ is required, since we support these versions.
-
To install the wrap package via
GTSAM:-
Set the CMake flag
GTSAM_BUILD_PYTHONtoONto enable building the Pybind11 wrapper. -
Set the CMake flag
GTSAM_PYTHON_VERSIONto3.x(e.g.3.7), otherwise the default interpreter will be used. -
You can do this on the command line as follows:
cmake -DGTSAM_BUILD_PYTHON=ON -DGTSAM_PYTHON_VERSION=3.7 ..
-
-
Alternatively, you can install the wrap package directly from the repo, but you will still need to install
GTSAM.
- In the top-level directory, create the
builddirectory andcdinto it. - Run
cmake ... - Run
make, and the wrapped module will be installed to thepythondirectory in the top-level. - To install the wrapped module, simply run
make python-install. - You can also run
python main.pywhich calls the wrapped module, to get a flavor of how it works.
For more detailed information, please refer to the tutorial.