From 5ac2b45a603b01d3400c4a6581954337f5d9f415 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 20 Mar 2022 21:58:29 -0400 Subject: [PATCH 1/3] minor documentaion fixes --- INSTALL.md | 4 ++-- gtsam/nonlinear/LevenbergMarquardtParams.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 9652463041..1edccd3cdd 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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 diff --git a/gtsam/nonlinear/LevenbergMarquardtParams.h b/gtsam/nonlinear/LevenbergMarquardtParams.h index 1e2c6e3956..f40443457d 100644 --- a/gtsam/nonlinear/LevenbergMarquardtParams.h +++ b/gtsam/nonlinear/LevenbergMarquardtParams.h @@ -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 }; From ea30bc35d52e6c826ee1f2949bce785fd5505d44 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 20 Mar 2022 22:01:12 -0400 Subject: [PATCH 2/3] Squashed 'wrap/' changes from 56e7c0c81..24da9d1be 24da9d1be Merge pull request #146 from borglab/fix/matlab 3101236fe fix missing semi-colon for class forward declaration e933e14a0 add missing boost header git-subtree-dir: wrap git-subtree-split: 24da9d1be2b26ecf9abbfd9153b24fbdcf007f4e --- gtwrap/pybind_wrapper.py | 4 ++-- matlab.h | 9 +++++---- tests/expected/python/class_pybind.cpp | 2 +- tests/fixtures/inheritance.i | 1 - 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gtwrap/pybind_wrapper.py b/gtwrap/pybind_wrapper.py index 1a3f10bf52..31d8d4444a 100755 --- a/gtwrap/pybind_wrapper.py +++ b/gtwrap/pybind_wrapper.py @@ -412,7 +412,7 @@ def wrap_instantiated_class( 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 @@ def wrap_instantiated_declaration( 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, diff --git a/matlab.h b/matlab.h index fbed0b2e27..645ba8edfa 100644 --- a/matlab.h +++ b/matlab.h @@ -37,15 +37,16 @@ extern "C" { #include } -#include +#include #include +#include #include -#include -#include -#include #include +#include #include +#include +#include using namespace std; using namespace boost; // not usual, but for conciseness of generated code diff --git a/tests/expected/python/class_pybind.cpp b/tests/expected/python/class_pybind.cpp index fd53989126..95171def48 100644 --- a/tests/expected/python/class_pybind.cpp +++ b/tests/expected/python/class_pybind.cpp @@ -105,7 +105,7 @@ PYBIND11_MODULE(class_py, m_) { return redirect.str(); }, py::arg("s") = "factor: ", py::arg("keyFormatter") = gtsam::DefaultKeyFormatter); - py::class_, std::shared_ptr>>(m_, "SuperCoolFactorPose3") + py::class_, std::shared_ptr>>(m_, "SuperCoolFactorPose3"); #include "python/specializations.h" diff --git a/tests/fixtures/inheritance.i b/tests/fixtures/inheritance.i index e63f8e689f..a3b64ed4ba 100644 --- a/tests/fixtures/inheritance.i +++ b/tests/fixtures/inheritance.i @@ -1,6 +1,5 @@ // A base class virtual class MyBase { - }; // A templated class From a8e48d674c9a38a8bc721c55cabbecbd25fc918f Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 20 Mar 2022 22:17:47 -0400 Subject: [PATCH 3/3] fix matlab wrapping for gtsam_unstable --- matlab/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt index 1755e2075e..a657c6be7e 100644 --- a/matlab/CMakeLists.txt +++ b/matlab/CMakeLists.txt @@ -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