From 2adfe5ffd31dbd7ebf80b4c3ed212dac05d3e5da Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Thu, 8 Aug 2013 18:33:52 +0000 Subject: [PATCH] WhiteNoiseFactor now works --- .cproject | 358 ++++++++++++++--------------- gtsam/nonlinear/CMakeLists.txt | 4 +- gtsam/nonlinear/WhiteNoiseFactor.h | 15 +- 3 files changed, 186 insertions(+), 191 deletions(-) diff --git a/.cproject b/.cproject index 1cd24836f..bc7ae6d9a 100644 --- a/.cproject +++ b/.cproject @@ -315,6 +315,14 @@ true true + + make + -j2 + testGaussianFactor.run + true + true + true + make -j2 @@ -341,7 +349,6 @@ make - tests/testBayesTree.run true false @@ -349,7 +356,6 @@ make - testBinaryBayesNet.run true false @@ -397,7 +403,6 @@ make - testSymbolicBayesNet.run true false @@ -405,7 +410,6 @@ make - tests/testSymbolicFactor.run true false @@ -413,7 +417,6 @@ make - testSymbolicFactorGraph.run true false @@ -429,20 +432,11 @@ make - tests/testBayesTree true false true - - make - -j2 - testGaussianFactor.run - true - true - true - make -j5 @@ -531,22 +525,6 @@ false true - - make - -j2 - tests/testPose2.run - true - true - true - - - make - -j2 - tests/testPose3.run - true - true - true - make -j2 @@ -563,6 +541,22 @@ true true + + make + -j2 + tests/testPose2.run + true + true + true + + + make + -j2 + tests/testPose3.run + true + true + true + make -j2 @@ -587,26 +581,42 @@ true true - + make - -j2 - all + -j5 + testValues.run true true true - + make - -j2 - check + -j5 + testOrdering.run true true true - + make - -j2 - clean + -j5 + testKey.run + true + true + true + + + make + -j5 + testLinearContainerFactor.run + true + true + true + + + make + -j6 -j8 + testWhiteNoiseFactor.run true true true @@ -651,34 +661,26 @@ true true - + make - -j5 - testValues.run + -j2 + all true true true - + make - -j5 - testOrdering.run + -j2 + check true true true - + make - -j5 - testKey.run - true - true - true - - - make - -j5 - testLinearContainerFactor.run + -j2 + clean true true true @@ -1069,7 +1071,6 @@ make - testGraph.run true false @@ -1077,7 +1078,6 @@ make - testJunctionTree.run true false @@ -1085,7 +1085,6 @@ make - testSymbolicBayesNetB.run true false @@ -1253,7 +1252,6 @@ make - testErrors.run true false @@ -1299,6 +1297,14 @@ true true + + make + -j2 + testGaussianFactor.run + true + true + true + make -j2 @@ -1379,14 +1385,6 @@ true true - - make - -j2 - testGaussianFactor.run - true - true - true - make -j2 @@ -1693,6 +1691,7 @@ make + testSimulated2DOriented.run true false @@ -1732,6 +1731,7 @@ make + testSimulated2D.run true false @@ -1739,6 +1739,7 @@ make + testSimulated3D.run true false @@ -1954,6 +1955,7 @@ make + tests/testGaussianISAM2 true false @@ -1975,6 +1977,102 @@ true true + + make + -j2 + testRot3.run + true + true + true + + + make + -j2 + testRot2.run + true + true + true + + + make + -j2 + testPose3.run + true + true + true + + + make + -j2 + timeRot3.run + true + true + true + + + make + -j2 + testPose2.run + true + true + true + + + make + -j2 + testCal3_S2.run + true + true + true + + + make + -j2 + testSimpleCamera.run + true + true + true + + + make + -j2 + testHomography2.run + true + true + true + + + make + -j2 + testCalibratedCamera.run + true + true + true + + + make + -j2 + check + true + true + true + + + make + -j2 + clean + true + true + true + + + make + -j2 + testPoint2.run + true + true + true + make -j3 @@ -2176,7 +2274,6 @@ cpack - -G DEB true false @@ -2184,7 +2281,6 @@ cpack - -G RPM true false @@ -2192,7 +2288,6 @@ cpack - -G TGZ true false @@ -2200,7 +2295,6 @@ cpack - --config CPackSourceConfig.cmake true false @@ -2342,98 +2436,34 @@ true true - + make - -j2 - testRot3.run + -j5 + testSpirit.run true true true - + make - -j2 - testRot2.run + -j5 + testWrap.run true true true - + make - -j2 - testPose3.run + -j5 + check.wrap true true true - + make - -j2 - timeRot3.run - true - true - true - - - make - -j2 - testPose2.run - true - true - true - - - make - -j2 - testCal3_S2.run - true - true - true - - - make - -j2 - testSimpleCamera.run - true - true - true - - - make - -j2 - testHomography2.run - true - true - true - - - make - -j2 - testCalibratedCamera.run - true - true - true - - - make - -j2 - check - true - true - true - - - make - -j2 - clean - true - true - true - - - make - -j2 - testPoint2.run + -j5 + wrap true true true @@ -2477,38 +2507,6 @@ false true - - make - -j5 - testSpirit.run - true - true - true - - - make - -j5 - testWrap.run - true - true - true - - - make - -j5 - check.wrap - true - true - true - - - make - -j5 - wrap - true - true - true - diff --git a/gtsam/nonlinear/CMakeLists.txt b/gtsam/nonlinear/CMakeLists.txt index 884346e2d..4dcb5e8d8 100644 --- a/gtsam/nonlinear/CMakeLists.txt +++ b/gtsam/nonlinear/CMakeLists.txt @@ -15,9 +15,7 @@ set(nonlinear_local_libs # Files to exclude from compilation of tests and timing scripts set(nonlinear_excluded_files # "${CMAKE_CURRENT_SOURCE_DIR}/tests/testTypedDiscreteFactor.cpp" # Example of excluding a test - #"" # Add to this list, with full path, to exclude - #"${CMAKE_CURRENT_SOURCE_DIR}/tests/testLinearContainerFactor.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/tests/testWhiteNoiseFactor.cpp" + "" # Add to this list, with full path, to exclude ) # Build tests diff --git a/gtsam/nonlinear/WhiteNoiseFactor.h b/gtsam/nonlinear/WhiteNoiseFactor.h index 910444cf8..160728e2f 100644 --- a/gtsam/nonlinear/WhiteNoiseFactor.h +++ b/gtsam/nonlinear/WhiteNoiseFactor.h @@ -144,22 +144,21 @@ namespace gtsam { * Create a symbolic factor using the given ordering to determine the * variable indices. */ - virtual IndexFactor::shared_ptr symbolic(const Ordering& ordering) const { - const Index j1 = ordering[meanKey_], j2 = ordering[precisionKey_]; - return IndexFactor::shared_ptr(new IndexFactor(j1, j2)); - } +// virtual IndexFactor::shared_ptr symbolic(const Ordering& ordering) const { +// const Index j1 = ordering[meanKey_], j2 = ordering[precisionKey_]; +// return IndexFactor::shared_ptr(new IndexFactor(j1, j2)); +// } /// @} /// @name Advanced Interface /// @{ /// linearize returns a Hessianfactor that is an approximation of error(p) - virtual boost::shared_ptr linearize(const Values& x, - const Ordering& ordering) const { + virtual boost::shared_ptr linearize(const Values& x) const { double u = x.at(meanKey_); double p = x.at(precisionKey_); - Index j1 = ordering[meanKey_]; - Index j2 = ordering[precisionKey_]; + Index j1 = meanKey_; + Index j2 = precisionKey_; return linearize(z_, u, p, j1, j2); }