Merged to trunk from branch 'branches/2.1.0'

release/4.3a0
Richard Roberts 2012-09-07 16:02:16 +00:00
commit 1c9fb8503b
4 changed files with 32 additions and 22 deletions

View File

@ -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();

View File

@ -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<GeneralCamera,GeneralCamera>(X(0), X(1), 2.0, noiseModel::Isotropic::Sigma(1, 10.0)));

View File

@ -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

View File

@ -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