diff --git a/gtsam/base/tests/testCholesky.cpp b/gtsam/base/tests/testCholesky.cpp index 55c72543e..8e8da7a70 100644 --- a/gtsam/base/tests/testCholesky.cpp +++ b/gtsam/base/tests/testCholesky.cpp @@ -81,38 +81,38 @@ TEST(cholesky, BadScalingSVD) { double expectedCondition = 1e40; double actualCondition = S(0) / S(1); - DOUBLES_EQUAL(expectedCondition, actualCondition, 1e-41); + DOUBLES_EQUAL(expectedCondition, actualCondition, 1e30); } /* ************************************************************************* */ TEST(cholesky, underconstrained) { Matrix L(6,6); L << - 1, 0, 0, 0, 0, 0, - 1.11177808157954, 1.06204809504665, 0.507342638873381, 1.34953401829486, 1, 0, - 0.155864888199928, 1.10933048588373, 0.501255576961674, 1, 0, 0, - 1.12108665967793, 1.01584408366945, 1, 0, 0, 0, - 0.776164062474843, 0.117617236580373, -0.0236628691347294, 0.814118199972143, 0.694309975328922, 1, + 1, 0, 0, 0, 0, 0, + 1.11177808157954, 1.06204809504665, 0.507342638873381, 1.34953401829486, 1, 0, + 0.155864888199928, 1.10933048588373, 0.501255576961674, 1, 0, 0, + 1.12108665967793, 1.01584408366945, 1, 0, 0, 0, + 0.776164062474843, 0.117617236580373, -0.0236628691347294, 0.814118199972143, 0.694309975328922, 1, 0.1197220685104, 1, 0, 0, 0, 0; Matrix D1(6,6); D1 << - 0.814723686393179, 0, 0, 0, 0, 0, - 0, 0.811780089277421, 0, 0, 0, 0, - 0, 0, 1.82596950680844, 0, 0, 0, - 0, 0, 0, 0.240287537694585, 0, 0, - 0, 0, 0, 0, 1.34342584865901, 0, + 0.814723686393179, 0, 0, 0, 0, 0, + 0, 0.811780089277421, 0, 0, 0, 0, + 0, 0, 1.82596950680844, 0, 0, 0, + 0, 0, 0, 0.240287537694585, 0, 0, + 0, 0, 0, 0, 1.34342584865901, 0, 0, 0, 0, 0, 0, 1e-12; Matrix D2(6,6); D2 << - 0.814723686393179, 0, 0, 0, 0, 0, - 0, 0.811780089277421, 0, 0, 0, 0, - 0, 0, 1.82596950680844, 0, 0, 0, - 0, 0, 0, 0.240287537694585, 0, 0, - 0, 0, 0, 0, 0, 0, + 0.814723686393179, 0, 0, 0, 0, 0, + 0, 0.811780089277421, 0, 0, 0, 0, + 0, 0, 1.82596950680844, 0, 0, 0, + 0, 0, 0, 0.240287537694585, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; Matrix D3(6,6); D3 << - 0.814723686393179, 0, 0, 0, 0, 0, - 0, 0.811780089277421, 0, 0, 0, 0, - 0, 0, 1.82596950680844, 0, 0, 0, - 0, 0, 0, 0.240287537694585, 0, 0, - 0, 0, 0, 0, -0.5, 0, + 0.814723686393179, 0, 0, 0, 0, 0, + 0, 0.811780089277421, 0, 0, 0, 0, + 0, 0, 1.82596950680844, 0, 0, 0, + 0, 0, 0, 0.240287537694585, 0, 0, + 0, 0, 0, 0, -0.5, 0, 0, 0, 0, 0, 0, -0.6; Matrix A1 = L * D1 * L.transpose(); diff --git a/gtsam/slam/tests/testGeneralSFMFactor_Cal3Bundler.cpp b/gtsam/slam/tests/testGeneralSFMFactor_Cal3Bundler.cpp index 1b1ae5390..21f5f2008 100644 --- a/gtsam/slam/tests/testGeneralSFMFactor_Cal3Bundler.cpp +++ b/gtsam/slam/tests/testGeneralSFMFactor_Cal3Bundler.cpp @@ -366,7 +366,7 @@ TEST( GeneralSFMFactor_Cal3Bundler, optimize_varK_BA ) { } // Constrain position of system with the first camera constrained to the origin - graph.addCameraConstraint(X(0), cameras[0]); + graph.addCameraConstraint(0, cameras[0]); // Constrain the scale of the problem with a soft range factor of 1m between the cameras graph.add(RangeFactor(X(0), X(1), 2.0, noiseModel::Isotropic::Sigma(1, 10.0))); diff --git a/package_scripts/compile_static_boost.sh b/package_scripts/compile_static_boost.sh new file mode 100644 index 000000000..466283044 --- /dev/null +++ b/package_scripts/compile_static_boost.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Compile boost statically, with -fPIC to allow linking it into the mex +# module (which is a dynamic library). --disable-icu prevents depending +# on libicu, which is unneeded and would require then linking the mex +# module with it as well. We just stage instead of install, then the +# toolbox_package_unix.sh script uses the staged boost. +./b2 link=static threading=multi cxxflags=-fPIC cflags=-fPIC --disable-icu -a stage \ No newline at end of file diff --git a/package_scripts/toolbox_package_unix.sh b/package_scripts/toolbox_package_unix.sh index b78649e15..6f5cda526 100755 --- a/package_scripts/toolbox_package_unix.sh +++ b/package_scripts/toolbox_package_unix.sh @@ -7,6 +7,8 @@ if [ "$os" = "Linux" -a "$arch" = "x86_64" ]; then platform=lin64 elif [ "$os" = "Linux" -a "$arch" = "i686" ]; then platform=lin32 +elif [ "$os" = "Darwin" -a "$arch" = "x86_64" ]; then + platform=mac64 else echo "Unrecognized platform" exit 1