Commit Graph

10 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 cf1fde7bda UrbanFactor, UrbanGraph.cpp, template instantiations 2009-12-18 02:27:50 +00:00
Chris Beall 3b3c76b273 cleaned up, and removed Testable here because it's already provided by base class FactorGraph 2009-12-09 19:11:45 +00:00
Chris Beall 4f7d31986c added cameraConstraint and corresponding unit test based on same 2 camera/4 landmark example, but now there are constraints on the two cameras and none of the landmarks. 2009-11-17 17:19:54 +00:00
Manohar Paluri e4eaae4605 Added equals function and serialization capability 2009-11-17 01:19:55 +00:00
Manohar Paluri e312252006 Changed camera matrix to a shared pointer 2009-11-17 00:51:27 +00:00
Frank Dellaert d26abf3ccf addLandmarkConstraint 2009-11-13 06:18:27 +00:00
Frank Dellaert ac840d6f0a 1) DCVectorConfig I believe was obsolete as well as any conversion from and to Vectors, which I removed
2) load and flush are gone. 
3) I made a VSLAMConfig "Testable". 
4) I added an explicit template instantiation to avoid having to include -inl.h files
5) I added some more test code in testVSLAMFactor
2009-11-11 05:14:03 +00:00
Chris Beall 710d396d0b cleaned up a few includes to make VSLAMGraph work properly after the move into gtsam. 2009-11-10 22:49:22 +00:00
Chris Beall 08c9718b12 Moving VSLAMConfig into gtsam. VSLAMFactor lived there already, but was using VectorConfig directly... now using VSLAMConfig. 2009-11-10 20:19:00 +00:00