diff --git a/.cproject b/.cproject index cf4a82bfd..2e1833b0a 100644 --- a/.cproject +++ b/.cproject @@ -302,7 +302,6 @@ make - check true true @@ -310,7 +309,6 @@ make - clean true true @@ -318,7 +316,6 @@ make - testBTree.run true true @@ -326,7 +323,6 @@ make - testDSF.run true true @@ -334,7 +330,6 @@ make - testDSFVector.run true true @@ -342,7 +337,6 @@ make - testMatrix.run true true @@ -350,7 +344,6 @@ make - testSPQRUtil.run true true @@ -358,7 +351,6 @@ make - testVector.run true true @@ -366,13 +358,19 @@ make - timeMatrix.run true true true + make + all + true + true + true + + make all @@ -382,7 +380,6 @@ make - check true true @@ -390,7 +387,6 @@ make - testGaussianFactorGraph.run true true @@ -398,7 +394,6 @@ make - testGaussianISAM.run true true @@ -406,7 +401,6 @@ make - testGaussianISAM2.run true true @@ -414,7 +408,6 @@ make - testGraph.run true false @@ -422,7 +415,6 @@ make - testIterative.run true true @@ -430,7 +422,6 @@ make - testNonlinearEquality.run true true @@ -438,7 +429,6 @@ make - testNonlinearFactor.run true true @@ -446,7 +436,6 @@ make - testNonlinearFactorGraph.run true true @@ -454,7 +443,6 @@ make - testNonlinearOptimizer.run true true @@ -462,7 +450,6 @@ make - testSQP.run true true @@ -470,7 +457,6 @@ make - testSubgraphPreconditioner.run true true @@ -478,7 +464,6 @@ make - testTupleConfig.run true true @@ -486,7 +471,6 @@ make - timeGaussianFactorGraph.run true true @@ -494,7 +478,6 @@ make - testBayesNetPreconditioner.run true true @@ -502,7 +485,6 @@ make - testConstraintOptimizer.run true true @@ -510,7 +492,6 @@ make - testInference.run true false @@ -518,7 +499,6 @@ make - testGaussianBayesNet.run true false @@ -526,7 +506,6 @@ make - testGaussianFactor.run true false @@ -534,7 +513,6 @@ make - testJunctionTree.run true false @@ -542,7 +520,6 @@ make - testSymbolicBayesNet.run true false @@ -550,14 +527,22 @@ make - testSymbolicFactorGraph.run true false true + + make + + all + true + true + true + make + install true true @@ -565,6 +550,7 @@ make + clean true true @@ -572,7 +558,6 @@ make - all true true @@ -580,7 +565,6 @@ make - clean true true @@ -588,7 +572,6 @@ make - all true true @@ -596,7 +579,6 @@ make - clean true true @@ -644,7 +626,6 @@ make - testBayesTree.run true false @@ -652,6 +633,7 @@ make + testSymbolicBayesNet.run true false @@ -659,7 +641,6 @@ make - testSymbolicFactorGraph.run true false @@ -739,7 +720,6 @@ make - testErrors.run true false @@ -755,7 +735,6 @@ make - testConstraintOptimizer.run true true @@ -763,7 +742,6 @@ make - clean true true @@ -771,7 +749,6 @@ make - all true true @@ -779,7 +756,6 @@ make - testSymbolicFactor.run true false @@ -787,7 +763,6 @@ make - testBinaryBayesNet.run true false @@ -795,7 +770,6 @@ make - testJunctionTree.run true true @@ -803,7 +777,6 @@ make - timeSymbolMaps.run true true @@ -811,7 +784,6 @@ make - all true true @@ -819,7 +791,6 @@ make - clean true true @@ -827,6 +798,7 @@ make + all true true @@ -834,6 +806,7 @@ make + clean true true @@ -841,7 +814,6 @@ make - clean all true true @@ -849,7 +821,6 @@ make - all true true @@ -857,7 +828,6 @@ make - check true true @@ -865,7 +835,6 @@ make - clean true true @@ -873,7 +842,6 @@ make - testPlanarSLAM.run true true @@ -881,7 +849,6 @@ make - testPose2Config.run true true @@ -889,7 +856,6 @@ make - testPose2Factor.run true true @@ -897,7 +863,6 @@ make - testPose2Prior.run true true @@ -905,7 +870,6 @@ make - testPose2SLAM.run true true @@ -913,7 +877,6 @@ make - testPose3Config.run true true @@ -921,7 +884,6 @@ make - testPose3SLAM.run true true @@ -929,7 +891,6 @@ make - testSimulated2DOriented.run true false @@ -937,7 +898,6 @@ make - testVSLAMConfig.run true true @@ -945,7 +905,6 @@ make - testVSLAMFactor.run true true @@ -953,7 +912,6 @@ make - testVSLAMGraph.run true true @@ -961,7 +919,6 @@ make - testPose3Factor.run true true @@ -969,7 +926,6 @@ make - testSimulated2D.run true false @@ -977,7 +933,6 @@ make - testSimulated3D.run true false @@ -1001,6 +956,7 @@ make + clean true true @@ -1008,7 +964,6 @@ make - testRot3.run true true @@ -1016,7 +971,6 @@ make - testRot2.run true true @@ -1024,7 +978,6 @@ make - testPose3.run true true @@ -1032,7 +985,6 @@ make - timeRot3.run true true @@ -1040,7 +992,6 @@ make - testPose2.run true true @@ -1048,7 +999,6 @@ make - testCal3_S2.run true true @@ -1056,7 +1006,6 @@ make - testSimpleCamera.run true true @@ -1064,7 +1013,6 @@ make - testHomography2.run true true @@ -1072,7 +1020,6 @@ make - testCalibratedCamera.run true true @@ -1080,7 +1027,6 @@ make - check true true @@ -1088,7 +1034,6 @@ make - clean true true @@ -1096,7 +1041,6 @@ make - testPoint2.run true true @@ -1128,7 +1072,6 @@ make - all true true @@ -1136,7 +1079,6 @@ make - dist true true diff --git a/Makefile.am b/Makefile.am index 4cfb21b70..4482f1c0b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,17 +9,21 @@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = foreign # All the sub-directories that need to be built -SUBDIRS = CppUnitLite colamd ldl spqr_mini base cpp geometry slam . tests wrap +SUBDIRS = CppUnitLite colamd ldl spqr_mini base inference geometry nonlinear slam . tests wrap # And the corresponding libraries produced SUBLIBS = colamd/libcolamd.la ldl/libldl.la \ - base/libbase.la cpp/libcpp.la geometry/libgeometry.la slam/libslam.la + base/libbase.la inference/libinference.la \ + geometry/libgeometry.la nonlinear/libnonlinear.la slam/libslam.la if USE_LAPACK SUBLIBS += spqr_mini/libspqr_mini.la endif -EXTRA_DIST = autogen.sh configure.ac THANKS +# TODO: UFconfig, CCOLAMD, and LDL automake magic without adding or touching any file +# in those directories as to not invalidate the LGPL license +# See some possibilities in +# http://www.gnu.org/software/hello/manual/automake/Third_002dParty-Makefiles.html # The following lines specify the actual shared library to be built with libtool lib_LTLIBRARIES = libgtsam.la @@ -27,12 +31,12 @@ libgtsam_la_SOURCES = libgtsam_la_LIBADD = $(SUBLIBS) libgtsam_la_LDFLAGS = -version-info 0:0:0 -# TODO: UFconfig, CCOLAMD, and LDL automake magic without adding or touching any file -# in those directories as to not invalidate the LGPL license -# See some possibilities in -# http://www.gnu.org/software/hello/manual/automake/Third_002dParty-Makefiles.html +# Add these files to make dure they're in the distribution +noinst_HEADERS = gtsam.h +EXTRA_DIST = autogen.sh configure.ac THANKS # install the headers and matlab toolbox +# TODO: wrap is only called after the toolbox is installed! install-exec-hook: install -d ${toolbox}/gtsam && \ cp -rf toolbox/* ${toolbox}/gtsam && \ diff --git a/configure.ac b/configure.ac index a24010bdf..6e64b2270 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_PREREQ(2.59) AC_INIT(gtsam, 0.0.0, dellaert@cc.gatech.edu) AM_INIT_AUTOMAKE(gtsam, 0.0.0) -AC_OUTPUT(Makefile CppUnitLite/Makefile colamd/Makefile ldl/Makefile spqr_mini/Makefile base/Makefile geometry/Makefile cpp/Makefile slam/Makefile tests/Makefile wrap/Makefile) +AC_OUTPUT(Makefile CppUnitLite/Makefile colamd/Makefile ldl/Makefile spqr_mini/Makefile base/Makefile inference/Makefile geometry/Makefile nonlinear/Makefile slam/Makefile tests/Makefile wrap/Makefile) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_SRCDIR([CppUnitLite/Test.cpp]) @@ -13,7 +13,8 @@ AC_CONFIG_SRCDIR([ldl/ldl.cpp]) AC_CONFIG_SRCDIR([spqr_mini/spqr_front.cpp]) AC_CONFIG_SRCDIR([base/DSFVector.cpp]) AC_CONFIG_SRCDIR([geometry/Cal3_S2.cpp]) -AC_CONFIG_SRCDIR([cpp/GaussianFactor.cpp]) +AC_CONFIG_SRCDIR([inference/GaussianFactor.cpp]) +AC_CONFIG_SRCDIR([nonlinear/ConstraintOptimizer.cpp]) AC_CONFIG_SRCDIR([slam/pose2SLAM.cpp]) AC_CONFIG_SRCDIR([tests/testSQP.cpp]) AC_CONFIG_SRCDIR([wrap/wrap.cpp]) diff --git a/inference/gtsam-broken.h b/gtsam-broken.h similarity index 100% rename from inference/gtsam-broken.h rename to gtsam-broken.h diff --git a/inference/gtsam.h b/gtsam.h similarity index 100% rename from inference/gtsam.h rename to gtsam.h diff --git a/inference/ISAM.h b/inference/ISAM.h index a43c6dc66..c70529a9d 100644 --- a/inference/ISAM.h +++ b/inference/ISAM.h @@ -20,7 +20,6 @@ #include "BayesNet.h" #include "BayesTree.h" #include "VectorConfig.h" -#include "NonlinearFactorGraph.h" namespace gtsam { diff --git a/inference/Makefile.am b/inference/Makefile.am index 3ec302816..cd4e5cffd 100644 --- a/inference/Makefile.am +++ b/inference/Makefile.am @@ -11,9 +11,9 @@ check_PROGRAMS = #---------------------------------------------------------------------------------------------------- # GTSAM core -headers += Factor.h Conditional.h Ordering.h IndexTable.h +headers += Key.h SymbolMap.h Factor.h Conditional.h IndexTable.h sources += Ordering.cpp -check_PROGRAMS += testOrdering +check_PROGRAMS += testOrdering testKey # Symbolic Inference headers += SymbolicConditional.h @@ -27,9 +27,8 @@ headers += FactorGraph.h FactorGraph-inl.h headers += JunctionTree.h JunctionTree-inl.h headers += BayesNet.h BayesNet-inl.h headers += BayesTree.h BayesTree-inl.h -headers += ISAM.h ISAM-inl.h GaussianISAM.h +headers += ISAM.h ISAM-inl.h headers += ISAM2.h ISAM2-inl.h -sources += GaussianISAM.cpp check_PROGRAMS += testFactorGraph testJunctionTree testOrdering check_PROGRAMS += testBayesTree testISAM @@ -49,6 +48,7 @@ check_PROGRAMS += testBinaryBayesNet headers += GaussianFactorSet.h SharedGaussian.h SharedDiagonal.h VectorConfig.h Factorization.h sources += NoiseModel.cpp Errors.cpp VectorMap.cpp VectorBTree.cpp GaussianFactor.cpp sources += GaussianFactorGraph.cpp GaussianConditional.cpp GaussianBayesNet.cpp +sources += GaussianISAM.cpp check_PROGRAMS += testVectorMap testVectorBTree testGaussianFactor check_PROGRAMS += testGaussianConditional testNoiseModel testErrors @@ -60,29 +60,6 @@ check_PROGRAMS += testBayesNetPreconditioner # Timing tests noinst_PROGRAMS = timeGaussianFactor timeSymbolMaps timeVectorConfig -#---------------------------------------------------------------------------------------------------- -# nonlinear -#---------------------------------------------------------------------------------------------------- - -# Lie Groups -headers += LieConfig.h LieConfig-inl.h TupleConfig.h TupleConfig-inl.h -check_PROGRAMS += testLieConfig - -# Nonlinear inference -headers += Key.h SymbolMap.h NonlinearFactorGraph.h NonlinearFactorGraph-inl.h -headers += NonlinearOptimizer.h NonlinearOptimizer-inl.h -headers += NonlinearFactor.h -check_PROGRAMS += testKey - -# Nonlinear constraints -headers += NonlinearConstraint.h NonlinearConstraint-inl.h -headers += NonlinearEquality.h -check_PROGRAMS += testNonlinearConstraint - -# SQP -sources += ConstraintOptimizer.cpp -check_PROGRAMS += testConstraintOptimizer - #---------------------------------------------------------------------------------------------------- # Create a libtool library that is not installed # It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am @@ -90,17 +67,17 @@ check_PROGRAMS += testConstraintOptimizer #---------------------------------------------------------------------------------------------------- headers += $(sources:.cpp=.h) pkginclude_HEADERS = $(headers) -noinst_HEADERS = gtsam.h -noinst_LTLIBRARIES = libcpp.la -libcpp_la_SOURCES = $(sources) +noinst_LTLIBRARIES = libinference.la +libinference_la_SOURCES = $(sources) AM_CPPFLAGS = -I$(boost) -I../colamd -I../base +AM_CXXFLAGS = #---------------------------------------------------------------------------------------------------- # rules to build local programs #---------------------------------------------------------------------------------------------------- TESTS = $(check_PROGRAMS) AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) -LDADD = libcpp.la ../base/libbase.la +LDADD = libinference.la ../base/libbase.la LDADD += ../CppUnitLite/libCppUnitLite.a ../colamd/libcolamd.la ../ldl/libldl.la AM_DEFAULT_SOURCE_EXT = .cpp @@ -108,22 +85,6 @@ AM_DEFAULT_SOURCE_EXT = .cpp %.run: % $(LDADD) ./$^ -#---------------------------------------------------------------------------------------------------- -# OLD, need to figure where these go! -#---------------------------------------------------------------------------------------------------- - -AM_CXXFLAGS = - -# enable debug if --enable-debug is set in configure -if DEBUG -AM_CXXFLAGS += -g -endif - -if USE_PROFILING -AM_CXXFLAGS += -pg -AM_LDFLAGS += -pg -endif - if USE_LAPACK AM_CXXFLAGS += -DGT_USE_LAPACK LDADD += ../spqr_mini/libspqr_mini.la diff --git a/inference/SymbolicFactorGraph.cpp b/inference/SymbolicFactorGraph.cpp index fda4df893..cc8bd2d06 100644 --- a/inference/SymbolicFactorGraph.cpp +++ b/inference/SymbolicFactorGraph.cpp @@ -13,7 +13,6 @@ #include "SymbolicFactorGraph.h" #include "SymbolicBayesNet.h" #include "inference-inl.h" -#include "LieConfig-inl.h" using namespace std; diff --git a/inference/SymbolicFactorGraph.h b/inference/SymbolicFactorGraph.h index 5cb3457e2..9920d37a4 100644 --- a/inference/SymbolicFactorGraph.h +++ b/inference/SymbolicFactorGraph.h @@ -13,7 +13,6 @@ #include "SymbolicFactor.h" #include "SymbolicBayesNet.h" #include "Key.h" -#include "LieConfig.h" namespace gtsam { diff --git a/nonlinear/Makefile.am b/nonlinear/Makefile.am new file mode 100644 index 000000000..e52bb1c97 --- /dev/null +++ b/nonlinear/Makefile.am @@ -0,0 +1,61 @@ +#---------------------------------------------------------------------------------------------------- +# GTSAM nonlinear +# Non-linear optimization +#---------------------------------------------------------------------------------------------------- + +headers = +sources = +check_PROGRAMS = + +#---------------------------------------------------------------------------------------------------- +# nonlinear +#---------------------------------------------------------------------------------------------------- + +# Lie Groups +headers += LieConfig.h LieConfig-inl.h TupleConfig.h TupleConfig-inl.h +check_PROGRAMS += testLieConfig + +# Nonlinear nonlinear +headers += NonlinearFactorGraph.h NonlinearFactorGraph-inl.h +headers += NonlinearOptimizer.h NonlinearOptimizer-inl.h +headers += NonlinearFactor.h + +# Nonlinear constraints +headers += NonlinearConstraint.h NonlinearConstraint-inl.h +headers += NonlinearEquality.h +check_PROGRAMS += testNonlinearConstraint + +# SQP +sources += ConstraintOptimizer.cpp +check_PROGRAMS += testConstraintOptimizer + +#---------------------------------------------------------------------------------------------------- +# Create a libtool library that is not installed +# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am +# The headers are installed in $(includedir)/gtsam: +#---------------------------------------------------------------------------------------------------- +headers += $(sources:.cpp=.h) +pkginclude_HEADERS = $(headers) +noinst_LTLIBRARIES = libnonlinear.la +libnonlinear_la_SOURCES = $(sources) +AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../inference +AM_CXXFLAGS = + +#---------------------------------------------------------------------------------------------------- +# rules to build local programs +#---------------------------------------------------------------------------------------------------- +TESTS = $(check_PROGRAMS) +AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) +LDADD = libnonlinear.la ../inference/libinference.la ../base/libbase.la +LDADD += ../CppUnitLite/libCppUnitLite.a ../colamd/libcolamd.la ../ldl/libldl.la +AM_DEFAULT_SOURCE_EXT = .cpp + +# rule to run an executable +%.run: % $(LDADD) + ./$^ + +if USE_LAPACK +AM_CXXFLAGS += -DGT_USE_LAPACK +LDADD += ../spqr_mini/libspqr_mini.la +endif + diff --git a/slam/Makefile.am b/slam/Makefile.am index 71f1c1d29..7352a558e 100644 --- a/slam/Makefile.am +++ b/slam/Makefile.am @@ -56,7 +56,7 @@ headers += $(sources:.cpp=.h) pkginclude_HEADERS = $(headers) noinst_LTLIBRARIES = libslam.la libslam_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../cpp -I../geometry +AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../inference -I../nonlinear -I../geometry #---------------------------------------------------------------------------------------------------- # rules to build local programs @@ -64,7 +64,7 @@ AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../cpp -I../geometry TESTS = $(check_PROGRAMS) AM_DEFAULT_SOURCE_EXT = .cpp AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) -LDADD = libslam.la ../geometry/libgeometry.la ../cpp/libcpp.la ../base/libbase.la +LDADD = libslam.la ../geometry/libgeometry.la ../inference/libinference.la ../nonlinear/libnonlinear.la ../base/libbase.la LDADD += ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la ../colamd/libcolamd.la if USE_LAPACK diff --git a/tests/Makefile.am b/tests/Makefile.am index fe63bf7bd..155aeadfd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -20,7 +20,7 @@ noinst_PROGRAMS = timeGaussianFactorGraph noinst_HEADERS = smallExample.h noinst_LIBRARIES = libtests.a libtests_a_SOURCES = smallExample.cpp -AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../geometry -I../cpp -I../slam +AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../inference -I../nonlinear -I../geometry -I../nonlinear -I../slam #---------------------------------------------------------------------------------------------------- # rules to build unit tests diff --git a/wrap/Makefile.am b/wrap/Makefile.am index d5a55e715..48b87158e 100644 --- a/wrap/Makefile.am +++ b/wrap/Makefile.am @@ -1,17 +1,11 @@ -INSTALL = install - -AM_CXXFLAGS = -MMD -I$(boost) -I.. -O5 - -noinst_PROGRAMS = wrap common = utilities.cpp Argument.cpp Constructor.cpp Method.cpp Class.cpp Module.cpp -wrap_SOURCES = ${common} wrap.cpp check_PROGRAMS = testSpirit testWrap testSpirit_SOURCES = testSpirit.cpp testWrap_SOURCES = testWrap.cpp ${common} # generate local toolbox dir -interfacePath = ../cpp +interfacePath = ../ moduleName = gtsam toolboxpath = ../toolbox nameSpace = "gtsam" @@ -22,9 +16,10 @@ all: # install the header files include_HEADERS = geometry.h utilities.h Argument.h Constructor.h Method.h Class.h Module.h wrap-matlab.h -install: all - -AM_CXXFLAGS += -I.. +noinst_PROGRAMS = wrap +wrap_SOURCES = ${common} wrap.cpp +AM_CPPFLAGS = -I$(boost) +AM_CXXFLAGS = -MMD AM_LDFLAGS = -L../CppUnitLite -lCppUnitLite $(BOOST_LDFLAGS) TESTS = $(check_PROGRAMS)