2010-07-12 15:16:31 +08:00
|
|
|
#----------------------------------------------------------------------------------------------------
|
2010-07-13 06:18:38 +08:00
|
|
|
# GTSAM core functionality: base classes for inference, as well as symbolic and discrete
|
2010-07-12 15:16:31 +08:00
|
|
|
#----------------------------------------------------------------------------------------------------
|
2009-08-22 06:23:24 +08:00
|
|
|
|
2010-08-20 01:23:19 +08:00
|
|
|
# use nostdinc to turn off -I. and -I.., we do not need them because
|
|
|
|
# header files are qualified so they can be included in external projects.
|
|
|
|
AUTOMAKE_OPTIONS = nostdinc
|
|
|
|
|
2010-07-12 15:16:31 +08:00
|
|
|
headers =
|
|
|
|
sources =
|
|
|
|
check_PROGRAMS =
|
2009-08-22 06:23:24 +08:00
|
|
|
|
2010-07-12 15:16:31 +08:00
|
|
|
#----------------------------------------------------------------------------------------------------
|
|
|
|
# base
|
|
|
|
#----------------------------------------------------------------------------------------------------
|
2009-08-22 06:23:24 +08:00
|
|
|
|
2010-07-12 15:16:31 +08:00
|
|
|
# GTSAM core
|
2010-10-20 05:31:13 +08:00
|
|
|
headers += Factor.h Factor-inl.h Conditional.h
|
2009-11-12 12:54:31 +08:00
|
|
|
|
2009-12-11 09:38:45 +08:00
|
|
|
# Symbolic Inference
|
2010-10-22 06:59:54 +08:00
|
|
|
sources += SymbolicFactorGraph.cpp SymbolicSequentialSolver.cpp
|
2010-10-12 08:15:11 +08:00
|
|
|
check_PROGRAMS += tests/testSymbolicFactor tests/testSymbolicFactorGraph tests/testConditional
|
|
|
|
check_PROGRAMS += tests/testSymbolicBayesNet tests/testVariableIndex tests/testVariableSlots
|
2009-12-11 09:38:45 +08:00
|
|
|
|
2009-11-12 12:54:31 +08:00
|
|
|
# Inference
|
2010-10-09 06:04:47 +08:00
|
|
|
headers += inference-inl.h VariableSlots-inl.h
|
2010-10-10 11:10:03 +08:00
|
|
|
sources += inference.cpp VariableSlots.cpp Permutation.cpp
|
2010-10-20 05:31:13 +08:00
|
|
|
sources += IndexFactor.cpp IndexConditional.cpp
|
Large gtsam refactoring
To support faster development *and* better performance Richard and I pushed through a large refactoring of NonlinearFactors.
The following are the biggest changes:
1) NonLinearFactor1 and NonLinearFactor2 are now templated on Config, Key type, and X type, where X is the argument to the measurement function.
2) The measurement itself is no longer kept in the nonlinear factor. Instead, a derived class (see testVSLAMFactor, testNonlinearEquality, testPose3Factor etc...) has to implement a function to compute the errors, "evaluateErrors". Instead of (h(x)-z), it needs to return (z-h(x)), so Ax-b is an approximation of the error. IMPORTANT: evaluateErrors needs - if asked - *combine* the calculation of the function value h(x) and the derivatives dh(x)/dx. This was a major performance issue. To do this, boost::optional<Matrix&> arguments are provided, and tin EvaluateErrors you just says something like
if (H) *H = Matrix_(3,6,....);
3) We are no longer using int or strings for nonlinear factors. Instead, the preferred key type is now Symbol, defined in Key.h. This is both fast and cool: you can construct it from an int, and cast it to a strong. It also does type checking: a Symbol<Pose3,'x'> will not match a Symbol<Pose2,'x'>
4) minor: take a look at LieConfig.h: it help you avoid writing a lot of code bu automatically creating configs for a certain type. See e.g. Pose3Config.h. A "double" LieConfig is on the way - Thanks Richard and Manohar !
2010-01-14 06:25:03 +08:00
|
|
|
headers += graph.h graph-inl.h
|
2010-10-09 11:53:27 +08:00
|
|
|
headers += VariableIndex.h
|
2009-11-12 12:54:31 +08:00
|
|
|
headers += FactorGraph.h FactorGraph-inl.h
|
2010-07-14 06:03:18 +08:00
|
|
|
headers += ClusterTree.h ClusterTree-inl.h
|
2010-07-08 05:41:50 +08:00
|
|
|
headers += JunctionTree.h JunctionTree-inl.h
|
2010-10-15 23:53:36 +08:00
|
|
|
headers += EliminationTree.h EliminationTree-inl.h
|
2009-12-10 03:39:25 +08:00
|
|
|
headers += BayesNet.h BayesNet-inl.h
|
2009-12-28 07:15:36 +08:00
|
|
|
headers += BayesTree.h BayesTree-inl.h
|
2010-07-13 00:36:58 +08:00
|
|
|
headers += ISAM.h ISAM-inl.h
|
2010-10-09 06:04:47 +08:00
|
|
|
check_PROGRAMS += tests/testFactorGraph
|
|
|
|
check_PROGRAMS += tests/testFactorGraph
|
|
|
|
check_PROGRAMS += tests/testBayesTree
|
|
|
|
check_PROGRAMS += tests/testISAM
|
2010-10-15 23:53:36 +08:00
|
|
|
check_PROGRAMS += tests/testEliminationTree
|
2010-10-09 06:04:47 +08:00
|
|
|
check_PROGRAMS += tests/testClusterTree
|
|
|
|
check_PROGRAMS += tests/testJunctionTree
|
2010-07-12 15:16:31 +08:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------------------------------------
|
|
|
|
# discrete
|
|
|
|
#----------------------------------------------------------------------------------------------------
|
2009-11-12 12:54:31 +08:00
|
|
|
|
2009-12-07 05:46:46 +08:00
|
|
|
# Binary Inference
|
2010-10-09 06:04:47 +08:00
|
|
|
#headers += BinaryConditional.h
|
|
|
|
#check_PROGRAMS += tests/testBinaryBayesNet
|
2010-07-12 15:16:31 +08:00
|
|
|
|
|
|
|
# Timing tests
|
2010-10-09 06:04:47 +08:00
|
|
|
#noinst_PROGRAMS = tests/timeSymbolMaps
|
2010-07-12 15:16:31 +08:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------------------------------------
|
|
|
|
# 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:
|
|
|
|
#----------------------------------------------------------------------------------------------------
|
2009-09-09 12:43:04 +08:00
|
|
|
headers += $(sources:.cpp=.h)
|
2010-08-20 01:23:19 +08:00
|
|
|
inferencedir = $(pkgincludedir)/inference
|
|
|
|
inference_HEADERS = $(headers)
|
2010-07-13 00:36:58 +08:00
|
|
|
noinst_LTLIBRARIES = libinference.la
|
|
|
|
libinference_la_SOURCES = $(sources)
|
2010-10-19 05:44:38 +08:00
|
|
|
AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(CCOLAMDInc) -I$(top_srcdir)/..
|
|
|
|
AM_LDFLAGS = $(BOOST_LDFLAGS)
|
2010-07-13 00:36:58 +08:00
|
|
|
AM_CXXFLAGS =
|
2010-07-12 15:16:31 +08:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------------------------------------
|
|
|
|
# rules to build local programs
|
|
|
|
#----------------------------------------------------------------------------------------------------
|
|
|
|
TESTS = $(check_PROGRAMS)
|
2010-10-19 05:44:38 +08:00
|
|
|
AM_LDFLAGS += $(boost_serialization)
|
2010-10-09 06:04:47 +08:00
|
|
|
LDADD = libinference.la ../base/libbase.la
|
2010-10-14 10:41:08 +08:00
|
|
|
LDADD += ../CppUnitLite/libCppUnitLite.a
|
2010-07-12 15:16:31 +08:00
|
|
|
AM_DEFAULT_SOURCE_EXT = .cpp
|
2009-08-22 06:23:24 +08:00
|
|
|
|
2010-10-09 06:04:47 +08:00
|
|
|
if USE_ACCELERATE_MACOS
|
|
|
|
AM_LDFLAGS += -Wl,/System/Library/Frameworks/Accelerate.framework/Accelerate
|
|
|
|
endif
|
|
|
|
|
2010-07-12 15:16:31 +08:00
|
|
|
# rule to run an executable
|
|
|
|
%.run: % $(LDADD)
|
|
|
|
./$^
|
|
|
|
|
2010-10-03 07:38:01 +08:00
|
|
|
# rule to run executable with valgrind
|
|
|
|
%.valgrind: % $(LDADD)
|
|
|
|
valgrind ./$^
|
|
|
|
|
2010-07-08 06:26:46 +08:00
|
|
|
if USE_LAPACK
|
2010-07-01 01:23:58 +08:00
|
|
|
AM_CXXFLAGS += -DGT_USE_LAPACK
|
|
|
|
endif
|
|
|
|
|