Commit Graph

12 Commits (93465945e935141c9d8b377c429d60e1625f4011)

Author SHA1 Message Date
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 8061f29ec5 added test clarifying Ax-b \approx h(x)-z 2010-01-10 13:54:34 +00:00
Viorela Ila b87aa58c1f add Pose2Constraint class 2009-12-09 17:29:43 +00:00
Frank Dellaert 066b80e02e Pose2Constraint, initial check in with working linearize 2009-12-08 20:48:39 +00:00
Frank Dellaert 6ead19648f Modernized Pose2 constraint and added numerical derivative check 2009-12-08 14:02:56 +00:00
Viorela Ila 95260281d1 add testFunctions (h, H1, H2) for Pose Constraint 2009-12-07 23:17:03 +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 3792c79706 Fixed NonlinearFactor2 equals and added some unit tests for equals 2009-10-24 20:01:47 +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
Richard Roberts d80fa24a9f Fixing directory structure 2009-08-21 22:23:24 +00:00