Merge pull request #1140 from borglab/fix/matlab-wrapper

release/4.3a0
Varun Agrawal 2022-03-21 13:55:05 -04:00 committed by GitHub
commit d0a1852c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 13 deletions

View File

@ -13,7 +13,7 @@ $ make install
## Important Installation Notes ## Important Installation Notes
1. GTSAM requires the following libraries to be installed on your system: 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 - Cmake version 3.0 or higher
- Support for XCode 4.3 command line tools on Mac requires CMake 2.8.8 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. 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. 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 ## Known Issues

View File

@ -35,7 +35,7 @@ class LevenbergMarquardtOptimizer;
class GTSAM_EXPORT LevenbergMarquardtParams: public NonlinearOptimizerParams { class GTSAM_EXPORT LevenbergMarquardtParams: public NonlinearOptimizerParams {
public: public:
/** See LevenbergMarquardtParams::lmVerbosity */ /** See LevenbergMarquardtParams::verbosityLM */
enum VerbosityLM { enum VerbosityLM {
SILENT = 0, SUMMARY, TERMINATION, LAMBDA, TRYLAMBDA, TRYCONFIG, DAMPED, TRYDELTA SILENT = 0, SUMMARY, TERMINATION, LAMBDA, TRYLAMBDA, TRYCONFIG, DAMPED, TRYDELTA
}; };

View File

@ -92,8 +92,8 @@ if(GTSAM_UNSTABLE_INSTALL_MATLAB_TOOLBOX)
endif() endif()
# Wrap # Wrap
matlab_wrap(${GTSAM_SOURCE_DIR}/gtsam_unstable/gtsam_unstable.i "gtsam" "" matlab_wrap(${GTSAM_SOURCE_DIR}/gtsam_unstable/gtsam_unstable.i "gtsam_unstable"
"${mexFlags}" "${ignore}") "${GTSAM_ADDITIONAL_LIBRARIES}" "" "${mexFlags}" "${ignore}")
endif(GTSAM_UNSTABLE_INSTALL_MATLAB_TOOLBOX) endif(GTSAM_UNSTABLE_INSTALL_MATLAB_TOOLBOX)
# Record the root dir for gtsam - needed during external builds, e.g., ROS # Record the root dir for gtsam - needed during external builds, e.g., ROS

View File

@ -412,7 +412,7 @@ class PybindWrapper:
def wrap_instantiated_declaration( def wrap_instantiated_declaration(
self, instantiated_decl: instantiator.InstantiatedDeclaration): self, instantiated_decl: instantiator.InstantiatedDeclaration):
"""Wrap the class.""" """Wrap the forward declaration."""
module_var = self._gen_module_var(instantiated_decl.namespaces()) module_var = self._gen_module_var(instantiated_decl.namespaces())
cpp_class = instantiated_decl.to_cpp() cpp_class = instantiated_decl.to_cpp()
if cpp_class in self.ignore_classes: if cpp_class in self.ignore_classes:
@ -420,7 +420,7 @@ class PybindWrapper:
res = ( res = (
'\n py::class_<{cpp_class}, ' '\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'), ).format(shared_ptr_type=('boost' if self.use_boost else 'std'),
cpp_class=cpp_class, cpp_class=cpp_class,
class_name=instantiated_decl.name, class_name=instantiated_decl.name,

View File

@ -37,15 +37,16 @@ extern "C" {
#include <mex.h> #include <mex.h>
} }
#include <boost/shared_ptr.hpp> #include <boost/cstdint.hpp>
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
#include <boost/shared_ptr.hpp>
#include <list> #include <list>
#include <string>
#include <sstream>
#include <typeinfo>
#include <set> #include <set>
#include <sstream>
#include <streambuf> #include <streambuf>
#include <string>
#include <typeinfo>
using namespace std; using namespace std;
using namespace boost; // not usual, but for conciseness of generated code using namespace boost; // not usual, but for conciseness of generated code

View File

@ -105,7 +105,7 @@ PYBIND11_MODULE(class_py, m_) {
return redirect.str(); return redirect.str();
}, py::arg("s") = "factor: ", py::arg("keyFormatter") = gtsam::DefaultKeyFormatter); }, 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" #include "python/specializations.h"

View File

@ -1,6 +1,5 @@
// A base class // A base class
virtual class MyBase { virtual class MyBase {
}; };
// A templated class // A templated class