Commit Graph

69 Commits (4c44ddc4e67e409a25d20f96e76c2cf7f8e5060a)

Author SHA1 Message Date
Chris Beall 4c44ddc4e6 Print all python-related dependency warnings at the end of cmake output with all the other warnings. Don't automatically toggle GTSAM_BUILD_PYTHON option to OFF - this is more consistent with how other options are handled. 2016-01-21 01:13:22 -05:00
dellaert c77997fbb1 Fixed typo 2016-01-19 23:18:39 -08:00
cbeall3 31888d653c Remove CMake option to use 3rdparty numpy C-API 2016-01-19 14:45:34 -05:00
Ellon Mendes 4f4d7c2af5 Add value_exists() and calculate_pose3_estimate to ISAM2 in python 2015-12-11 18:20:33 +01:00
Ellon Mendes 383986902a Add quaternion() method, use properly quaternion named constructor, and add some comments on RzRyRx 2015-12-11 18:19:05 +01:00
Ellon Mendes 868f1511fc Add Quaternion named constructor to Rot3 in the python module 2015-12-08 14:31:24 +01:00
Ellon Mendes 46178731c6 "cmake -E copy_if_different" -> "cmake -E copy" for .py files
"cmake -E copy" is enough because it checks the timestamp to decide if it the
copy should be made or not.
2015-12-03 13:01:19 +01:00
Ellon Mendes 31a88ba910 Remove some variables to improve readbility 2015-12-02 15:29:07 +01:00
Ellon Mendes 87211319fb Update python/README.md 2015-12-02 14:35:51 +01:00
Ellon Mendes 4f509c2dff Improve printing when copying .py files 2015-12-02 14:15:10 +01:00
Ellon Mendes 81a1fe1c3a Create a proper target to generate python/gtsam/_libgtsam_python.so in the build directory 2015-12-02 13:35:17 +01:00
Ellon Mendes 4671b03e74 Only copy .py files if they've changed 2015-12-02 13:35:17 +01:00
Ellon Mendes 768c594299 Copy python/gtsam to build/python directory
Not the best way since the gtsam module into build/python won't be updated if
.py files change in the python module.
2015-12-02 13:35:17 +01:00
Ellon Mendes 888af6b948 Remove unused lines that generate warnings on CMake 3.4 2015-12-02 13:35:17 +01:00
Ellon Mendes 2e4a96dc18 Do not store RPATH into _libgtsam_python.so
Since we're copying the .so from the build dir to python/gtsam _outside_ the
build dir, we should remove the rpath from the .so, so it will search the
library in the system, and not in the build directory, after installed using
setup.py
2015-12-02 13:35:17 +01:00
Ellon Mendes 57373c8c47 Wrap Cayley methods to python only if not using Quaternions 2015-12-02 13:35:17 +01:00
Ellon Mendes dfc15a2f17 Rename python module related cmake variables to improve readability 2015-12-02 13:35:17 +01:00
Ellon Mendes eb798f88fe Add NumPy C-API 1.8.2 to gtsam/3rdparty; Add option o use system or bundled one 2015-12-02 13:35:17 +01:00
Ellon Mendes 40a567c1ed Look for NumPy C-API if building the python module 2015-12-02 13:35:17 +01:00
Ellon Mendes d51c6f3313 Fix cmake to use default python and boost python versions 2015-12-02 13:35:17 +01:00
Ellon Mendes 09ec306013 Update __ini__.py to be supported in python 2 and 3 2015-12-02 13:35:17 +01:00
Ellon Mendes 72bcc4f08e Change VisualISAM2Example to work with python 2 and python 3 2015-12-02 13:35:17 +01:00
Ellon Mendes dfa2b53eeb import_array() --> import_array1() 2015-12-02 13:35:16 +01:00
Ellon Mendes 5b116a4a67 Add option to chose target python version to create module 2015-12-02 13:35:16 +01:00
Ellon Mendes ea6ecdd9d5 Move subdirlist macro to cmake/GtsamPythonWrap.cmake
Conflicts:
	cmake/GtsamPythonWrap.cmake
2015-12-02 13:35:16 +01:00
Ellon Mendes 4f98ec889c Fix python instalation using distutils
Conflicts:
	python/README.md
2015-12-02 13:35:16 +01:00
Ellon Mendes d3db7309bc Make libgtsam_python a hidden module by adding '_' before lib name 2015-12-02 13:35:16 +01:00
Ellon Mendes 8fa1acc553 Move plot functions to a submodule utils 2015-12-02 13:35:16 +01:00
Ellon Mendes 4f37929d80 Add ploting to VisualISAM2Example.py 2015-12-02 13:35:16 +01:00
Ellon Mendes 46a1970731 Wrap KeyVector to python
While here, do small cleanup on exportgtsam.cpp
2015-12-02 13:35:16 +01:00
Ellon Mendes a6b48194fd Print result of example to console 2015-12-02 13:35:16 +01:00
Ellon Mendes 92bfcaa004 Wrap some properties of ISAM2Params to python 2015-12-02 13:35:16 +01:00
Ellon Mendes cba6085557 Add VisualISAM2Example. Still need to finish some details of the example 2015-12-02 13:35:16 +01:00
Ellon Mendes bc73a5132a Wrap few more missing methods on ISAM2 and NonlinearFactorGraph 2015-12-02 13:35:16 +01:00
Ellon Mendes 7576dc359d Wrap more methods of Pose3 to python 2015-12-02 13:35:16 +01:00
Ellon Mendes 8ae3dda6a6 Add helper functions to better handle gtsam.Symbol on python 2015-12-02 13:35:16 +01:00
Ellon Mendes 49d02c798f Wrap PinholeBaseK to python and declare it as parent of PinholeCamera 2015-12-02 13:35:16 +01:00
Ellon Mendes c878278687 Wrap GenericProjectionFactor to python 2015-12-02 13:35:16 +01:00
Ellon Mendes 6196f95301 Wrap Cal3_S2 to python 2015-12-02 13:35:16 +01:00
Ellon Mendes 818db17392 Wrap symbol to python 2015-12-02 13:35:16 +01:00
Ellon Mendes 982d81e1c9 Add python version of SFMdata as gtsam.examples submodule
The gtsam.examples submodule should be loaded explicitely:
>>> import gtsam.examples
2015-12-02 13:35:16 +01:00
Ellon Mendes 0e134c09db Wrap PinholeCameraCal3_S2 to python 2015-12-02 13:35:16 +01:00
Ellon Mendes ade8ab4053 Remove old files which content was was already moved to other src files 2015-12-02 13:35:16 +01:00
Ellon Mendes 05f6237f71 Define NO_IMPORT_ARRAY in all cpp files before including NumpyEigenConverter.hpp
This fixes the segmentation fault when converting numpy and Eigen.

The reason is that NumpyEigenConverter.hpp includes numpy/arrayobject.h, and for
the numpy's C-API to work in multiple files we need to define NO_IMPORT_ARRAY
before including numpy/arrayobject.h in all the source files but the one that
defines the module initialization (exportgtsam.cpp in out case), as explained
here:
http://docs.scipy.org/doc/numpy/reference/c-api.array.html#importing-the-api

Note that PY_ARRAY_UNIQUE_SYMBOL, also needed to work multifile, is already
defined on NumpyEigenConverter.hpp.
2015-12-02 13:35:15 +01:00
Ellon Mendes c140a784fe Add constness to matrices and vectors 2015-12-02 13:35:15 +01:00
Ellon Mendes d76ed71c99 Move my developments to the handwritten structure of files that existed before
There's a problem with numpy_eigen causing a segmentation fault.
2015-12-02 13:35:15 +01:00
Ellon Mendes ffae37a675 Revert python module to use old handwritten files
Just noticed several handwritten files here. I'm reverting the python module to
use these handwritten files to later add the files I was wrapping to the same
framework.

Classes from geometry were wrapped for an old C++ interface, so several
boost python's .def(...) were commented out.

Conflicts:
	python/gtsam/.gitignore
2015-12-02 13:35:15 +01:00
Ellon Mendes 7680b533ac Wrap basic functions of NonlinearFactorGraph and ISAM2
While here, change method names for python convention on PEP0008
2015-12-02 13:35:15 +01:00
Ellon Mendes b10f7386c5 Wrap prior factors 2015-12-02 13:35:15 +01:00
Ellon Mendes 72a800f70f Add inheritance to from NonlinearFactor to BetweenFactor.
Nonlinear factor is pure virtual, so we need to declare a wrapper, even
if we don't export anything from it.

Also, we don't make explicit all the chain of inheritance from BetweenFactor,
since it looks like exporting inheritance directly from NonlinearFactor allows
adding it to NonlinearFactorGraph.
2015-12-02 13:35:15 +01:00