Merge pull request #1140 from borglab/fix/matlab-wrapper
commit
d0a1852c0f
|
@ -13,7 +13,7 @@ $ make install
|
|||
## Important Installation Notes
|
||||
|
||||
1. GTSAM requires the following libraries to be installed on your system:
|
||||
- BOOST version 1.65 or greater (install through Linux repositories or MacPorts). Please see [Boost Notes](#boost-notes).
|
||||
- BOOST version 1.65 or greater (install through Linux repositories or MacPorts). Please see [Boost Notes](#boost-notes) for version recommendations based on your compiler.
|
||||
|
||||
- Cmake version 3.0 or higher
|
||||
- Support for XCode 4.3 command line tools on Mac requires CMake 2.8.8 or higher
|
||||
|
@ -72,7 +72,7 @@ execute commands as follows for an out-of-source build:
|
|||
Versions of Boost prior to 1.65 have a known bug that prevents proper "deep" serialization of objects, which means that objects encapsulated inside other objects don't get serialized.
|
||||
This is particularly seen when using `clang` as the C++ compiler.
|
||||
|
||||
For this reason we require Boost>=1.65, and recommend installing it through alternative channels when it is not available through your operating system's primary package manager.
|
||||
For this reason we recommend Boost>=1.65, and recommend installing it through alternative channels when it is not available through your operating system's primary package manager.
|
||||
|
||||
## Known Issues
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class LevenbergMarquardtOptimizer;
|
|||
class GTSAM_EXPORT LevenbergMarquardtParams: public NonlinearOptimizerParams {
|
||||
|
||||
public:
|
||||
/** See LevenbergMarquardtParams::lmVerbosity */
|
||||
/** See LevenbergMarquardtParams::verbosityLM */
|
||||
enum VerbosityLM {
|
||||
SILENT = 0, SUMMARY, TERMINATION, LAMBDA, TRYLAMBDA, TRYCONFIG, DAMPED, TRYDELTA
|
||||
};
|
||||
|
|
|
@ -92,8 +92,8 @@ if(GTSAM_UNSTABLE_INSTALL_MATLAB_TOOLBOX)
|
|||
endif()
|
||||
|
||||
# Wrap
|
||||
matlab_wrap(${GTSAM_SOURCE_DIR}/gtsam_unstable/gtsam_unstable.i "gtsam" ""
|
||||
"${mexFlags}" "${ignore}")
|
||||
matlab_wrap(${GTSAM_SOURCE_DIR}/gtsam_unstable/gtsam_unstable.i "gtsam_unstable"
|
||||
"${GTSAM_ADDITIONAL_LIBRARIES}" "" "${mexFlags}" "${ignore}")
|
||||
endif(GTSAM_UNSTABLE_INSTALL_MATLAB_TOOLBOX)
|
||||
|
||||
# Record the root dir for gtsam - needed during external builds, e.g., ROS
|
||||
|
|
|
@ -412,7 +412,7 @@ class PybindWrapper:
|
|||
|
||||
def wrap_instantiated_declaration(
|
||||
self, instantiated_decl: instantiator.InstantiatedDeclaration):
|
||||
"""Wrap the class."""
|
||||
"""Wrap the forward declaration."""
|
||||
module_var = self._gen_module_var(instantiated_decl.namespaces())
|
||||
cpp_class = instantiated_decl.to_cpp()
|
||||
if cpp_class in self.ignore_classes:
|
||||
|
@ -420,7 +420,7 @@ class PybindWrapper:
|
|||
|
||||
res = (
|
||||
'\n py::class_<{cpp_class}, '
|
||||
'{shared_ptr_type}::shared_ptr<{cpp_class}>>({module_var}, "{class_name}")'
|
||||
'{shared_ptr_type}::shared_ptr<{cpp_class}>>({module_var}, "{class_name}");'
|
||||
).format(shared_ptr_type=('boost' if self.use_boost else 'std'),
|
||||
cpp_class=cpp_class,
|
||||
class_name=instantiated_decl.name,
|
||||
|
|
|
@ -37,15 +37,16 @@ extern "C" {
|
|||
#include <mex.h>
|
||||
}
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <typeinfo>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <streambuf>
|
||||
#include <string>
|
||||
#include <typeinfo>
|
||||
|
||||
using namespace std;
|
||||
using namespace boost; // not usual, but for conciseness of generated code
|
||||
|
|
|
@ -105,7 +105,7 @@ PYBIND11_MODULE(class_py, m_) {
|
|||
return redirect.str();
|
||||
}, py::arg("s") = "factor: ", py::arg("keyFormatter") = gtsam::DefaultKeyFormatter);
|
||||
|
||||
py::class_<SuperCoolFactor<gtsam::Pose3>, std::shared_ptr<SuperCoolFactor<gtsam::Pose3>>>(m_, "SuperCoolFactorPose3")
|
||||
py::class_<SuperCoolFactor<gtsam::Pose3>, std::shared_ptr<SuperCoolFactor<gtsam::Pose3>>>(m_, "SuperCoolFactorPose3");
|
||||
|
||||
#include "python/specializations.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// A base class
|
||||
virtual class MyBase {
|
||||
|
||||
};
|
||||
|
||||
// A templated class
|
||||
|
|
Loading…
Reference in New Issue