diff --git a/.cproject b/.cproject
index ab1d0cdfc..10b16f91c 100644
--- a/.cproject
+++ b/.cproject
@@ -5,13 +5,13 @@
-
-
+
+
@@ -60,13 +60,13 @@
-
-
+
+
@@ -116,13 +116,13 @@
-
-
+
+
@@ -484,333 +484,6 @@
-
- make
- -j5
- testCombinedImuFactor.run
- true
- true
- true
-
-
- make
- -j5
- testImuFactor.run
- true
- true
- true
-
-
- make
- -j5
- testAHRSFactor.run
- true
- true
- true
-
-
- make
- -j8
- testAttitudeFactor.run
- true
- true
- true
-
-
- make
- -j2
- all
- true
- true
- true
-
-
- make
- -j2
- testNonlinearConstraint.run
- true
- true
- true
-
-
- make
- -j2
- testLieConfig.run
- true
- true
- true
-
-
- make
- -j2
- testConstraintOptimizer.run
- true
- true
- true
-
-
- make
- -j2
- testGaussianFactor.run
- true
- true
- true
-
-
- make
- -j4
- testImuFactor.run
- true
- true
- true
-
-
- make
- -j2
- all
- true
- true
- true
-
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- clean
- true
- true
- true
-
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- clean
- true
- true
- true
-
-
- make
- -j2
- testBTree.run
- true
- true
- true
-
-
- make
- -j2
- testDSF.run
- true
- true
- true
-
-
- make
- -j2
- testDSFVector.run
- true
- true
- true
-
-
- make
- -j2
- testMatrix.run
- true
- true
- true
-
-
- make
- -j2
- testSPQRUtil.run
- true
- true
- true
-
-
- make
- -j2
- testVector.run
- true
- true
- true
-
-
- make
- -j2
- timeMatrix.run
- true
- true
- true
-
-
- make
- -j2
- all
- true
- true
- true
-
-
- make
- -j2
- all
- true
- true
- true
-
-
- make
- -j2
- clean
- true
- true
- true
-
-
- make
- -j5
- wrap
- true
- true
- true
-
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- clean
- true
- true
- true
-
-
- make
- -j2
- install
- true
- true
- true
-
-
- make
- -j2
- all
- true
- true
- true
-
-
- cmake
- ..
- true
- false
- true
-
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- tests/testLieConfig.run
- true
- true
- true
-
-
- make
- -j5
- testInvDepthCamera3.run
- true
- true
- true
-
-
- make
- -j5
- testTriangulation.run
- true
- true
- true
-
-
- make
- -j4
- testEvent.run
- true
- true
- true
-
-
- make
- -j2
- all
- true
- true
- true
-
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- clean
- true
- true
- true
-
-
- make
- -j5
- all
- true
- false
- true
-
-
- make
- -j5
- check
- true
- false
- true
-
make
-j5
@@ -859,167 +532,39 @@
true
true
-
- make
- -j5
- testCal3Bundler.run
- true
- true
- true
-
-
- make
- -j5
- testCal3DS2.run
- true
- true
- true
-
-
- make
- -j5
- testCalibratedCamera.run
- true
- true
- true
-
-
- make
- -j5
- testEssentialMatrix.run
- true
- true
- true
-
-
- make
- -j1 VERBOSE=1
- testHomography2.run
- true
- false
- true
-
-
- make
- -j5
- testPinholeCamera.run
- true
- true
- true
-
-
- make
- -j5
- testPoint2.run
- true
- true
- true
-
-
- make
- -j5
- testPoint3.run
- true
- true
- true
-
-
- make
- -j5
- testPose2.run
- true
- true
- true
-
-
- make
- -j5
- testPose3.run
- true
- true
- true
-
-
- make
- -j5
- testRot3M.run
- true
- true
- true
-
-
- make
- -j5
- testSphere2.run
- true
- true
- true
-
-
- make
- -j5
- testStereoCamera.run
- true
- true
- true
-
-
- make
- -j5
- testCal3Unified.run
- true
- true
- true
-
-
- make
- -j5
- testRot2.run
- true
- true
- true
-
-
- make
- -j5
- testRot3Q.run
- true
- true
- true
-
-
- make
- -j5
- testRot3.run
- true
- true
- true
-
-
+
make
-j4
- testSO3.run
+ testSimilarity3.run
true
true
true
-
+
+ make
+ -j5
+ testInvDepthCamera3.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testTriangulation.run
+ true
+ true
+ true
+
+
make
-j4
- testQuaternion.run
+ testEvent.run
true
true
true
-
- make
- -j4
- testOrientedPlane3.run
- true
- true
- true
-
-
+
make
-j2
all
@@ -1027,7 +572,7 @@
true
true
-
+
make
-j2
clean
@@ -1035,23 +580,143 @@
true
true
-
+
+ make
+ -k
+ check
+ true
+ false
+ true
+
+
+ make
+
+ tests/testBayesTree.run
+ true
+ false
+ true
+
+
+ make
+
+ testBinaryBayesNet.run
+ true
+ false
+ true
+
+
make
-j2
- clean all
+ testFactorGraph.run
true
true
true
-
+
make
-j2
- install
+ testISAM.run
true
true
true
-
+
+ make
+ -j2
+ testJunctionTree.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testKey.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testOrdering.run
+ true
+ true
+ true
+
+
+ make
+
+ testSymbolicBayesNet.run
+ true
+ false
+ true
+
+
+ make
+
+ tests/testSymbolicFactor.run
+ true
+ false
+ true
+
+
+ make
+
+ testSymbolicFactorGraph.run
+ true
+ false
+ true
+
+
+ make
+ -j2
+ timeSymbolMaps.run
+ true
+ true
+ true
+
+
+ make
+
+ tests/testBayesTree
+ true
+ false
+ true
+
+
+ make
+ -j2
+ tests/testPose2.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ tests/testPose3.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ all
+ true
+ true
+ true
+
+
+ make
+ -j2
+ check
+ true
+ true
+ true
+
+
make
-j2
clean
@@ -1203,146 +868,154 @@
true
true
-
+
make
- -j2
- all
+ -j5
+ testGaussianFactorGraphUnordered.run
true
true
true
-
+
make
- -j2
- check
+ -j5
+ testGaussianBayesNetUnordered.run
true
true
true
-
+
make
- -j2
+ -j5
+ testGaussianConditional.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testGaussianDensity.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testGaussianJunctionTree.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testHessianFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testJacobianFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testKalmanFilter.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testNoiseModel.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testSampler.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testSerializationLinear.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testVectorValues.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testGaussianBayesTree.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testCombinedImuFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testImuFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testAHRSFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j8
+ testAttitudeFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
clean
true
true
true
-
+
make
- -j2
- testPlanarSLAM.run
- true
- true
- true
-
-
- make
- -j2
- testPose2Config.run
- true
- true
- true
-
-
- make
- -j2
- testPose2Factor.run
- true
- true
- true
-
-
- make
- -j2
- testPose2Prior.run
- true
- true
- true
-
-
- make
- -j2
- testPose2SLAM.run
- true
- true
- true
-
-
- make
- -j2
- testPose3Config.run
- true
- true
- true
-
-
- make
- -j2
- testPose3SLAM.run
- true
- true
- true
-
-
- make
-
- testSimulated2DOriented.run
- true
- false
- true
-
-
- make
- -j2
- testVSLAMConfig.run
- true
- true
- true
-
-
- make
- -j2
- testVSLAMFactor.run
- true
- true
- true
-
-
- make
- -j2
- testVSLAMGraph.run
- true
- true
- true
-
-
- make
- -j2
- testPose3Factor.run
- true
- true
- true
-
-
- make
-
- testSimulated2D.run
- true
- false
- true
-
-
- make
-
- testSimulated3D.run
- true
- false
- true
-
-
- make
- -j2
- tests/testGaussianISAM2
+ -j5
+ all
true
true
true
@@ -1437,103 +1110,477 @@
make
+
testErrors.run
true
false
true
-
+
make
- -j5
- testAntiFactor.run
+ -j2
+ check
true
true
true
-
+
make
- -j5
- testPriorFactor.run
+ -j2
+ tests/testGaussianJunctionTree.run
true
true
true
-
+
make
- -j5
- testDataset.run
+ -j2
+ tests/testGaussianFactor.run
true
true
true
-
+
make
- -j5
- testEssentialMatrixFactor.run
+ -j2
+ tests/testGaussianConditional.run
true
true
true
-
+
make
- -j5
- testGeneralSFMFactor_Cal3Bundler.run
+ -j2
+ tests/timeSLAMlike.run
true
true
true
-
+
make
- -j5
- testGeneralSFMFactor.run
+ -j2
+ check
true
true
true
-
+
make
- -j5
- testProjectionFactor.run
+ -j2
+ clean
true
true
true
-
+
make
- -j5
- testRotateFactor.run
+ -j2
+ testBTree.run
true
true
true
-
+
make
- -j5
- testPoseRotationPrior.run
+ -j2
+ testDSF.run
true
true
true
-
+
make
- -j5
- testImplicitSchurFactor.run
+ -j2
+ testDSFVector.run
true
true
true
-
+
+ make
+ -j2
+ testMatrix.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testSPQRUtil.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testVector.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ timeMatrix.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ all
+ true
+ true
+ true
+
+
+ make
+ -j2
+ check
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testClusterTree.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testJunctionTree.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ tests/testEliminationTree.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ tests/testSymbolicFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ tests/testVariableSlots.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ tests/testConditional.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ tests/testSymbolicFactorGraph.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ all
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testNonlinearConstraint.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testLieConfig.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testConstraintOptimizer.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ check
+ true
+ true
+ true
+
+
+ make
+ -j2
+ all
+ true
+ true
+ true
+
+
+ make
+ -j2
+ check
+ true
+ true
+ true
+
+
+ make
+ -j2
+ clean
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPlanarSLAM.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPose2Config.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPose2Factor.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPose2Prior.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPose2SLAM.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPose3Config.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPose3SLAM.run
+ true
+ true
+ true
+
+
+ make
+ testSimulated2DOriented.run
+ true
+ false
+ true
+
+
+ make
+ -j2
+ testVSLAMConfig.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testVSLAMFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testVSLAMGraph.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPose3Factor.run
+ true
+ true
+ true
+
+
+ make
+ testSimulated2D.run
+ true
+ false
+ true
+
+
+ make
+ testSimulated3D.run
+ true
+ false
+ true
+
+
+ make
+ -j2
+ tests/testGaussianISAM2
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testBTree.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testDSF.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testDSFMap.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testDSFVector.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testFixedVector.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testEliminationTree.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testInference.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testKey.run
+ true
+ true
+ true
+
+
+ make
+ -j1
+ testSymbolicBayesTree.run
+ true
+ false
+ true
+
+
+ make
+ -j1
+ testSymbolicSequentialSolver.run
+ true
+ false
+ true
+
+
make
-j4
- testRangeFactor.run
+ testLabeledSymbol.run
true
true
true
-
+
make
- -j4
- testOrientedPlane3Factor.run
+ -j2
+ check
+ true
+ true
+ true
+
+
+ make
+ -j2
+ tests/testLieConfig.run
true
true
true
@@ -1739,6 +1786,7 @@
cpack
+
-G DEB
true
false
@@ -1746,6 +1794,7 @@
cpack
+
-G RPM
true
false
@@ -1753,6 +1802,7 @@
cpack
+
-G TGZ
true
false
@@ -1760,6 +1810,7 @@
cpack
+
--config CPackSourceConfig.cmake
true
false
@@ -1941,7 +1992,15 @@
false
true
-
+
+ make
+ -j4
+ check.sam
+ true
+ true
+ true
+
+
make
-j2
check
@@ -1949,55 +2008,38 @@
true
true
-
+
make
-
- tests/testGaussianISAM2
+ -j2
+ clean
+ true
+ true
+ true
+
+
+ make
+ -j2
+ install
+ true
+ true
+ true
+
+
+ make
+ -j2
+ all
+ true
+ true
+ true
+
+
+ cmake
+ ..
true
false
true
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- tests/testGaussianJunctionTree.run
- true
- true
- true
-
-
- make
- -j2
- tests/testGaussianFactor.run
- true
- true
- true
-
-
- make
- -j2
- tests/testGaussianConditional.run
- true
- true
- true
-
-
- make
- -j2
- tests/timeSLAMlike.run
- true
- true
- true
-
-
+
make
-j2
testGaussianFactor.run
@@ -2005,26 +2047,458 @@
true
true
-
+
make
-j5
- testParticleFactor.run
+ testCal3Bundler.run
true
true
true
-
+
make
-j5
- testExpressionMeta.run
+ testCal3DS2.run
true
true
true
-
+
+ make
+ -j5
+ testCalibratedCamera.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testEssentialMatrix.run
+ true
+ true
+ true
+
+
+ make
+ -j1 VERBOSE=1
+ testHomography2.run
+ true
+ false
+ true
+
+
+ make
+ -j5
+ testPinholeCamera.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testPoint2.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testPoint3.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testPose2.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testPose3.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testRot3M.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testSphere2.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testStereoCamera.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testCal3Unified.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testRot2.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testRot3Q.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testRot3.run
+ true
+ true
+ true
+
+
make
-j4
- testCustomChartExpression.run
+ testSO3.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testQuaternion.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testOrientedPlane3.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testPinholePose.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testCyclic.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testUnit3.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testBearingRange.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ all
+ true
+ true
+ true
+
+
+ make
+ -j2
+ check
+ true
+ true
+ true
+
+
+ make
+ -j2
+ clean
+ true
+ true
+ true
+
+
+ make
+ -j5
+ all
+ true
+ false
+ true
+
+
+ make
+ -j5
+ check
+ true
+ false
+ true
+
+
+ make
+ -j2
+ all
+ true
+ true
+ true
+
+
+ make
+ -j2
+ clean
+ true
+ true
+ true
+
+
+ make
+ -j2
+ all
+ true
+ true
+ true
+
+
+ make
+ -j2
+ clean
+ true
+ true
+ true
+
+
+ make
+ -j2
+ clean all
+ true
+ true
+ true
+
+
+ make
+ -j1
+ testDiscreteBayesTree.run
+ true
+ false
+ true
+
+
+ make
+ -j5
+ testDiscreteConditional.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testDiscreteFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testDiscreteFactorGraph.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testDiscreteMarginals.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testIMUSystem.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testPoseRTV.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testVelocityConstraint.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testVelocityConstraint3.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ check
+ true
+ true
+ true
+
+
+ make
+ -j2
+ timeCalibratedCamera.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ timeRot3.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ clean
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testWrap.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testSpirit.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ check.wrap
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testMethod.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testClass.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testType.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testArgument.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testReturnValue.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testTemplate.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testGlobalFunction.run
true
true
true
@@ -2077,7 +2551,343 @@
true
true
-
+
+ make
+ -j2
+ vSFMexample.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testVSLAMGraph
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testMatrix.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testVector.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testNumericalDerivative.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testVerticalBlockMatrix.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testOptionalJacobian.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testGroup.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ check.tests
+ true
+ true
+ true
+
+
+ make
+ -j2
+ timeGaussianFactorGraph.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testMarginals.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testGaussianISAM2.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testSymbolicFactorGraphB.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ timeSequentialOnDataset.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testGradientDescentOptimizer.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testGaussianFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testNonlinearOptimizer.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testGaussianBayesNet.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testNonlinearISAM.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testNonlinearEquality.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testExtendedKalmanFilter.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ timing.tests
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testNonlinearFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ clean
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testGaussianJunctionTreeB.run
+ true
+ true
+ true
+
+
+ make
+
+ testGraph.run
+ true
+ false
+ true
+
+
+ make
+
+ testJunctionTree.run
+ true
+ false
+ true
+
+
+ make
+
+ testSymbolicBayesNetB.run
+ true
+ false
+ true
+
+
+ make
+ -j5
+ testGaussianISAM.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testDoglegOptimizer.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testNonlinearFactorGraph.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testIterative.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testSubgraphSolver.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testGaussianFactorGraphB.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testSummarization.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testManifold.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testLie.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testSerializationSLAM.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testParticleFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testGaussianFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ install
+ true
+ true
+ true
+
+
+ make
+ -j2
+ clean
+ true
+ true
+ true
+
+
make
-j2
all
@@ -2085,7 +2895,7 @@
true
true
-
+
make
-j2
clean
@@ -2093,129 +2903,15 @@
true
true
-
- make
- -k
- check
- true
- false
- true
-
-
- make
- tests/testBayesTree.run
- true
- false
- true
-
-
- make
- testBinaryBayesNet.run
- true
- false
- true
-
-
+
make
-j2
- testFactorGraph.run
+ all
true
true
true
-
- make
- -j2
- testISAM.run
- true
- true
- true
-
-
- make
- -j2
- testJunctionTree.run
- true
- true
- true
-
-
- make
- -j2
- testKey.run
- true
- true
- true
-
-
- make
- -j2
- testOrdering.run
- true
- true
- true
-
-
- make
- testSymbolicBayesNet.run
- true
- false
- true
-
-
- make
- tests/testSymbolicFactor.run
- true
- false
- true
-
-
- make
- testSymbolicFactorGraph.run
- true
- false
- true
-
-
- make
- -j2
- timeSymbolMaps.run
- true
- true
- true
-
-
- make
- tests/testBayesTree
- true
- false
- true
-
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- timeCalibratedCamera.run
- true
- true
- true
-
-
- make
- -j2
- timeRot3.run
- true
- true
- true
-
-
+
make
-j2
clean
@@ -2223,18 +2919,106 @@
true
true
-
+
make
- -j2
- tests/testPose2.run
+ -j5
+ testAntiFactor.run
true
true
true
-
+
make
- -j2
- tests/testPose3.run
+ -j5
+ testPriorFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testDataset.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testEssentialMatrixFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testGeneralSFMFactor_Cal3Bundler.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testGeneralSFMFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testProjectionFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testRotateFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testPoseRotationPrior.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testImplicitSchurFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testOrientedPlane3Factor.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testSmartProjectionPoseFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testInitializePose3.run
true
true
true
@@ -2439,6 +3223,213 @@
true
true
+
+ make
+ -j5
+ testLago.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testLinearContainerFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testOrdering.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testValues.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ testWhiteNoiseFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testExpression.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testAdaptAutoDiff.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testCallRecord.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testExpressionFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testExecutionTrace.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testSerializationNonlinear.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ testImuFactor.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ check
+ true
+ true
+ true
+
+
+ make
+ tests/testGaussianISAM2
+ true
+ false
+ true
+
+
+ make
+ -j5
+ timeCalibratedCamera.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ timePinholeCamera.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ timeStereoCamera.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ timeLago.run
+ true
+ true
+ true
+
+
+ make
+ -j5
+ timePose3.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ timeAdaptAutoDiff.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ timeCameraExpression.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ timeOneCameraExpression.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ timeSFMExpressions.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ timeIncremental.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ timeSchurFactors.run
+ true
+ true
+ true
+
+
+ make
+ -j4
+ timeRot2.run
+ true
+ true
+ true
+
make
-j2
@@ -2535,895 +3526,34 @@
true
true
-
- make
- -j1
- testDiscreteBayesTree.run
- true
- false
- true
-
-
- make
- -j5
- testDiscreteConditional.run
- true
- true
- true
-
-
- make
- -j5
- testDiscreteFactor.run
- true
- true
- true
-
-
- make
- -j5
- testDiscreteFactorGraph.run
- true
- true
- true
-
-
- make
- -j5
- testDiscreteMarginals.run
- true
- true
- true
-
-
- make
- -j5
- testEliminationTree.run
- true
- true
- true
-
-
- make
- -j5
- testInference.run
- true
- true
- true
-
-
- make
- -j5
- testKey.run
- true
- true
- true
-
-
- make
- -j1
- testSymbolicBayesTree.run
- true
- false
- true
-
-
- make
- -j1
- testSymbolicSequentialSolver.run
- true
- false
- true
-
-
+
make
-j4
- testLabeledSymbol.run
+ testBearingFactor.run
true
true
true
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- testClusterTree.run
- true
- true
- true
-
-
- make
- -j2
- testJunctionTree.run
- true
- true
- true
-
-
- make
- -j2
- tests/testEliminationTree.run
- true
- true
- true
-
-
- make
- -j2
- tests/testSymbolicFactor.run
- true
- true
- true
-
-
- make
- -j2
- tests/testVariableSlots.run
- true
- true
- true
-
-
- make
- -j2
- tests/testConditional.run
- true
- true
- true
-
-
- make
- -j2
- tests/testSymbolicFactorGraph.run
- true
- true
- true
-
-
- make
- -j5
- testLago.run
- true
- true
- true
-
-
- make
- -j5
- testLinearContainerFactor.run
- true
- true
- true
-
-
- make
- -j5
- testOrdering.run
- true
- true
- true
-
-
- make
- -j5
- testValues.run
- true
- true
- true
-
-
- make
- -j5
- testWhiteNoiseFactor.run
- true
- true
- true
-
-
+
make
-j4
- testExpression.run
+ testRangeFactor.run
true
true
true
-
+
make
-j4
- testAdaptAutoDiff.run
+ testBearingRangeFactor.run
true
true
true
-
- make
- -j4
- testCallRecord.run
- true
- true
- true
-
-
- make
- -j4
- testExpressionFactor.run
- true
- true
- true
-
-
+
make
-j5
- testIMUSystem.run
- true
- true
- true
-
-
- make
- -j5
- testPoseRTV.run
- true
- true
- true
-
-
- make
- -j5
- testVelocityConstraint.run
- true
- true
- true
-
-
- make
- -j5
- testVelocityConstraint3.run
- true
- true
- true
-
-
- make
- -j5
- timeCalibratedCamera.run
- true
- true
- true
-
-
- make
- -j5
- timePinholeCamera.run
- true
- true
- true
-
-
- make
- -j5
- timeStereoCamera.run
- true
- true
- true
-
-
- make
- -j5
- timeLago.run
- true
- true
- true
-
-
- make
- -j5
- timePose3.run
- true
- true
- true
-
-
- make
- -j4
- timeAdaptAutoDiff.run
- true
- true
- true
-
-
- make
- -j4
- timeCameraExpression.run
- true
- true
- true
-
-
- make
- -j4
- timeOneCameraExpression.run
- true
- true
- true
-
-
- make
- -j4
- timeSFMExpressions.run
- true
- true
- true
-
-
- make
- -j4
- timeIncremental.run
- true
- true
- true
-
-
- make
- -j5
- testBTree.run
- true
- true
- true
-
-
- make
- -j5
- testDSF.run
- true
- true
- true
-
-
- make
- -j5
- testDSFMap.run
- true
- true
- true
-
-
- make
- -j5
- testDSFVector.run
- true
- true
- true
-
-
- make
- -j5
- testFixedVector.run
- true
- true
- true
-
-
- make
- -j2
- all
- true
- true
- true
-
-
- make
- -j2
- clean
- true
- true
- true
-
-
- make
- -j5
- testGaussianFactorGraphUnordered.run
- true
- true
- true
-
-
- make
- -j5
- testGaussianBayesNetUnordered.run
- true
- true
- true
-
-
- make
- -j5
- testGaussianConditional.run
- true
- true
- true
-
-
- make
- -j5
- testGaussianDensity.run
- true
- true
- true
-
-
- make
- -j5
- testGaussianJunctionTree.run
- true
- true
- true
-
-
- make
- -j5
- testHessianFactor.run
- true
- true
- true
-
-
- make
- -j5
- testJacobianFactor.run
- true
- true
- true
-
-
- make
- -j5
- testKalmanFilter.run
- true
- true
- true
-
-
- make
- -j5
- testNoiseModel.run
- true
- true
- true
-
-
- make
- -j5
- testSampler.run
- true
- true
- true
-
-
- make
- -j5
- testSerializationLinear.run
- true
- true
- true
-
-
- make
- -j5
- testVectorValues.run
- true
- true
- true
-
-
- make
- -j5
- testGaussianBayesTree.run
- true
- true
- true
-
-
- make
- -j5
- testWrap.run
- true
- true
- true
-
-
- make
- -j5
- testSpirit.run
- true
- true
- true
-
-
- make
- -j5
- check.wrap
- true
- true
- true
-
-
- make
- -j5
- testMethod.run
- true
- true
- true
-
-
- make
- -j5
- testClass.run
- true
- true
- true
-
-
- make
- -j4
- testType.run
- true
- true
- true
-
-
- make
- -j4
- testArgument.run
- true
- true
- true
-
-
- make
- -j4
- testReturnValue.run
- true
- true
- true
-
-
- make
- -j4
- testTemplate.run
- true
- true
- true
-
-
- make
- -j4
- testGlobalFunction.run
- true
- true
- true
-
-
- make
- -j2
- all
- true
- true
- true
-
-
- make
- -j2
- clean
- true
- true
- true
-
-
- make
- -j5
- testMatrix.run
- true
- true
- true
-
-
- make
- -j5
- testVector.run
- true
- true
- true
-
-
- make
- -j5
- testNumericalDerivative.run
- true
- true
- true
-
-
- make
- -j5
- testVerticalBlockMatrix.run
- true
- true
- true
-
-
- make
- -j4
- testOptionalJacobian.run
- true
- true
- true
-
-
- make
- -j5
- check.tests
- true
- true
- true
-
-
- make
- -j2
- timeGaussianFactorGraph.run
- true
- true
- true
-
-
- make
- -j5
- testMarginals.run
- true
- true
- true
-
-
- make
- -j5
- testGaussianISAM2.run
- true
- true
- true
-
-
- make
- -j5
- testSymbolicFactorGraphB.run
- true
- true
- true
-
-
- make
- -j2
- timeSequentialOnDataset.run
- true
- true
- true
-
-
- make
- -j5
- testGradientDescentOptimizer.run
- true
- true
- true
-
-
- make
- -j2
- testGaussianFactor.run
- true
- true
- true
-
-
- make
- -j2
- testNonlinearOptimizer.run
- true
- true
- true
-
-
- make
- -j2
- testGaussianBayesNet.run
- true
- true
- true
-
-
- make
- -j2
- testNonlinearISAM.run
- true
- true
- true
-
-
- make
- -j2
- testNonlinearEquality.run
- true
- true
- true
-
-
- make
- -j2
- testExtendedKalmanFilter.run
- true
- true
- true
-
-
- make
- -j5
- timing.tests
- true
- true
- true
-
-
- make
- -j5
- testNonlinearFactor.run
- true
- true
- true
-
-
- make
- -j5
- clean
- true
- true
- true
-
-
- make
- -j5
- testGaussianJunctionTreeB.run
- true
- true
- true
-
-
- make
- testGraph.run
- true
- false
- true
-
-
- make
- testJunctionTree.run
- true
- false
- true
-
-
- make
- testSymbolicBayesNetB.run
- true
- false
- true
-
-
- make
- -j5
- testGaussianISAM.run
- true
- true
- true
-
-
- make
- -j5
- testDoglegOptimizer.run
- true
- true
- true
-
-
- make
- -j5
- testNonlinearFactorGraph.run
- true
- true
- true
-
-
- make
- -j5
- testIterative.run
- true
- true
- true
-
-
- make
- -j5
- testSubgraphSolver.run
- true
- true
- true
-
-
- make
- -j5
- testGaussianFactorGraphB.run
- true
- true
- true
-
-
- make
- -j5
- testSummarization.run
- true
- true
- true
-
-
- make
- -j5
- testManifold.run
- true
- true
- true
-
-
- make
- -j2
- vSFMexample.run
- true
- true
- true
-
-
- make
- -j5
- clean
- true
- true
- true
-
-
- make
- -j5
- all
- true
- true
- true
-
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- testVSLAMGraph
+ wrap
true
true
true
diff --git a/.gitignore b/.gitignore
index d46bddd10..4d0aedb3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/build*
+.idea
*.pyc
*.DS_Store
/examples/Data/dubrovnik-3-7-pre-rewritten.txt
diff --git a/.settings/.gitignore b/.settings/.gitignore
new file mode 100644
index 000000000..faa6d2991
--- /dev/null
+++ b/.settings/.gitignore
@@ -0,0 +1 @@
+/org.eclipse.cdt.codan.core.prefs
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38ee89760..0380b8a2f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,7 +131,7 @@ endif()
if(NOT (${Boost_VERSION} LESS 105600))
message("Ignoring Boost restriction on optional lvalue assignment from rvalues")
- add_definitions(-DBOOST_OPTIONAL_ALLOW_BINDING_TO_RVALUES)
+ add_definitions(-DBOOST_OPTIONAL_ALLOW_BINDING_TO_RVALUES -DBOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES)
endif()
###############################################################################
@@ -158,6 +158,12 @@ else()
set(GTSAM_USE_TBB 0) # This will go into config.h
endif()
+###############################################################################
+# Prohibit Timing build mode in combination with TBB
+if(GTSAM_USE_TBB AND (CMAKE_BUILD_TYPE STREQUAL "Timing"))
+ message(FATAL_ERROR "Timing build mode cannot be used together with TBB. Use a sampling profiler such as Instruments or Intel VTune Amplifier instead.")
+endif()
+
###############################################################################
# Find Google perftools
@@ -173,6 +179,11 @@ if(MKL_FOUND AND GTSAM_WITH_EIGEN_MKL)
set(EIGEN_USE_MKL_ALL 1) # This will go into config.h - it makes Eigen use MKL
include_directories(${MKL_INCLUDE_DIR})
list(APPEND GTSAM_ADDITIONAL_LIBRARIES ${MKL_LIBRARIES})
+
+ # --no-as-needed is required with gcc according to the MKL link advisor
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed")
+ endif()
else()
set(GTSAM_USE_EIGEN_MKL 0)
set(EIGEN_USE_MKL_ALL 0)
@@ -192,36 +203,40 @@ endif()
###############################################################################
# Option for using system Eigen or GTSAM-bundled Eigen
-### Disabled until our patches are included in Eigen ###
+### These patches only affect usage of MKL. If you want to enable MKL, you *must*
+### use our patched version of Eigen
### See: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=704 (Householder QR MKL selection)
### http://eigen.tuxfamily.org/bz/show_bug.cgi?id=705 (Fix MKL LLT return code)
-### http://eigen.tuxfamily.org/bz/show_bug.cgi?id=716 (Improved comma initialization)
-# option(GTSAM_USE_SYSTEM_EIGEN "Find and use system-installed Eigen. If 'off', use the one bundled with GTSAM" OFF)
-set(GTSAM_USE_SYSTEM_EIGEN OFF)
+option(GTSAM_USE_SYSTEM_EIGEN "Find and use system-installed Eigen. If 'off', use the one bundled with GTSAM" OFF)
# Switch for using system Eigen or GTSAM-bundled Eigen
if(GTSAM_USE_SYSTEM_EIGEN)
- # Use generic Eigen include paths e.g.
- set(GTSAM_EIGEN_INCLUDE_PREFIX "")
-
find_package(Eigen3 REQUIRED)
include_directories(AFTER "${EIGEN3_INCLUDE_DIR}")
+
+ # Use generic Eigen include paths e.g.
+ set(GTSAM_EIGEN_INCLUDE_PREFIX "${EIGEN3_INCLUDE_DIR}")
+
+ # check if MKL is also enabled - can have one or the other, but not both!
+ if(EIGEN_USE_MKL_ALL)
+ message(FATAL_ERROR "MKL cannot be used together with system-installed Eigen, as MKL support relies on patches which are not yet in the system-installed Eigen. Disable either GTSAM_USE_SYSTEM_EIGEN or GTSAM_WITH_EIGEN_MKL")
+ endif()
else()
- # Use bundled Eigen include paths e.g.
- set(GTSAM_EIGEN_INCLUDE_PREFIX "gtsam/3rdparty/Eigen/")
-
+ # Use bundled Eigen include path.
# Clear any variables set by FindEigen3
if(EIGEN3_INCLUDE_DIR)
set(EIGEN3_INCLUDE_DIR NOTFOUND CACHE STRING "" FORCE)
endif()
+ # Add the bundled version of eigen to the include path so that it can still be included
+ # with #include
+ include_directories(BEFORE "gtsam/3rdparty/Eigen/")
+
+ # set full path to be used by external projects
+ # this will be added to GTSAM_INCLUDE_DIR by gtsam_extra.cmake.in
+ set(GTSAM_EIGEN_INCLUDE_PREFIX "${CMAKE_INSTALL_PREFIX}/include/gtsam/3rdparty/Eigen/")
+
endif()
-# Write Eigen include file with the paths for either the system Eigen or the GTSAM-bundled Eigen
-configure_file(gtsam/3rdparty/gtsam_eigen_includes.h.in gtsam/3rdparty/gtsam_eigen_includes.h)
-
-# Install the configuration file for Eigen
-install(FILES ${PROJECT_BINARY_DIR}/gtsam/3rdparty/gtsam_eigen_includes.h DESTINATION include/gtsam/3rdparty)
-
###############################################################################
# Global compile options
@@ -262,7 +277,8 @@ endif()
# Include boost - use 'BEFORE' so that a specific boost specified to CMake
# takes precedence over a system-installed one.
-include_directories(BEFORE ${Boost_INCLUDE_DIR})
+# Use 'SYSTEM' to ignore compiler warnings in Boost headers
+include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIR})
# Add includes for source directories 'BEFORE' boost and any system include
# paths so that the compiler uses GTSAM headers in our source directory instead
@@ -289,6 +305,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif()
endif()
+# As of XCode 7, clang also complains about this
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
+ add_definitions(-Wno-unused-local-typedefs)
+ endif()
+endif()
+
if(GTSAM_ENABLE_CONSISTENCY_CHECKS)
add_definitions(-DGTSAM_EXTRA_CONSISTENCY_CHECKS)
endif()
@@ -371,6 +394,8 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-dev (>= 1.43)") #Example: "libc6 (>=
# Print configuration variables
message(STATUS "===============================================================")
message(STATUS "================ Configuration Options ======================")
+message(STATUS " CMAKE_CXX_COMPILER_ID type : ${CMAKE_CXX_COMPILER_ID}")
+message(STATUS " CMAKE_CXX_COMPILER_VERSION : ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "Build flags ")
print_config_flag(${GTSAM_BUILD_TESTS} "Build Tests ")
print_config_flag(${GTSAM_BUILD_EXAMPLES_ALWAYS} "Build examples with 'make all' ")
@@ -389,6 +414,11 @@ if(NOT MSVC AND NOT XCODE_VERSION)
message(STATUS " C compilation flags : ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${cmake_build_type_toupper}}")
message(STATUS " C++ compilation flags : ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${cmake_build_type_toupper}}")
endif()
+if(GTSAM_USE_SYSTEM_EIGEN)
+ message(STATUS " Use System Eigen : Yes")
+else()
+ message(STATUS " Use System Eigen : No")
+endif()
if(GTSAM_USE_TBB)
message(STATUS " Use Intel TBB : Yes")
elseif(TBB_FOUND)
diff --git a/README.md b/README.md
index 679af5a2f..ccdc7f07e 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,7 @@ Prerequisites:
- [Boost](http://www.boost.org/users/download/) >= 1.43 (Ubuntu: `sudo apt-get install libboost-all-dev`)
- [CMake](http://www.cmake.org/cmake/resources/software.html) >= 2.6 (Ubuntu: `sudo apt-get install cmake`)
+- A modern compiler, i.e., at least gcc 4.7.3 on Linux.
Optional prerequisites - used automatically if findable by CMake:
@@ -46,6 +47,6 @@ See the [`INSTALL`](INSTALL) file for more detailed installation instructions.
GTSAM is open source under the BSD license, see the [`LICENSE`](LICENSE) and [`LICENSE.BSD`](LICENSE.BSD) files.
-Please see the [`examples/`](examples) directory and the [`USAGE`](USAGE.md) file for examples on how to use GTSAM.
-
+Please see the [`examples/`](examples) directory and the [`USAGE`](USAGE.md) file for examples on how to use GTSAM.
+
GTSAM was developed in the lab of [Frank Dellaert](http://www.cc.gatech.edu/~dellaert) at the [Georgia Institute of Technology](http://www.gatech.edu), with the help of many contributors over the years, see [THANKS](THANKS).
\ No newline at end of file
diff --git a/cmake/GtsamBuildTypes.cmake b/cmake/GtsamBuildTypes.cmake
index 1bead58d8..43ae36929 100644
--- a/cmake/GtsamBuildTypes.cmake
+++ b/cmake/GtsamBuildTypes.cmake
@@ -34,30 +34,31 @@ if(NOT FIRST_PASS_DONE)
set(CMAKE_MODULE_LINKER_FLAGS_PROFILING "${CMAKE_MODULE_LINKER_FLAGS_RELEASE}" CACHE STRING "Linker flags during profiling builds." FORCE)
mark_as_advanced(CMAKE_C_FLAGS_PROFILING CMAKE_CXX_FLAGS_PROFILING CMAKE_EXE_LINKER_FLAGS_PROFILING CMAKE_SHARED_LINKER_FLAGS_PROFILING CMAKE_MODULE_LINKER_FLAGS_PROFILING)
else()
- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fno-inline -Wall -DEIGEN_INITIALIZE_MATRICES_BY_NAN" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-inline -Wall -DEIGEN_INITIALIZE_MATRICES_BY_NAN" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3 -Wall -DNDEBUG" CACHE STRING "Flags used by the compiler during relwithdebinfo builds." FORCE)
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3 -Wall -DNDEBUG" CACHE STRING "Flags used by the compiler during relwithdebinfo builds." FORCE)
- set(CMAKE_C_FLAGS_RELEASE "-O3 -Wall -DNDEBUG -Wall" CACHE STRING "Flags used by the compiler during release builds." FORCE)
- set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -DNDEBUG -Wall" CACHE STRING "Flags used by the compiler during release builds." FORCE)
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -std=c11 -fno-inline -Wall -DEIGEN_INITIALIZE_MATRICES_BY_NAN" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -fno-inline -Wall -DEIGEN_INITIALIZE_MATRICES_BY_NAN" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-std=c11 -g -O3 -Wall -DNDEBUG" CACHE STRING "Flags used by the compiler during relwithdebinfo builds." FORCE)
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-std=c++11 -g -O3 -Wall -DNDEBUG" CACHE STRING "Flags used by the compiler during relwithdebinfo builds." FORCE)
+ set(CMAKE_C_FLAGS_RELEASE "-std=c11 -O3 -Wall -DNDEBUG -Wall" CACHE STRING "Flags used by the compiler during release builds." FORCE)
+ set(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -O3 -Wall -DNDEBUG -Wall" CACHE STRING "Flags used by the compiler during release builds." FORCE)
set(CMAKE_C_FLAGS_TIMING "${CMAKE_C_FLAGS_RELEASE} -DENABLE_TIMING" CACHE STRING "Flags used by the compiler during timing builds." FORCE)
set(CMAKE_CXX_FLAGS_TIMING "${CMAKE_CXX_FLAGS_RELEASE} -DENABLE_TIMING" CACHE STRING "Flags used by the compiler during timing builds." FORCE)
set(CMAKE_EXE_LINKER_FLAGS_TIMING "${CMAKE_EXE_LINKER_FLAGS_RELEASE}" CACHE STRING "Linker flags during timing builds." FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_TIMING "${CMAKE_EXE_LINKER_FLAGS_RELEASE}" CACHE STRING "Linker flags during timing builds." FORCE)
mark_as_advanced(CMAKE_C_FLAGS_TIMING CMAKE_CXX_FLAGS_TIMING CMAKE_EXE_LINKER_FLAGS_TIMING CMAKE_SHARED_LINKER_FLAGS_TIMING)
- set(CMAKE_C_FLAGS_PROFILING "-g -O3 -Wall -DNDEBUG" CACHE STRING "Flags used by the compiler during profiling builds." FORCE)
- set(CMAKE_CXX_FLAGS_PROFILING "-g -O3 -Wall -DNDEBUG" CACHE STRING "Flags used by the compiler during profiling builds." FORCE)
+ set(CMAKE_C_FLAGS_PROFILING "-std=c11 -g -O3 -Wall -DNDEBUG" CACHE STRING "Flags used by the compiler during profiling builds." FORCE)
+ set(CMAKE_CXX_FLAGS_PROFILING "-std=c++11 -g -O3 -Wall -DNDEBUG" CACHE STRING "Flags used by the compiler during profiling builds." FORCE)
set(CMAKE_EXE_LINKER_FLAGS_PROFILING "${CMAKE_EXE_LINKER_FLAGS_RELEASE}" CACHE STRING "Linker flags during profiling builds." FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_PROFILING "${CMAKE__LINKER_FLAGS_RELEASE}" CACHE STRING "Linker flags during profiling builds." FORCE)
mark_as_advanced(CMAKE_C_FLAGS_PROFILING CMAKE_CXX_FLAGS_PROFILING CMAKE_EXE_LINKER_FLAGS_PROFILING CMAKE_SHARED_LINKER_FLAGS_PROFILING)
endif()
endif()
-# Clang on Mac uses a template depth that is less than standard and is too small
+# Clang uses a template depth that is less than standard and is too small
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
- if(NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "5.0")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
- endif()
+ # Apple Clang before 5.0 does not support -ftemplate-depth.
+ if(NOT (APPLE AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "5.0"))
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
+ endif()
endif()
# Set up build type library postfixes
@@ -97,7 +98,8 @@ if( NOT cmake_build_type_tolower STREQUAL ""
AND NOT cmake_build_type_tolower STREQUAL "release"
AND NOT cmake_build_type_tolower STREQUAL "timing"
AND NOT cmake_build_type_tolower STREQUAL "profiling"
- AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+ AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo"
+ AND NOT cmake_build_type_tolower STREQUAL "minsizerel")
message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are None, Debug, Release, Timing, Profiling, RelWithDebInfo (case-insensitive).")
endif()
diff --git a/cmake/GtsamMatlabWrap.cmake b/cmake/GtsamMatlabWrap.cmake
index ba616b025..d1d3d93dd 100644
--- a/cmake/GtsamMatlabWrap.cmake
+++ b/cmake/GtsamMatlabWrap.cmake
@@ -270,7 +270,7 @@ function(install_wrapped_library_internal interfaceHeader)
if(GTSAM_BUILD_TYPE_POSTFIXES)
foreach(build_type ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${build_type}" build_type_upper)
- if("${build_type_upper}" STREQUAL "RELEASE")
+ if(${build_type_upper} STREQUAL "RELEASE")
set(build_type_tag "") # Don't create release mode tag on installed directory
else()
set(build_type_tag "${build_type}")
@@ -367,13 +367,18 @@ endfunction()
# should be installed to all build type toolboxes
function(install_matlab_scripts source_directory patterns)
set(patterns_args "")
+ set(exclude_patterns "")
+ if(NOT GTSAM_WRAP_SERIALIZATION)
+ set(exclude_patterns "testSerialization.m")
+ endif()
+
foreach(pattern ${patterns})
list(APPEND patterns_args PATTERN "${pattern}")
endforeach()
if(GTSAM_BUILD_TYPE_POSTFIXES)
foreach(build_type ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${build_type}" build_type_upper)
- if("${build_type_upper}" STREQUAL "RELEASE")
+ if(${build_type_upper} STREQUAL "RELEASE")
set(build_type_tag "") # Don't create release mode tag on installed directory
else()
set(build_type_tag "${build_type}")
@@ -381,10 +386,10 @@ function(install_matlab_scripts source_directory patterns)
# Split up filename to strip trailing '/' in GTSAM_TOOLBOX_INSTALL_PATH if there is one
get_filename_component(location "${GTSAM_TOOLBOX_INSTALL_PATH}" PATH)
get_filename_component(name "${GTSAM_TOOLBOX_INSTALL_PATH}" NAME)
- install(DIRECTORY "${source_directory}" DESTINATION "${location}/${name}${build_type_tag}" CONFIGURATIONS "${build_type}" FILES_MATCHING ${patterns_args} PATTERN ".svn" EXCLUDE)
+ install(DIRECTORY "${source_directory}" DESTINATION "${location}/${name}${build_type_tag}" CONFIGURATIONS "${build_type}" FILES_MATCHING ${patterns_args} PATTERN "${exclude_patterns}" EXCLUDE)
endforeach()
else()
- install(DIRECTORY "${source_directory}" DESTINATION "${GTSAM_TOOLBOX_INSTALL_PATH}" FILES_MATCHING ${patterns_args} PATTERN ".svn" EXCLUDE)
+ install(DIRECTORY "${source_directory}" DESTINATION "${GTSAM_TOOLBOX_INSTALL_PATH}" FILES_MATCHING ${patterns_args} PATTERN "${exclude_patterns}" EXCLUDE)
endif()
endfunction()
diff --git a/cmake/GtsamTesting.cmake b/cmake/GtsamTesting.cmake
index 4b3af9810..3e5cadd32 100644
--- a/cmake/GtsamTesting.cmake
+++ b/cmake/GtsamTesting.cmake
@@ -195,7 +195,9 @@ macro(gtsamAddTestsGlob_impl groupName globPatterns excludedFiles linkLibraries)
add_test(NAME ${target_name} COMMAND ${target_name})
add_dependencies(check.${groupName} ${target_name})
add_dependencies(check ${target_name})
- add_dependencies(all.tests ${script_name})
+ if(NOT XCODE_VERSION)
+ add_dependencies(all.tests ${script_name})
+ endif()
# Add TOPSRCDIR
set_property(SOURCE ${script_srcs} APPEND PROPERTY COMPILE_DEFINITIONS "TOPSRCDIR=\"${PROJECT_SOURCE_DIR}\"")
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 000000000..8a3139177
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,3 @@
+/html/
+*.lyx~
+*.bib~
diff --git a/examples/Data/.gitignore b/examples/Data/.gitignore
new file mode 100644
index 000000000..2211df63d
--- /dev/null
+++ b/examples/Data/.gitignore
@@ -0,0 +1 @@
+*.txt
diff --git a/examples/PlanarSLAMExample.cpp b/examples/PlanarSLAMExample.cpp
index 84f9be3a1..a716f9cd8 100644
--- a/examples/PlanarSLAMExample.cpp
+++ b/examples/PlanarSLAMExample.cpp
@@ -42,7 +42,7 @@
// Also, we will initialize the robot at the origin using a Prior factor.
#include
#include
-#include
+#include
// When the factors are created, we will add them to a Factor Graph. As the factors we are using
// are nonlinear factors, we will need a Nonlinear Factor Graph.
diff --git a/examples/Pose2SLAMExampleExpressions.cpp b/examples/Pose2SLAMExampleExpressions.cpp
index 92f94c3f3..1f6de6cb1 100644
--- a/examples/Pose2SLAMExampleExpressions.cpp
+++ b/examples/Pose2SLAMExampleExpressions.cpp
@@ -14,20 +14,18 @@
* @brief Expressions version of Pose2SLAMExample.cpp
* @date Oct 2, 2014
* @author Frank Dellaert
- * @author Yong Dian Jian
*/
// The two new headers that allow using our Automatic Differentiation Expression framework
#include
#include
-// Header order is close to far
-#include
+// For an explanation of headers below, please see Pose2SLAMExample.cpp
+#include
+#include
+#include
#include
#include
-#include
-#include
-#include
using namespace std;
using namespace gtsam;
diff --git a/examples/Pose2SLAMExample_g2o.cpp b/examples/Pose2SLAMExample_g2o.cpp
index 564930d74..35f9884e1 100644
--- a/examples/Pose2SLAMExample_g2o.cpp
+++ b/examples/Pose2SLAMExample_g2o.cpp
@@ -20,6 +20,7 @@
#include
#include
+#include
#include
#include
diff --git a/examples/Pose2SLAMExample_graph.cpp b/examples/Pose2SLAMExample_graph.cpp
index 46ca02ee4..c3d901507 100644
--- a/examples/Pose2SLAMExample_graph.cpp
+++ b/examples/Pose2SLAMExample_graph.cpp
@@ -16,11 +16,15 @@
* @author Frank Dellaert
*/
-#include
+// For an explanation of headers below, please see Pose2SLAMExample.cpp
#include
-#include
-#include
+#include
#include
+#include
+#include
+
+// This new header allows us to read examples easily from .graph files
+#include
using namespace std;
using namespace gtsam;
diff --git a/examples/Pose2SLAMExample_graphviz.cpp b/examples/Pose2SLAMExample_graphviz.cpp
index 818a9e577..314ccbdb4 100644
--- a/examples/Pose2SLAMExample_graphviz.cpp
+++ b/examples/Pose2SLAMExample_graphviz.cpp
@@ -16,11 +16,11 @@
* @author Frank Dellaert
*/
+// For an explanation of headers below, please see Pose2SLAMExample.cpp
#include
#include
-#include
-#include
#include
+#include
#include
using namespace std;
diff --git a/examples/Pose2SLAMExample_lago.cpp b/examples/Pose2SLAMExample_lago.cpp
index 9507797eb..b83dfa1db 100644
--- a/examples/Pose2SLAMExample_lago.cpp
+++ b/examples/Pose2SLAMExample_lago.cpp
@@ -22,6 +22,7 @@
#include
#include
#include
+#include
#include
using namespace std;
diff --git a/examples/Pose2SLAMwSPCG.cpp b/examples/Pose2SLAMwSPCG.cpp
index 4422586b0..2c25d2f8e 100644
--- a/examples/Pose2SLAMwSPCG.cpp
+++ b/examples/Pose2SLAMwSPCG.cpp
@@ -16,47 +16,15 @@
* @date June 2, 2012
*/
-/**
- * A simple 2D pose slam example solved using a Conjugate-Gradient method
- * - The robot moves in a 2 meter square
- * - The robot moves 2 meters each step, turning 90 degrees after each step
- * - The robot initially faces along the X axis (horizontal, to the right in 2D)
- * - We have full odometry between pose
- * - We have a loop closure constraint when the robot returns to the first position
- */
-
-// As this is a planar SLAM example, we will use Pose2 variables (x, y, theta) to represent
-// the robot positions
-#include
-#include
-
-// Each variable in the system (poses) must be identified with a unique key.
-// We can either use simple integer keys (1, 2, 3, ...) or symbols (X1, X2, L1).
-// Here we will use simple integer keys
-#include
-
-// In GTSAM, measurement functions are represented as 'factors'. Several common factors
-// have been provided with the library for solving robotics/SLAM/Bundle Adjustment problems.
-// Here we will use Between factors for the relative motion described by odometry measurements.
-// We will also use a Between Factor to encode the loop closure constraint
-// Also, we will initialize the robot at the origin using a Prior factor.
+// For an explanation of headers below, please see Pose2SLAMExample.cpp
#include
#include
-
-// When the factors are created, we will add them to a Factor Graph. As the factors we are using
-// are nonlinear factors, we will need a Nonlinear Factor Graph.
-#include
-
-// The nonlinear solvers within GTSAM are iterative solvers, meaning they linearize the
-// nonlinear functions around an initial linearization point, then solve the linear system
-// to update the linearization point. This happens repeatedly until the solver converges
-// to a consistent set of variable values. This requires us to specify an initial guess
-// for each variable, held in a Values container.
-#include
-
-#include
+#include
#include
+// In contrast to that example, however, we will use a PCG solver here
+#include
+
using namespace std;
using namespace gtsam;
@@ -66,32 +34,24 @@ int main(int argc, char** argv) {
NonlinearFactorGraph graph;
// 2a. Add a prior on the first pose, setting it to the origin
- // A prior factor consists of a mean and a noise model (covariance matrix)
Pose2 prior(0.0, 0.0, 0.0); // prior at origin
noiseModel::Diagonal::shared_ptr priorNoise = noiseModel::Diagonal::Sigmas(Vector3(0.3, 0.3, 0.1));
graph.push_back(PriorFactor(1, prior, priorNoise));
// 2b. Add odometry factors
- // For simplicity, we will use the same noise model for each odometry factor
noiseModel::Diagonal::shared_ptr odometryNoise = noiseModel::Diagonal::Sigmas(Vector3(0.2, 0.2, 0.1));
- // Create odometry (Between) factors between consecutive poses
graph.push_back(BetweenFactor(1, 2, Pose2(2.0, 0.0, M_PI_2), odometryNoise));
graph.push_back(BetweenFactor(2, 3, Pose2(2.0, 0.0, M_PI_2), odometryNoise));
graph.push_back(BetweenFactor(3, 4, Pose2(2.0, 0.0, M_PI_2), odometryNoise));
graph.push_back(BetweenFactor(4, 5, Pose2(2.0, 0.0, M_PI_2), odometryNoise));
// 2c. Add the loop closure constraint
- // This factor encodes the fact that we have returned to the same pose. In real systems,
- // these constraints may be identified in many ways, such as appearance-based techniques
- // with camera images.
- // We will use another Between Factor to enforce this constraint, with the distance set to zero,
noiseModel::Diagonal::shared_ptr model = noiseModel::Diagonal::Sigmas(Vector3(0.2, 0.2, 0.1));
graph.push_back(BetweenFactor(5, 1, Pose2(0.0, 0.0, 0.0), model));
graph.print("\nFactor Graph:\n"); // print
// 3. Create the data structure to hold the initialEstimate estimate to the solution
- // For illustrative purposes, these have been deliberately set to incorrect values
Values initialEstimate;
initialEstimate.insert(1, Pose2(0.5, 0.0, 0.2));
initialEstimate.insert(2, Pose2(2.3, 0.1, 1.1));
@@ -104,15 +64,18 @@ int main(int argc, char** argv) {
LevenbergMarquardtParams parameters;
parameters.verbosity = NonlinearOptimizerParams::ERROR;
parameters.verbosityLM = LevenbergMarquardtParams::LAMBDA;
- parameters.linearSolverType = NonlinearOptimizerParams::Iterative;
- {
- parameters.iterativeParams = boost::make_shared();
- LevenbergMarquardtOptimizer optimizer(graph, initialEstimate, parameters);
- Values result = optimizer.optimize();
- result.print("Final Result:\n");
- cout << "subgraph solver final error = " << graph.error(result) << endl;
- }
+ // LM is still the outer optimization loop, but by specifying "Iterative" below
+ // We indicate that an iterative linear solver should be used.
+ // In addition, the *type* of the iterativeParams decides on the type of
+ // iterative solver, in this case the SPCG (subgraph PCG)
+ parameters.linearSolverType = NonlinearOptimizerParams::Iterative;
+ parameters.iterativeParams = boost::make_shared();
+
+ LevenbergMarquardtOptimizer optimizer(graph, initialEstimate, parameters);
+ Values result = optimizer.optimize();
+ result.print("Final Result:\n");
+ cout << "subgraph solver final error = " << graph.error(result) << endl;
return 0;
}
diff --git a/examples/RangeISAMExample_plaza2.cpp b/examples/RangeISAMExample_plaza2.cpp
index 04632e9e3..4d116c7ec 100644
--- a/examples/RangeISAMExample_plaza2.cpp
+++ b/examples/RangeISAMExample_plaza2.cpp
@@ -39,7 +39,7 @@
// have been provided with the library for solving robotics SLAM problems.
#include
#include
-#include
+#include
#include
// Standard headers, added last, so we know headers above work on their own
diff --git a/examples/SFMExample.cpp b/examples/SFMExample.cpp
index 5be266d11..8da9847b8 100644
--- a/examples/SFMExample.cpp
+++ b/examples/SFMExample.cpp
@@ -15,13 +15,7 @@
* @author Duy-Nguyen Ta
*/
-/**
- * A structure-from-motion example with landmarks
- * - The landmarks form a 10 meter cube
- * - The robot rotates around the landmarks, always facing towards the cube
- */
-
-// For loading the data
+// For loading the data, see the comments therein for scenario (camera rotates around cube)
#include "SFMdata.h"
// Camera observations of landmarks (i.e. pixel coordinates) will be stored as Point2 (x, y).
@@ -103,7 +97,7 @@ int main(int argc, char* argv[]) {
// Intentionally initialize the variables off from the ground truth
Values initialEstimate;
for (size_t i = 0; i < poses.size(); ++i)
- initialEstimate.insert(Symbol('x', i), poses[i].compose(Pose3(Rot3::rodriguez(-0.1, 0.2, 0.25), Point3(0.05, -0.10, 0.20))));
+ initialEstimate.insert(Symbol('x', i), poses[i].compose(Pose3(Rot3::Rodrigues(-0.1, 0.2, 0.25), Point3(0.05, -0.10, 0.20))));
for (size_t j = 0; j < points.size(); ++j)
initialEstimate.insert(Symbol('l', j), points[j].compose(Point3(-0.25, 0.20, 0.15)));
initialEstimate.print("Initial Estimates:\n");
diff --git a/examples/SFMExampleExpressions.cpp b/examples/SFMExampleExpressions.cpp
index e9c9e920d..df5488ec3 100644
--- a/examples/SFMExampleExpressions.cpp
+++ b/examples/SFMExampleExpressions.cpp
@@ -84,7 +84,7 @@ int main(int argc, char* argv[]) {
// Create perturbed initial
Values initial;
- Pose3 delta(Rot3::rodriguez(-0.1, 0.2, 0.25), Point3(0.05, -0.10, 0.20));
+ Pose3 delta(Rot3::Rodrigues(-0.1, 0.2, 0.25), Point3(0.05, -0.10, 0.20));
for (size_t i = 0; i < poses.size(); ++i)
initial.insert(Symbol('x', i), poses[i].compose(delta));
for (size_t j = 0; j < points.size(); ++j)
diff --git a/examples/SFMExample_SmartFactor.cpp b/examples/SFMExample_SmartFactor.cpp
index b999e6600..e7c0aa696 100644
--- a/examples/SFMExample_SmartFactor.cpp
+++ b/examples/SFMExample_SmartFactor.cpp
@@ -17,51 +17,25 @@
* @author Frank Dellaert
*/
-/**
- * A structure-from-motion example with landmarks
- * - The landmarks form a 10 meter cube
- * - The robot rotates around the landmarks, always facing towards the cube
- */
-
-// For loading the data
-#include "SFMdata.h"
-
-// Camera observations of landmarks (i.e. pixel coordinates) will be stored as Point2 (x, y).
-#include
-
// In GTSAM, measurement functions are represented as 'factors'.
-// The factor we used here is SmartProjectionPoseFactor. Every smart factor represent a single landmark,
-// The SmartProjectionPoseFactor only optimize the pose of camera, not the calibration,
-// The calibration should be known.
+// The factor we used here is SmartProjectionPoseFactor.
+// Every smart factor represent a single landmark, seen from multiple cameras.
+// The SmartProjectionPoseFactor only optimizes for the poses of a camera,
+// not the calibration, which is assumed known.
#include
-// Also, we will initialize the robot at some location using a Prior factor.
-#include
-
-// When the factors are created, we will add them to a Factor Graph. As the factors we are using
-// are nonlinear factors, we will need a Nonlinear Factor Graph.
-#include
-
-// Finally, once all of the factors have been added to our factor graph, we will want to
-// solve/optimize to graph to find the best (Maximum A Posteriori) set of variable values.
-// GTSAM includes several nonlinear optimizers to perform this step. Here we will use a
-// trust-region method known as Powell's Degleg
-#include
-
-// The nonlinear solvers within GTSAM are iterative solvers, meaning they linearize the
-// nonlinear functions around an initial linearization point, then solve the linear system
-// to update the linearization point. This happens repeatedly until the solver converges
-// to a consistent set of variable values. This requires us to specify an initial guess
-// for each variable, held in a Values container.
-#include
-
-#include
+// For an explanation of these headers, see SFMExample.cpp
+#include "SFMdata.h"
+#include
using namespace std;
using namespace gtsam;
// Make the typename short so it looks much cleaner
-typedef gtsam::SmartProjectionPoseFactor SmartFactor;
+typedef SmartProjectionPoseFactor SmartFactor;
+
+// create a typedef to the camera type
+typedef PinholePose Camera;
/* ************************************************************************* */
int main(int argc, char* argv[]) {
@@ -84,12 +58,12 @@ int main(int argc, char* argv[]) {
for (size_t j = 0; j < points.size(); ++j) {
// every landmark represent a single landmark, we use shared pointer to init the factor, and then insert measurements.
- SmartFactor::shared_ptr smartfactor(new SmartFactor());
+ SmartFactor::shared_ptr smartfactor(new SmartFactor(measurementNoise, K));
for (size_t i = 0; i < poses.size(); ++i) {
// generate the 2D measurement
- SimpleCamera camera(poses[i], *K);
+ Camera camera(poses[i], K);
Point2 measurement = camera.project(points[j]);
// call add() function to add measurement into a single factor, here we need to add:
@@ -97,7 +71,7 @@ int main(int argc, char* argv[]) {
// 2. the corresponding camera's key
// 3. camera noise model
// 4. camera calibration
- smartfactor->add(measurement, i, measurementNoise, K);
+ smartfactor->add(measurement, i);
}
// insert the smart factor in the graph
@@ -106,28 +80,29 @@ int main(int argc, char* argv[]) {
// Add a prior on pose x0. This indirectly specifies where the origin is.
// 30cm std on x,y,z 0.1 rad on roll,pitch,yaw
- noiseModel::Diagonal::shared_ptr poseNoise = noiseModel::Diagonal::Sigmas(
+ noiseModel::Diagonal::shared_ptr noise = noiseModel::Diagonal::Sigmas(
(Vector(6) << Vector3::Constant(0.3), Vector3::Constant(0.1)).finished());
- graph.push_back(PriorFactor(0, poses[0], poseNoise));
+ graph.push_back(PriorFactor(0, Camera(poses[0],K), noise));
// Because the structure-from-motion problem has a scale ambiguity, the problem is
// still under-constrained. Here we add a prior on the second pose x1, so this will
// fix the scale by indicating the distance between x0 and x1.
// Because these two are fixed, the rest of the poses will be also be fixed.
- graph.push_back(PriorFactor(1, poses[1], poseNoise)); // add directly to graph
+ graph.push_back(PriorFactor(1, Camera(poses[1],K), noise)); // add directly to graph
graph.print("Factor Graph:\n");
// Create the initial estimate to the solution
// Intentionally initialize the variables off from the ground truth
Values initialEstimate;
- Pose3 delta(Rot3::rodriguez(-0.1, 0.2, 0.25), Point3(0.05, -0.10, 0.20));
+ Pose3 delta(Rot3::Rodrigues(-0.1, 0.2, 0.25), Point3(0.05, -0.10, 0.20));
for (size_t i = 0; i < poses.size(); ++i)
- initialEstimate.insert(i, poses[i].compose(delta));
+ initialEstimate.insert(i, Camera(poses[i].compose(delta), K));
initialEstimate.print("Initial Estimates:\n");
// Optimize the graph and print results
- Values result = DoglegOptimizer(graph, initialEstimate).optimize();
+ LevenbergMarquardtOptimizer optimizer(graph, initialEstimate);
+ Values result = optimizer.optimize();
result.print("Final results:\n");
// A smart factor represent the 3D point inside the factor, not as a variable.
@@ -136,20 +111,20 @@ int main(int argc, char* argv[]) {
Values landmark_result;
for (size_t j = 0; j < points.size(); ++j) {
- // The output of point() is in boost::optional, as sometimes
- // the triangulation operation inside smart factor will encounter degeneracy.
- boost::optional point;
-
// The graph stores Factor shared_ptrs, so we cast back to a SmartFactor first
SmartFactor::shared_ptr smart = boost::dynamic_pointer_cast(graph[j]);
if (smart) {
- point = smart->point(result);
+ // The output of point() is in boost::optional, as sometimes
+ // the triangulation operation inside smart factor will encounter degeneracy.
+ boost::optional point = smart->point(result);
if (point) // ignore if boost::optional return NULL
landmark_result.insert(j, *point);
}
}
landmark_result.print("Landmark results:\n");
+ cout << "final error: " << graph.error(result) << endl;
+ cout << "number of iterations: " << optimizer.iterations() << endl;
return 0;
}
diff --git a/examples/SFMExample_SmartFactorPCG.cpp b/examples/SFMExample_SmartFactorPCG.cpp
new file mode 100644
index 000000000..743934c7c
--- /dev/null
+++ b/examples/SFMExample_SmartFactorPCG.cpp
@@ -0,0 +1,129 @@
+/* ----------------------------------------------------------------------------
+
+ * GTSAM Copyright 2010, Georgia Tech Research Corporation,
+ * Atlanta, Georgia 30332-0415
+ * All Rights Reserved
+ * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
+
+ * See LICENSE for the license information
+
+ * -------------------------------------------------------------------------- */
+
+/**
+ * @file SFMExample_SmartFactorPCG.cpp
+ * @brief Version of SFMExample_SmartFactor that uses Preconditioned Conjugate Gradient
+ * @author Frank Dellaert
+ */
+
+// For an explanation of these headers, see SFMExample_SmartFactor.cpp
+#include "SFMdata.h"
+#include
+
+// These extra headers allow us a LM outer loop with PCG linear solver (inner loop)
+#include
+#include
+#include
+
+using namespace std;
+using namespace gtsam;
+
+// Make the typename short so it looks much cleaner
+typedef SmartProjectionPoseFactor SmartFactor;
+
+// create a typedef to the camera type
+typedef PinholePose Camera;
+
+/* ************************************************************************* */
+int main(int argc, char* argv[]) {
+
+ // Define the camera calibration parameters
+ Cal3_S2::shared_ptr K(new Cal3_S2(50.0, 50.0, 0.0, 50.0, 50.0));
+
+ // Define the camera observation noise model
+ noiseModel::Isotropic::shared_ptr measurementNoise =
+ noiseModel::Isotropic::Sigma(2, 1.0); // one pixel in u and v
+
+ // Create the set of ground-truth landmarks and poses
+ vector points = createPoints();
+ vector poses = createPoses();
+
+ // Create a factor graph
+ NonlinearFactorGraph graph;
+
+ // Simulated measurements from each camera pose, adding them to the factor graph
+ for (size_t j = 0; j < points.size(); ++j) {
+
+ // every landmark represent a single landmark, we use shared pointer to init the factor, and then insert measurements.
+ SmartFactor::shared_ptr smartfactor(new SmartFactor(measurementNoise, K));
+
+ for (size_t i = 0; i < poses.size(); ++i) {
+
+ // generate the 2D measurement
+ Camera camera(poses[i], K);
+ Point2 measurement = camera.project(points[j]);
+
+ // call add() function to add measurement into a single factor, here we need to add:
+ smartfactor->add(measurement, i);
+ }
+
+ // insert the smart factor in the graph
+ graph.push_back(smartfactor);
+ }
+
+ // Add a prior on pose x0. This indirectly specifies where the origin is.
+ // 30cm std on x,y,z 0.1 rad on roll,pitch,yaw
+ noiseModel::Diagonal::shared_ptr noise = noiseModel::Diagonal::Sigmas(
+ (Vector(6) << Vector3::Constant(0.3), Vector3::Constant(0.1)).finished());
+ graph.push_back(PriorFactor(0, Camera(poses[0],K), noise));
+
+ // Fix the scale ambiguity by adding a prior
+ graph.push_back(PriorFactor(1, Camera(poses[0],K), noise));
+
+ // Create the initial estimate to the solution
+ Values initialEstimate;
+ Pose3 delta(Rot3::Rodrigues(-0.1, 0.2, 0.25), Point3(0.05, -0.10, 0.20));
+ for (size_t i = 0; i < poses.size(); ++i)
+ initialEstimate.insert(i, Camera(poses[i].compose(delta),K));
+
+ // We will use LM in the outer optimization loop, but by specifying "Iterative" below
+ // We indicate that an iterative linear solver should be used.
+ // In addition, the *type* of the iterativeParams decides on the type of
+ // iterative solver, in this case the SPCG (subgraph PCG)
+ LevenbergMarquardtParams parameters;
+ parameters.linearSolverType = NonlinearOptimizerParams::Iterative;
+ parameters.absoluteErrorTol = 1e-10;
+ parameters.relativeErrorTol = 1e-10;
+ parameters.maxIterations = 500;
+ PCGSolverParameters::shared_ptr pcg =
+ boost::make_shared();
+ pcg->preconditioner_ =
+ boost::make_shared();
+ // Following is crucial:
+ pcg->setEpsilon_abs(1e-10);
+ pcg->setEpsilon_rel(1e-10);
+ parameters.iterativeParams = pcg;
+
+ LevenbergMarquardtOptimizer optimizer(graph, initialEstimate, parameters);
+ Values result = optimizer.optimize();
+
+ // Display result as in SFMExample_SmartFactor.run
+ result.print("Final results:\n");
+ Values landmark_result;
+ for (size_t j = 0; j < points.size(); ++j) {
+ SmartFactor::shared_ptr smart = //
+ boost::dynamic_pointer_cast(graph[j]);
+ if (smart) {
+ boost::optional point = smart->point(result);
+ if (point) // ignore if boost::optional return NULL
+ landmark_result.insert(j, *point);
+ }
+ }
+
+ landmark_result.print("Landmark results:\n");
+ cout << "final error: " << graph.error(result) << endl;
+ cout << "number of iterations: " << optimizer.iterations() << endl;
+
+ return 0;
+}
+/* ************************************************************************* */
+
diff --git a/examples/SFMExample_bal_COLAMD_METIS.cpp b/examples/SFMExample_bal_COLAMD_METIS.cpp
new file mode 100644
index 000000000..4bbaac3ef
--- /dev/null
+++ b/examples/SFMExample_bal_COLAMD_METIS.cpp
@@ -0,0 +1,144 @@
+/* ----------------------------------------------------------------------------
+
+ * GTSAM Copyright 2010, Georgia Tech Research Corporation,
+ * Atlanta, Georgia 30332-0415
+ * All Rights Reserved
+ * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
+
+ * See LICENSE for the license information
+
+ * -------------------------------------------------------------------------- */
+
+/**
+ * @file SFMExample.cpp
+ * @brief This file is to compare the ordering performance for COLAMD vs METIS.
+ * Example problem is to solve a structure-from-motion problem from a "Bundle Adjustment in the Large" file.
+ * @author Frank Dellaert, Zhaoyang Lv
+ */
+
+// For an explanation of headers, see SFMExample.cpp
+#include
+#include
+#include
+#include
+#include
+#include
+#include // for loading BAL datasets !
+
+#include
+
+#include
+
+using namespace std;
+using namespace gtsam;
+using symbol_shorthand::C;
+using symbol_shorthand::P;
+
+// We will be using a projection factor that ties a SFM_Camera to a 3D point.
+// An SFM_Camera is defined in datase.h as a camera with unknown Cal3Bundler calibration
+// and has a total of 9 free parameters
+typedef GeneralSFMFactor MyFactor;
+
+/* ************************************************************************* */
+int main (int argc, char* argv[]) {
+
+ // Find default file, but if an argument is given, try loading a file
+ string filename = findExampleDataFile("dubrovnik-3-7-pre");
+ if (argc>1) filename = string(argv[1]);
+
+ // Load the SfM data from file
+ SfM_data mydata;
+ readBAL(filename, mydata);
+ cout << boost::format("read %1% tracks on %2% cameras\n") % mydata.number_tracks() % mydata.number_cameras();
+
+ // Create a factor graph
+ NonlinearFactorGraph graph;
+
+ // We share *one* noiseModel between all projection factors
+ noiseModel::Isotropic::shared_ptr noise =
+ noiseModel::Isotropic::Sigma(2, 1.0); // one pixel in u and v
+
+ // Add measurements to the factor graph
+ size_t j = 0;
+ BOOST_FOREACH(const SfM_Track& track, mydata.tracks) {
+ BOOST_FOREACH(const SfM_Measurement& m, track.measurements) {
+ size_t i = m.first;
+ Point2 uv = m.second;
+ graph.push_back(MyFactor(uv, noise, C(i), P(j))); // note use of shorthand symbols C and P
+ }
+ j += 1;
+ }
+
+ // Add a prior on pose x1. This indirectly specifies where the origin is.
+ // and a prior on the position of the first landmark to fix the scale
+ graph.push_back(PriorFactor(C(0), mydata.cameras[0], noiseModel::Isotropic::Sigma(9, 0.1)));
+ graph.push_back(PriorFactor (P(0), mydata.tracks[0].p, noiseModel::Isotropic::Sigma(3, 0.1)));
+
+ // Create initial estimate
+ Values initial;
+ size_t i = 0; j = 0;
+ BOOST_FOREACH(const SfM_Camera& camera, mydata.cameras) initial.insert(C(i++), camera);
+ BOOST_FOREACH(const SfM_Track& track, mydata.tracks) initial.insert(P(j++), track.p);
+
+ /** --------------- COMPARISON -----------------------**/
+ /** ----------------------------------------------------**/
+
+ LevenbergMarquardtParams params_using_COLAMD, params_using_METIS;
+ try {
+ params_using_METIS.setVerbosity("ERROR");
+ gttic_(METIS_ORDERING);
+ params_using_METIS.ordering = Ordering::Create(Ordering::METIS, graph);
+ gttoc_(METIS_ORDERING);
+
+ params_using_COLAMD.setVerbosity("ERROR");
+ gttic_(COLAMD_ORDERING);
+ params_using_COLAMD.ordering = Ordering::Create(Ordering::COLAMD, graph);
+ gttoc_(COLAMD_ORDERING);
+ } catch (exception& e) {
+ cout << e.what();
+ }
+
+ // expect they have different ordering results
+ if(params_using_COLAMD.ordering == params_using_METIS.ordering) {
+ cout << "COLAMD and METIS produce the same ordering. "
+ << "Problem here!!!" << endl;
+ }
+
+ /* Optimize the graph with METIS and COLAMD and time the results */
+
+ Values result_METIS, result_COLAMD;
+ try {
+ gttic_(OPTIMIZE_WITH_METIS);
+ LevenbergMarquardtOptimizer lm_METIS(graph, initial, params_using_METIS);
+ result_METIS = lm_METIS.optimize();
+ gttoc_(OPTIMIZE_WITH_METIS);
+
+ gttic_(OPTIMIZE_WITH_COLAMD);
+ LevenbergMarquardtOptimizer lm_COLAMD(graph, initial, params_using_COLAMD);
+ result_COLAMD = lm_COLAMD.optimize();
+ gttoc_(OPTIMIZE_WITH_COLAMD);
+ } catch (exception& e) {
+ cout << e.what();
+ }
+
+
+ { // printing the result
+
+ cout << "COLAMD final error: " << graph.error(result_COLAMD) << endl;
+ cout << "METIS final error: " << graph.error(result_METIS) << endl;
+
+ cout << endl << endl;
+
+ cout << "Time comparison by solving " << filename << " results:" << endl;
+ cout << boost::format("%1% point tracks and %2% cameras\n") \
+ % mydata.number_tracks() % mydata.number_cameras() \
+ << endl;
+
+ tictoc_print_();
+ }
+
+
+ return 0;
+}
+/* ************************************************************************* */
+
diff --git a/examples/SelfCalibrationExample.cpp b/examples/SelfCalibrationExample.cpp
index 8ebf005ab..f5702e7fb 100644
--- a/examples/SelfCalibrationExample.cpp
+++ b/examples/SelfCalibrationExample.cpp
@@ -82,7 +82,7 @@ int main(int argc, char* argv[]) {
Values initialEstimate;
initialEstimate.insert(Symbol('K', 0), Cal3_S2(60.0, 60.0, 0.0, 45.0, 45.0));
for (size_t i = 0; i < poses.size(); ++i)
- initialEstimate.insert(Symbol('x', i), poses[i].compose(Pose3(Rot3::rodriguez(-0.1, 0.2, 0.25), Point3(0.05, -0.10, 0.20))));
+ initialEstimate.insert(Symbol('x', i), poses[i].compose(Pose3(Rot3::Rodrigues(-0.1, 0.2, 0.25), Point3(0.05, -0.10, 0.20))));
for (size_t j = 0; j < points.size(); ++j)
initialEstimate.insert(Symbol('l', j), points[j].compose(Point3(-0.25, 0.20, 0.15)));
diff --git a/examples/SolverComparer.cpp b/examples/SolverComparer.cpp
index 923b0b9de..2000b348b 100644
--- a/examples/SolverComparer.cpp
+++ b/examples/SolverComparer.cpp
@@ -31,28 +31,30 @@
*
*/
-#include
-#include
-#include
-#include
-#include
#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#include
#include
#include
+#include
+#include
+#include
+#include
+#include
+#include // for GTSAM_USE_TBB
-#include
-#include
-#include
#include
-#include
+#include
#include
#include
#include
+#include
+
+#include
+#include
#ifdef GTSAM_USE_TBB
#include
@@ -72,23 +74,6 @@ typedef NoiseModelFactor1 NM1;
typedef NoiseModelFactor2 NM2;
typedef BearingRangeFactor BR;
-//GTSAM_VALUE_EXPORT(Value);
-//GTSAM_VALUE_EXPORT(Pose);
-//GTSAM_VALUE_EXPORT(Rot2);
-//GTSAM_VALUE_EXPORT(Point2);
-//GTSAM_VALUE_EXPORT(NonlinearFactor);
-//GTSAM_VALUE_EXPORT(NoiseModelFactor);
-//GTSAM_VALUE_EXPORT(NM1);
-//GTSAM_VALUE_EXPORT(NM2);
-//GTSAM_VALUE_EXPORT(BetweenFactor);
-//GTSAM_VALUE_EXPORT(PriorFactor);
-//GTSAM_VALUE_EXPORT(BR);
-//GTSAM_VALUE_EXPORT(noiseModel::Base);
-//GTSAM_VALUE_EXPORT(noiseModel::Isotropic);
-//GTSAM_VALUE_EXPORT(noiseModel::Gaussian);
-//GTSAM_VALUE_EXPORT(noiseModel::Diagonal);
-//GTSAM_VALUE_EXPORT(noiseModel::Unit);
-
double chi2_red(const gtsam::NonlinearFactorGraph& graph, const gtsam::Values& config) {
// Compute degrees of freedom (observations - variables)
// In ocaml, +1 was added to the observations to account for the prior, but
@@ -269,12 +254,12 @@ void runIncremental()
boost::dynamic_pointer_cast >(datasetMeasurements[nextMeasurement]))
{
Key key1 = measurement->key1(), key2 = measurement->key2();
- if((key1 >= firstStep && key1 < key2) || (key2 >= firstStep && key2 < key1)) {
+ if(((int)key1 >= firstStep && key1 < key2) || ((int)key2 >= firstStep && key2 < key1)) {
// We found an odometry starting at firstStep
firstPose = std::min(key1, key2);
break;
}
- if((key2 >= firstStep && key1 < key2) || (key1 >= firstStep && key2 < key1)) {
+ if(((int)key2 >= firstStep && key1 < key2) || ((int)key1 >= firstStep && key2 < key1)) {
// We found an odometry joining firstStep with a previous pose
havePreviousPose = true;
firstPose = std::max(key1, key2);
@@ -303,7 +288,9 @@ void runIncremental()
cout << "Playing forward time steps..." << endl;
- for(size_t step = firstPose; nextMeasurement < datasetMeasurements.size() && (lastStep == -1 || step <= lastStep); ++step)
+ for (size_t step = firstPose;
+ nextMeasurement < datasetMeasurements.size() && (lastStep == -1 || (int)step <= lastStep);
+ ++step)
{
Values newVariables;
NonlinearFactorGraph newFactors;
@@ -589,7 +576,7 @@ void runStats()
{
cout << "Gathering statistics..." << endl;
GaussianFactorGraph linear = *datasetMeasurements.linearize(initial);
- GaussianJunctionTree jt(GaussianEliminationTree(linear, Ordering::colamd(linear)));
+ GaussianJunctionTree jt(GaussianEliminationTree(linear, Ordering::Colamd(linear)));
treeTraversal::ForestStatistics statistics = treeTraversal::GatherStatistics(jt);
ofstream file;
diff --git a/examples/TimeTBB.cpp b/examples/TimeTBB.cpp
index a35980836..602a00593 100644
--- a/examples/TimeTBB.cpp
+++ b/examples/TimeTBB.cpp
@@ -17,6 +17,7 @@
#include
#include
+
#include
#include
#include