Commit Graph

6148 Commits (32586ad1757e53d3039e106aab19046ff82d230c)

Author SHA1 Message Date
thduynguyen 32586ad175 wrap keys for GaussianFactor 2014-10-19 00:35:18 -04:00
thduynguyen 3227766569 small comment typo 2014-10-19 00:35:01 -04:00
thduynguyen b0d95c0a36 check if a JacobianFactor has a dual variable 2014-10-17 13:31:35 -04:00
thduynguyen 4be24f4f70 add adjointMap and expmap/logmap derivatives for Pose2 2014-10-17 13:30:57 -04:00
thduynguyen 8722c9cf68 small comment 2014-10-17 13:30:32 -04:00
thduynguyen 78d9a8cab8 fix empty factors bug 2014-09-25 11:18:51 -04:00
thduynguyen 11969b32f6 fix gradient and gradientAtZero for linear constrained Jacobian, optionally scaled by the dual variables 2014-09-24 22:19:47 -04:00
thduynguyen 43a8de01c1 Merge remote-tracking branch 'origin/feature/quadratic_programming' into feature/quadratic_programming
Conflicts:
	.cproject
	.gitignore
	gtsam/linear/GaussianFactorGraph.cpp
	gtsam/linear/GaussianFactorGraph.h
	gtsam/linear/HessianFactor.cpp
	gtsam/linear/JacobianFactor.h
	gtsam/linear/QPSolver.cpp
	gtsam/linear/tests/testQPSolver.cpp
	gtsam/nonlinear/NonlinearFactor.h
2014-09-14 01:45:27 -04:00
thduynguyen df1eede30c Produce a graph of dual-scaled Hessians of each factor: -lambda*H, used for solving nonlinear equality constraints with SQP. 2014-09-13 01:37:17 -04:00
thduynguyen 20fb8ab77d Build a dual graph to compute dual values for equality constrained factors 2014-09-13 01:36:04 -04:00
thduynguyen 4ca9d5757f Support optional dual key for constrained Jacobian and nonlinear factors. Default boost::none for unconstrained factors. 2014-09-13 01:34:33 -04:00
thduynguyen 5e8c36b3ca compute gradient wrt a key 2014-09-13 01:31:49 -04:00
thduynguyen 0dcb3e209d add macro TEST_DISABLED for disabling tests without commenting them out 2014-09-13 01:29:25 -04:00
thduynguyen 6d697f2c92 heuristic in EliminationPreferCholesky to work around the Indeterminant exception while solving linear constrained systems.
Instead of turning Hessian factors into Jacobian factors -- so that they can be eliminated with constrained Jacobian factors using the special QR in Constrained's noise model -- we combine all Hessian factors, eliminate the variable first to have a conditional and a new factor 1, then combine the constrained Jacobians with this conditional (also a Jacobian) to eliminate again, producing the final conditional, and a new factor 2. The two new factors are then combined into a new Hessian factor to be returned.
2014-09-11 14:51:35 -04:00
thduynguyen f8126dbf78 fix .cproject after rebasing 2014-08-06 22:41:35 -04:00
thduynguyen af54d39b13 ignore build folder 2014-08-06 11:10:36 -04:00
thduynguyen 779a21c2c4 A small example showing that Hessian matrices in Lie groups might not be symmetric 2014-08-06 11:10:36 -04:00
thduynguyen 3778e3c928 constructors for JacobianFactor up to 6-ary for testing in matlab 2014-08-06 11:10:36 -04:00
thduynguyen ecb896ef03 move Adjoint to cpp and enable EXP_MAP 2014-08-06 11:10:36 -04:00
thduynguyen c6d541741b more comments and debug info 2014-08-06 11:10:36 -04:00
thduynguyen 47ed9f3687 matlab code to reproduce test results 2014-08-06 11:10:36 -04:00
thduynguyen 4037d1ec1a wrap QPSolver 2014-08-06 11:10:35 -04:00
thduynguyen cc2ba1792d add detailed comments for the new EliminatePreferCholesky 2014-08-06 11:10:35 -04:00
thduynguyen a7c0d10862 disable two warning options in METIS which are not understood by my clang compiler. 2014-08-06 11:10:35 -04:00
thduynguyen 2895b0515c Support non positive definite Hessian factors while doing EliminatePreferCholesky with some constrained factors.
Currently, when eliminating a constrained variable, EliminatePreferCholesky converts every other factors to JacobianFactor before doing the special QR factorization for constrained variables. Unfortunately, after a constrained nonlinear graph is linearized, new hessian factors from constraints, multiplied with the dual variable  (-lambda*\hessian{c} terms in the Lagrangian objective function), might become negative definite, thus cannot be converted to JacobianFactors.

Following EliminateCholesky, this version of EliminatePreferCholesky for constrained var gathers all unconstrained factors into a big joint HessianFactor before converting it into a JacobianFactor to be eliminiated by QR together with the other constrained factors.

Of course, this might not solve the non-positive-definite problem entirely, because (1) the original hessian factors might be non-positive definite and (2) large strange value of lambdas might cause the joint factor non-positive definite [is this true?]. But at least, this will help in typical cases.
2014-08-06 11:09:25 -04:00
thduynguyen 2fd3cf1bd0 unittest for QPSolver without initial point 2014-08-06 11:08:43 -04:00
thduynguyen 882a1fe22f first unittest finding QP's feasible initial point works 2014-08-06 11:08:43 -04:00
thduynguyen c91ab4a276 fix bugs in variable's columnNo index when passing to lpsolve. Obviously lpsolve modifies the raw buffer we pass to it! 2014-08-06 11:08:43 -04:00
thduynguyen c637a75ebf add lp_solve and the gtsam LPSolver interface 2014-08-06 11:08:43 -04:00
thduynguyen e16efaab2c QPSolver now returns dual values after solving. This can be used as a guessed dual value for the nonlinear level 2014-08-06 10:55:27 -04:00
thduynguyen cb7153a9d2 move detailed comments to the cpp file. An important comment about an Eigen's exception when converting a jacobian to a hessian factor, probably due to a bug in clang compiler. 2014-08-06 10:55:27 -04:00
thduynguyen fc63f540db remove support for embedded lagrangian part to constraint's jacobian matrices. It's very hacky! 2014-08-06 10:55:27 -04:00
thduynguyen db93f4137c dexp and dexpInv for Point2 and Rot2 2014-08-06 10:55:26 -04:00
thduynguyen ba870a1998 create VectorValues with all 1.0 2014-08-06 10:55:26 -04:00
thduynguyen b56a3426ad important bug fix in building dual graph when finding the variable dimension from its first factor in the factor indices. 2014-08-06 10:55:25 -04:00
thduynguyen b8a2223572 make Jacobian/Hessian cast functions static to use them in other places. TODO: move them to GaussianFactor 2014-08-06 10:55:25 -04:00
thduynguyen 416111b0ef size() should return size_t not Key 2014-08-06 10:55:24 -04:00
thduynguyen 4681c05063 build dualgraph supports least-squares multipliers 2014-08-06 10:55:24 -04:00
thduynguyen 075817b31a add build dir to GTSAM_INCLUDE_DIR so projects built with gtsam build tree can find <gtsam/config.h> 2014-08-06 10:55:24 -04:00
thduynguyen bb7522c947 Fix gtsam's old segfault bug in JacobianFactor::isConstrained: return false if it has no noisemodel. Test Nocedal06book, example 16.4, pg 475 passed. 2014-08-06 10:55:23 -04:00
thduynguyen 37079417d1 Test with Matlab's QP example 2014-08-06 10:55:23 -04:00
thduynguyen befe397f7a disable printing 2014-08-06 10:55:22 -04:00
thduynguyen f88c928ca0 refactor QPSolver into its own class 2014-08-06 10:55:22 -04:00
thduynguyen c0e201f06c Detailed comments for choosing the step size 2014-08-06 10:55:22 -04:00
thduynguyen f00d673646 Detailed comments about the lambda<0 condition for good ineq <=0 constraints, wrt the Lagrangian L = f(x) - lambda*c(x) 2014-08-06 10:55:21 -04:00
thduynguyen 9fd78faf4b first ineq QP test passed! 2014-08-06 10:55:21 -04:00
thduynguyen cb02a95f94 fix bug in weightedPseudoInverse dealing with negative weights of ineq constraints 2014-08-06 10:55:21 -04:00
thduynguyen cb37b025e9 small improvement on negative weights 2014-08-06 10:55:20 -04:00
thduynguyen ba1273ae6b fix bug in NoiseModel signs for ineq weights. Unittest dual graph 2014-08-06 10:55:20 -04:00
thduynguyen a31e9568a1 QPSolver in progress. Finish building dual graph, but not tested.
Use mixed constrained noise with sigma < 0 to denote inequalities.
Working set implements the active set method, turning inactive inequalities
to active one as equality constraints by setting their corresponding sigmas to 0
and vice versa. Dual graph now has to deal with mixed sigmas.
2014-08-06 10:55:20 -04:00