Commit Graph

40 Commits (3247751b5db8193b5fbd924b66b1e48325db7e7c)

Author SHA1 Message Date
Alex Cunningham ea3b8083b0 Fixed more tests for NonlinearConstraints, inequality constraints now work. 2010-02-07 01:18:17 +00:00
Alex Cunningham f88438bab4 Removed SQP optimizer and moved remaining SQP optimizer tests into testSQP. All equality constraints should be fully functional now. Inequality constraints still to come. 2010-02-06 14:48:46 +00:00
Alex Cunningham 219dfd262d SQP now works with single configs using the TupleConfigs, without needing a separate optimizer. 2010-02-06 05:14:52 +00:00
Alex Cunningham 01bbd3cf8d Disabling SQP tests while transitioning config types and SQP implementation 2010-02-04 16:07:20 +00:00
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
Alex Cunningham 5f588031bc Merged NoiseQR back into trunk 2010-01-20 18:32:48 +00:00
Kai Ni 3bf15333af move ordering into the solver, and the nonlinear optimizer is now exact <G, T, L> 2010-01-20 02:28:23 +00:00
Alex Cunningham 88e465910a SQP tests and implementation now use the new Key system 2010-01-19 05:33:44 +00:00
Kai Ni 05b07d443e add linear system solver as a template class parameter in nonlinear optimizer. 2010-01-18 05:51:19 +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
Richard Roberts ac10c440e1 PairConfig is implemented, VSLAMConfig is now a typedef! 2010-01-14 02:58:29 +00:00
Frank Dellaert 6b3e8cf49c simulated2D now reduced to one .h and .cpp, in its own namespace, better naming, and new-style functions to serve as example 2010-01-14 02:50:06 +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
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
Richard Roberts 19a3e228d7 Large refactoring - made several Lie group functions global, which used to be member functions, to treat Lie groups more uniformly. Also created Lie.h, and a preprocessor flag in numericalDerivative to change the coordinate frame derivatives are reported in. gtsam and easylib build and pass unit tests, but this will probably break other projects, which will require a few small changes to work again. Email coming in a few minutes to describe the changes. 2010-01-08 00:40:17 +00:00
Alex Cunningham e2bc13a2a6 Renaming gradients -> jacobians 2009-12-18 03:05:47 +00:00
Alex Cunningham a1918056a5 Changed NonlinearConstraints to take cost and gradient functions that do not take the list of keys. Tests have been reconstructed using boost::bind 2009-12-18 02:39:02 +00:00
Alex Cunningham 7d0de77fc6 Changed argument ordering for constraints 2009-12-18 01:40:29 +00:00
Frank Dellaert 9efac7b3fb Some re-naming and re-formatting only 2009-12-15 05:34:49 +00:00
Alex Cunningham a3ce3f31c8 Cleanup with NonlinearConstraints to make the active() function do thresholding for inequality constraints, rather than constraint function itself.
testSQP now has all tests active and passing.
Added greaterThanOrEqual() for vector comparison.
2009-11-30 17:36:34 +00:00
Alex Cunningham 395e4ae3f1 Fixed sign issue on nonlinear constraints, so that that it is not necessary to flip the sign on the delta configs before using exmap. 2009-11-28 21:00:09 +00:00
Alex Cunningham 0ff7e3a5d9 Changed interface on constraint g(x) and grad_g(x) functions to take a list of keys, so that all of the variables in a factor can be used as necessary. Moved g(x) into base NonlinearConstraint class and some cleanup. 2009-11-28 19:18:02 +00:00
Alex Cunningham 43e4c66407 Added more detail to VSLAM test that diverges. 2009-11-24 16:03:57 +00:00
Alex Cunningham e3e79e3888 Added lagrange access function to the SQPOptimizer
Added a test testSQP to try changing the initial Lagrange multiplier values to find a way around the stability problem, but there is no effect.
2009-11-24 14:44:46 +00:00
Alex Cunningham 140e79572f Added a test to testSQP to check VSLAM solution stability when the initial config is away from the ground truth. The test without the nonlinear constraints has the same stability problem, and both the constrained and unconstrained versions are in place and disabled. 2009-11-24 14:14:03 +00:00
Alex Cunningham fec280db8e Added a nonlinear constraint version of the stereo SQP example, but the test when the initial configuration is incorrect is not stable and the points continue moving away indefinitely. 2009-11-24 06:39:27 +00:00
Alex Cunningham 36877532ad Added ground truth for VSLAM example in testSQP 2009-11-23 16:45:53 +00:00
Alex Cunningham 1fd0404ec9 Cleanup in testSQP, also demoed the unary constraint, as well. 2009-11-21 19:05:24 +00:00
Frank Dellaert a0a250750b compare config 2009-11-21 04:22:59 +00:00
Alex Cunningham 08f5b074a0 Added verbosity selector for the SQP demo to remove printouts every time it runs 2009-11-20 14:29:11 +00:00
Alex Cunningham 5f848f272b SQP demo that moves maps into the correct reference frames is now working using the NonlinearConstraint machinery. 2009-11-20 14:05:21 +00:00
Alex Cunningham 6aba2f1c1c Changed initial SQP example to use exmap using the new scaling function for VectorConfig 2009-11-20 05:13:32 +00:00
Alex Cunningham ee4a066275 Implemented linearization and equality for unary NonlinearConstraints. Current tests use a scalar example. Split out implementation into a separate implementation file. 2009-11-20 03:04:49 +00:00
Alex Cunningham 429f27550c Added a NonlinearConstraint and testNonlinearConstraint. There is currently an abstract base class for constraints and a partially implemented unary constraint. 2009-11-19 16:50:18 +00:00
Alex Cunningham f98f49381a Added an example to testSQP to use for combining graphs 2009-11-18 21:57:59 +00:00
Alex Cunningham d700cd2cac Made some small changes to testSQP to simplify the system and improve convergence. 2009-11-18 20:23:07 +00:00
Alex Cunningham 7fc68e2d90 Updated testSQP to use a real SQP implementation as separate factors on the previous problem. SQP now works. 2009-11-18 19:42:14 +00:00
Alex Cunningham 20830a1534 Added testSQP demo to show a simple problem solved by Sequential Quadratic Programming. To see the outputs, set verbose=true at the start of the test. 2009-11-16 19:12:56 +00:00