Commit Graph

10 Commits (68d90772e6b424974e44e1e29976f1963499fc5c)

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
Richard Roberts 2c8d8dbde4 NonlinearOptimizer constructor now requires shared_ptr to prevent storing pointers to stack and temporary variables. Code that uses it will need to be modified, but CitySLAM is already done. 2010-01-11 20:17:28 +00:00
Frank Dellaert 64eca2d550 addConstraint 2010-01-10 19:25:19 +00:00
Frank Dellaert 2fe02dbaa7 Moved optimization tests to testPose2Graph 2010-01-10 18:20:10 +00:00
Frank Dellaert 794ffd3b2f Fixed significant bug in Pose2Factor, where we forgot to multiply the error with the square root inverse covariance. 2010-01-10 13:55:55 +00:00
Richard Roberts 92b60a8543 Made 'between' derivatives in the tangent space of the solution instead of tangent space of identity, this makes Pose2 an "origin-free" manifold. 2009-12-21 16:43:23 +00:00
Richard Roberts 82825a30bf Fixed unit test broken by fix in Pose2Factor 2009-12-18 14:42:19 +00:00
Frank Dellaert 2914d663de No print in tests 2009-12-12 06:18:59 +00:00
Viorela Ila 03304ac421 testPose2Graph tests linearize 2009-12-11 19:32:46 +00:00
Viorela Ila 1a96534016 add Pose2Graph 2009-12-10 23:45:38 +00:00