Commit Graph

25 Commits (351cdd18c213e22d61a468b7746ec62600b74621)

Author SHA1 Message Date
Frank Dellaert 351cdd18c2 case change: SharedGaussian and SharedDiagonal are now classes with their own header file. Needed for MATLAB TORO hail Mary 2010-01-22 17:36:57 +00:00
Kai Ni 490791cd48 add writer module to dump the errors and time 2010-01-22 08:13:54 +00:00
Alex Cunningham 5f588031bc Merged NoiseQR back into trunk 2010-01-20 18:32:48 +00:00
Frank Dellaert a4a6e002e5 NOISE MODEL.
This is a big edit but with no templates involed, so it should not be a big deal.

New namespace gtsam::noiseModel collects all noise models, which provide efficient whitening and chain-rule implementation needed for optimization. The class hierarchy gives us the ability to use models from full covariances to i.i.d. unit variance noise with a single interface, where the latter will be much cheaper. 

From now on, all non-linear factors take a shared_ptr to a Gaussian noise model. This is done through the parameter (const sharedGaussian& model). The use of a shared pointer allows us to share one noise models for thousands of factors, if applicable.

Just like Richard's Symbol change, there is a compile flag GTSAM_MAGIC_GAUSSIAN which allows you to use doubles, vectors, or matrices to created noise models on the fly. You have to set it to the correct dimension. Use of this is *not* encouraged and the flag will disappear after some good soul fixed all unit tests.
2010-01-18 05:38:53 +00:00
Richard Roberts aef0b42562 Refactoring to use a new Symbol key instead of strings in Bayes*, Gaussian*, Ordering, Symbolic*, VectorConfig. Renamed existing type-checking key Symbol<C,T> to TypedSymbol<C,T> 2010-01-17 19:34:57 +00:00
Chris Beall a956c1a8be svn restored from 1733.
this commit updates gtsam to version 1774, which now appears as 1734.
2010-01-16 01:16:59 +00:00
Frank Dellaert f645b560ea Added constructor body 2010-01-14 15:35:23 +00:00
Frank Dellaert 93465945e9 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-13 22:25:03 +00:00
Frank Dellaert 3fbc857a9e fixed behavior of error for sigma==0 2009-12-31 10:28:43 +00:00
Frank Dellaert 0194926dc2 transpose not needed 2009-12-18 05:14:34 +00:00
Alex Cunningham 5857635ca1 Fixed renaming error with NonlinearFactors sometimes becoming NonGaussianFactors 2009-11-12 16:47:12 +00:00
Alex Cunningham 77a1754b69 Renamed LinearFactor -> GaussianFactor, LinearFactorGraph -> GaussianFactorGraph 2009-11-12 16:16:32 +00:00
Frank Dellaert 921cb0a8fc Got rid of (defunct) "dump" methods 2009-10-31 17:13:36 +00:00
Frank Dellaert 3792c79706 Fixed NonlinearFactor2 equals and added some unit tests for equals 2009-10-24 20:01:47 +00:00
Frank Dellaert cd3e3d8a86 Fairly substantial change: Factor now Testable, MutableLinearFactor gone
The latter was prompted by the fact that assert_equal did not like mixing LinearFactor and MutableLinearFactor
But MutableLinearFactor always was a bit of a kluge. We should eradicate all non-const on LinearFactor some other way.
2009-10-22 17:23:24 +00:00
Frank Dellaert d8c04ecfcb Fixed serialization include header. 2009-10-18 17:35:15 +00:00
Alex Cunningham 7d0a30c20f Renamed FGConfig to VectorConfig in gtsam, easylib, EasySLAM, and mast. 2009-10-14 20:39:59 +00:00
Frank Dellaert 989f290c99 '''BIG CHANGE''': avoid converting back and to FGConfigs by templating on configuration type. Details:
* Factors are now templated on the configuration type. Factor Graphs are now templated on the factor type and configuration type.
 * LinearFactor is a factor on an FGConfig.
 * LinearFactorGraph uses LinearFactor and FGConfig.
 * NonLinearFactor is still templated on Config.
 * NonLinearFactorGraph uses NonLinearFactors, but is still templated on Config.
 * Tests and VSLAMFactor have been updated to reflect those changes.
2009-10-06 18:25:04 +00:00
Frank Dellaert 68e20eec2c 2 BIG changes:
(1) FactorGraph and NonlinearOptimizer now no longer have a .cpp file, but a -inl.h file as in [http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml Google's C++ Style Guide]. This means if you expect to instantiate one of the functions in a cpp file, you have to include the -inl.h file.
(1) getOrdering is now in FactorGraph, and the non-linear version does *not* take a config anymore. 
Long version: I made this change because colamd works on the graph structure alone, and should not depend on the type of graph. Instead, because getOrdering happened to implemented in LinearFactorGraph first, the non-linear version converted to a linear factor graph (at the cost of an unnecessary linearization), and then threw all that away to call colamd. To implement this in a key-neutral way (a hidden agenda), i had to modify the keys_ type to a list, so a lot of changes resulted from that.
2009-09-13 04:13:03 +00:00
Frank Dellaert 012437c573 keys now returns const references 2009-09-03 17:24:46 +00:00
Frank Dellaert 24c8242782 added print as virtual method 2009-09-03 16:51:31 +00:00
Frank Dellaert 92dbc8910e correct serialization of base classes
moved all serialize functions to bottom of class declaration
2009-08-31 04:13:57 +00:00
Frank Dellaert c69d8d9b36 Factor Graph serialization, and renaming of factors -> factors_ 2009-08-31 02:40:26 +00:00
Manohar Paluri 0b1b5eca67 Added const verifiers for member functions of the class which are compatible 2009-08-26 15:25:47 +00:00
Richard Roberts d80fa24a9f Fixing directory structure 2009-08-21 22:23:24 +00:00