Commit Graph

969 Commits (8201c32046f00017c015888257c70f5f9aaad7fc)

Author SHA1 Message Date
Viorela Ila abf7758374 now datasets are in CitySALM/data/XXXX/xxxx.graph 2010-03-05 02:58:59 +00:00
Yong-Dian Jian 43df7375c0 add helper functions 2010-03-05 00:55:36 +00:00
Kai Ni d0d2aa8aee added erase method 2010-03-04 23:39:36 +00:00
Alex Cunningham d6c2b415a5 Added a check to NonlinearOptimizer to short circuit optimization if the initial error is below the absolute threshold. 2010-03-04 22:46:27 +00:00
Alex Cunningham 4ae9b72a35 Commented marginalGaussian() due to compile error 2010-03-04 22:40:01 +00:00
Richard Roberts 5f8b0e9341 Added marginalGaussian to get a marginal on a single variable from a GaussianFactorGraph 2010-03-04 22:03:40 +00:00
Alex Cunningham badc7b6ee6 Added keys() function to LieConfig to return an ordered list of keys 2010-03-04 13:21:48 +00:00
Frank Dellaert b9045528ee no more normalize. in compose?
Also moved constructors around, one inline in h, others to cpp
2010-03-03 05:35:00 +00:00
Frank Dellaert c9fcf95501 fixed some issues in SE(2) "branch" 2010-03-03 05:34:08 +00:00
Frank Dellaert 707627fb3a Rot2 "named constructors" (http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.8):
/** Named constructor from angle == exponential map at identity */
  static Rot2 fromAngle(double theta) { return Rot2(cos(theta),sin(theta));}

  /** Named constructor from cos(theta),sin(theta) pair, will *not* normalize! */
  static Rot2 fromCosSin(double c, double s);

  /** Named constructor that behaves as atan2, i.e., y,x order (!) and normalizes */ 
  static Rot2 atan2(double y, double x);

which are a bit more verbose, but at least won't cause hours of bug-tracking :-(

I also made most compose, inverse, and rotate functions into methods, with the global functions mostly calling the methods. Methods have privileged access to members and hence are typically much more readable.
2010-03-03 03:31:53 +00:00
Frank Dellaert 85fe43949d arithmetic tests 2010-03-03 02:50:49 +00:00
Frank Dellaert eec6017b12 scalar multiplication 2010-03-03 02:49:06 +00:00
Kai Ni 23986349de added measured function 2010-03-02 21:43:39 +00:00
Frank Dellaert 190e87afb9 Correct exmap is indeed correct, but derivatives *still* do not check out. I'm starting to suspect numericalDerivative. 2010-03-02 17:56:26 +00:00
Frank Dellaert 32beb8c712 more refactoring, use different Rot3 constructor so no confusion 2010-03-02 06:16:11 +00:00
Kai Ni 680a6a28c1 added begin and end iterators 2010-03-02 06:07:46 +00:00
Frank Dellaert 33c6c51658 refactored and thoroughly checked rodrgues, added two more unit test 2010-03-02 05:45:19 +00:00
Frank Dellaert f956bae6a4 combined version only 2010-03-02 02:27:09 +00:00
Frank Dellaert 1093317fdc wedge 2010-03-02 02:25:27 +00:00
Frank Dellaert c62ebe3ea8 exponential map approximation 2010-03-02 02:24:38 +00:00
Alex Cunningham 20ac6b85c8 Added static dim() functions to remaining geometry types so that dimensions can be calculated on size alone. 2010-03-01 21:56:13 +00:00
Manohar Paluri e670e00e3b added const Tensor3expression 2010-03-01 18:08:18 +00:00
Manohar Paluri 8bf8e4dc1f added operator() to change values 2010-03-01 18:07:18 +00:00
Manohar Paluri 6073bdb679 made the function const 2010-03-01 18:05:24 +00:00
Alex Cunningham a46dc4cea0 Added threshold for lambda in NonlinearOptimizer so that if lambda has gotten unreasonably large, optimization will throw a runtime exception to prevent infinite loops where lambda goes to infinity. 2010-03-01 16:31:05 +00:00
Frank Dellaert d9c185498e combined a few arithmetic tests 2010-03-01 01:38:26 +00:00
Frank Dellaert 4cb59438f7 documentation 2010-03-01 01:37:50 +00:00
Frank Dellaert 619190a818 new-style combined unrotate 2010-03-01 01:36:27 +00:00
Frank Dellaert 20ad08e48f new Pose3 derivatives still don't work :-( 2010-03-01 01:35:33 +00:00
Frank Dellaert b943644ddd re-factored so corresponds to math.lyx 2010-03-01 01:33:45 +00:00
Frank Dellaert 6e03783465 negation 2010-03-01 01:30:15 +00:00
Frank Dellaert 28f4493a2b Now uses Adjoint map for derivatives of inverse/compose/between, see doc/math.pdf 2010-02-28 09:10:39 +00:00
Frank Dellaert 98aa08bcd0 Re-use memory 2010-02-28 09:09:37 +00:00
Frank Dellaert 85784400c6 prototype object map 2010-02-28 09:09:12 +00:00
Frank Dellaert dcfe52dae7 some renaming of variables 2010-02-28 09:08:47 +00:00
Kai Ni b58f7b8ea7 the derivative for transform_from 2010-02-28 08:51:43 +00:00
Kai Ni d894e23a06 assert_equal for a list of matrices 2010-02-28 00:48:42 +00:00
Manohar Paluri 4604cbce05 svd now handles m < n cases. Added unit tests to verify this. But svd in place will throw an exception for such cases. 2010-02-27 18:23:34 +00:00
Frank Dellaert 5e00c58ea7 Baker–Campbell–Hausdorff formula: in non-commutative Lie groups, when composing exp(Z) = exp(X)exp(Y) it is not true that Z = X+Y. Instead, Z can be calculated using the BCH formula:
Z = X + Y + [X,Y]/2 + [X-Y,[X,Y]]/12 - [Y,[X,[X,Y]]]/24 + ...
See http://en.wikipedia.org/wiki/Baker–Campbell–Hausdorff_formula
2010-02-27 14:58:54 +00:00
Kai Ni 67b4834bdb someone forgot to return it 2010-02-27 00:04:51 +00:00
Viorela Ila b6599ebdce readst the tree files 2010-02-26 22:23:00 +00:00
justinca 9941b28128 Fix matrix inverse square root so it, once again, returns an upper triangular matrix 2010-02-26 18:53:41 +00:00
Manohar Paluri 940202226b added #pragma 2010-02-26 14:45:17 +00:00
Frank Dellaert d21ff82d21 Kruskal skeleton 2010-02-26 13:31:38 +00:00
Kai Ni 87c8465315 the beautiful Jacobian of compose in pose2 2010-02-26 10:55:41 +00:00
Frank Dellaert c40760485d I think we might have a problem: is expmap<Pose2> correct? Uncomment the new test in testPose2. It does not match what is said in http://www.cis.upenn.edu/~cis610/cis610lie1.ps. 2010-02-26 06:00:58 +00:00
Frank Dellaert 0004d90feb formatting only 2010-02-26 05:30:02 +00:00
Frank Dellaert 38ed1a5cdd more compulsive checking, more efficient removing 2010-02-26 05:29:45 +00:00
Kai Ni 73848d9e0e added comments to make people realize it is for the matlab wrapper not actually c++ implementation 2010-02-26 05:05:05 +00:00
Kai Ni 7e8aa6e6b9 add unit test for the constructor 2010-02-26 05:04:03 +00:00
Frank Dellaert 5e97d07f5e *it is already the right type 2010-02-26 04:03:56 +00:00
Frank Dellaert 0a33b50554 use Matrix.resize 2010-02-26 04:03:31 +00:00
Frank Dellaert 17bd59ec80 only call alpha calls if CBLAS version will be called. 2010-02-26 03:23:48 +00:00
Frank Dellaert 044ea1348d Modernized/refactored, esp. with regards to map insert and iterating. 2010-02-26 03:20:15 +00:00
Alex Cunningham 9d704bb977 Added flag to default Factorization for old or new elimination, defaulting to old code. 2010-02-25 21:07:35 +00:00
Alex Cunningham 5b60511505 Reverted default elimination code to older implementation - use switch in optimize() or eliminate() to use newer code. 2010-02-25 20:43:59 +00:00
Kai Ni c56ee9ea0d added a new constructor that takes a list 2010-02-25 08:16:33 +00:00
Alex Cunningham 74787df3fc Added ability to insert whole configs at a time to LieConfig and TupleConfig 2010-02-25 02:50:01 +00:00
Frank Dellaert 93a3f48920 Created patch to camera homography function with Duy 2010-02-25 00:05:27 +00:00
Alex Cunningham 9955ea20bd Added pure cblas implementation of multiplyAdd functions. This does not have autotools support yet, so to enable, goto cpp/Makefile.am, comment out the block concerning GSL/ATLAS, and uncomment the above section enabling just blas. 2010-02-24 18:12:48 +00:00
Alex Cunningham f8c4e1fe27 Fixed bug in unit test causing crashes, altered corner case test for column insertion 2010-02-24 18:09:15 +00:00
Alex Cunningham 022f706d94 Changed default elimination algorithm to newer one with fewer matrix allocations to solve crashing bug from LM discovered in MAST 2010-02-24 14:19:52 +00:00
Frank Dellaert 04f7bbf253 use vector_scale_inplace 2010-02-24 06:15:06 +00:00
Frank Dellaert 696be0d0c1 RETURN CONST REFERENCES WHERE YOU CAN and some inlining 2010-02-24 06:14:43 +00:00
Frank Dellaert dd9446993a 5-fold performance improvement in combined between function 2010-02-24 06:14:02 +00:00
Frank Dellaert 51281ea78f in-place colamd 2010-02-24 06:13:11 +00:00
Frank Dellaert 71089a6354 vector_scale_inplace 2010-02-24 06:12:56 +00:00
Frank Dellaert c1f50a0637 fixed noise model, removed istringstream and getline in favor of ignore 2010-02-24 06:11:52 +00:00
Kai Ni 547427514f add save functions for Matrix and Vector to save them to disk 2010-02-24 00:12:10 +00:00
Alex Cunningham ac41ee7215 Added a test in GaussianFactor to demo a problem found in MAST where eliminating a single factor with two priors causes a memory corruption error. To run the test and see the error, go to the last test in testGaussianFactor called "exploding_MAST_factor" and uncomment the indicated line. 2010-02-23 18:41:07 +00:00
Alex Cunningham a2310b4eab Fixed small error in NonlinearConstraint and added note explaining why nonlinear constraints do not use a constrained noisemodel in the nonlinear sense. 2010-02-23 18:37:17 +00:00
Manohar Paluri 032c8887d6 added point-point-point check 2010-02-23 13:14:07 +00:00
Kai Ni 5594d162a2 allocate noise model once 2010-02-23 05:28:39 +00:00
Kai Ni 3ae81002be fixed the unit tests 2010-02-23 05:23:15 +00:00
Manohar Paluri 8900a37d93 removed unncessary prints 2010-02-23 05:08:42 +00:00
Frank Dellaert a178023a27 Fixed christian01 example, polluting gtsam with extra header files for MATLAB. Need to look for a better solution. 2010-02-23 05:06:16 +00:00
Manohar Paluri 443d304a7c Added another TrifocalTensor estimation test 2010-02-22 21:45:15 +00:00
Alex Cunningham fbbdd0be3e Fixed error calculation with NonlinearConstraints - now use Unit noisemodels in NonlinearConstraint to prevent having the error forced to infinity 2010-02-22 21:11:22 +00:00
Kai Ni ee9205f0fa uncommented unit tests 2010-02-22 16:43:40 +00:00
Kai Ni 65cbff6af6 added unit tests 2010-02-22 06:42:58 +00:00
Frank Dellaert 6ea8a22958 Fixed two unit tests in MATLAB, needed some small changes in C++ as well 2010-02-21 23:50:28 +00:00
Frank Dellaert 694f6e4219 linearize now always returns a shared pointer 2010-02-21 21:17:47 +00:00
Frank Dellaert 517c82f62f Small details, like using a reference in FOREACH 2010-02-21 17:06:11 +00:00
Frank Dellaert fe4471930f avoid keys() call to known set of keys 2010-02-21 15:24:05 +00:00
Frank Dellaert 190ec53a63 use ifdef 2010-02-21 15:23:27 +00:00
Manohar Paluri 7f1c3f9952 fixed a bug 2010-02-21 04:51:42 +00:00
Frank Dellaert 274265a401 Errors:axpy and testErrors 2010-02-21 00:01:43 +00:00
Frank Dellaert 5b6af9e4bd 1.0 versions of BLAS level 2 2010-02-20 23:44:07 +00:00
Frank Dellaert ac316f2d56 formatting only 2010-02-20 23:43:41 +00:00
Richard Roberts 75b35949c9 Fixed several unit test main() functions that were returning 0 instead of the result of runAllTests. This caused unit tests to print failures but not count as failures in the pass/fail counts. In CMake projects, since test output is logged to a file instead of printed, this caused no indication of failures when they occured! All tests still pass with no other modifications after fixing this. 2010-02-20 22:22:45 +00:00
Kai Ni 1949a992cd define two additional types 2010-02-20 00:28:10 +00:00
Kai Ni 689b9fefc0 throw exceptions instead of crashing 2010-02-19 22:44:45 +00:00
Kai Ni d0ce5d36da created addPrior 2010-02-19 02:48:47 +00:00
Manohar Paluri e60d903210 removed extra quotes 2010-02-18 23:31:23 +00:00
Manohar Paluri 2bf4c0ce5b Fixed two bugs, both related to array overflow 2010-02-18 22:52:49 +00:00
Richard Roberts c26219e3d4 Added Pose2::matrix() function. 2010-02-18 16:27:01 +00:00
Frank Dellaert cd5c281c76 Added get and set 2010-02-18 14:30:16 +00:00
Frank Dellaert ede0a8c874 Added unit test 2010-02-18 14:29:40 +00:00
Frank Dellaert 3247751b5d Major check-in: there are now two interchangeable implementations of VectorConfig.
VectorMap uses a straightforward stl::map of Vectors. It has O(log n)
insert and access, and is fairly fast at both. However, it has high overhead
for arithmetic operations such as +, scale, axpy etc...

VectorBTree uses a functional BTree as a way to access SubVectors
in an ordinary Vector. Inserting is O(n) and much slower, but accessing,
is O(log n) and might be a bit slower than VectorMap. Arithmetic operations
are blindingly fast, however. The cost is it is not as KISS as VectorMap.

Access to vectors is now exclusively via operator[]
Vector access in VectorMap is via a Vector reference
Vector access in VectorBtree is via the SubVector type (see Vector.h)

Feb 16 2010: FD: I made VectorMap the default, because I decided to try
and speed up conjugate gradients by using Sparse FactorGraphs all the way.
2010-02-17 03:29:12 +00:00
Kai Ni cb5d4c3127 instantiate SymbolicConfig 2010-02-16 23:20:39 +00:00
Alex Cunningham d895cb90dc Added a static dim function to Point3 for generic detection of dimension 2010-02-16 20:21:03 +00:00
Alex Cunningham 529fc5536b Fixed templating problem with visualSLAM::ProjectionFactor 2010-02-16 02:09:07 +00:00
Frank Dellaert 30893b33eb some small details to work it work with NewVectorConfig 2010-02-15 23:54:10 +00:00
Frank Dellaert 5d33eb185c added SubVector type and some related routines 2010-02-15 23:53:16 +00:00
Frank Dellaert e4691a1594 BTree refactored, Node is now an inner class, find is non-recursive 2010-02-15 23:52:46 +00:00
Manohar Paluri 39708194a3 added TrifocalTensor test and changed DLT to use non-sorted version. 2010-02-15 23:45:53 +00:00
Frank Dellaert 341c4d9250 Deleted debug print 2010-02-15 21:38:33 +00:00
Manohar Paluri 8691d633a7 added testTensors to the tests 2010-02-15 20:25:38 +00:00
Alex Cunningham 17706d4ebd Added key template parameters to visualSLAM::projectionFactor without changing the interface. Added dimension checking function for Point2 type. 2010-02-15 16:37:37 +00:00
Manohar Paluri 6f0d23cdaf forgot to change comments in previous checkin 2010-02-14 07:26:53 +00:00
Manohar Paluri 1cc5bf748b make file changes and added make targets to the cproject 2010-02-14 07:26:10 +00:00
Manohar Paluri c16e6fc0d5 Moved Tensor related Files from CitySLAM 2010-02-14 07:25:03 +00:00
Manohar Paluri 1923778750 Moved Tensor related Files from CitySLAM 2010-02-14 07:24:37 +00:00
Frank Dellaert 44094b494e fixed maxIteration bug 2010-02-14 07:14:42 +00:00
Frank Dellaert 1f165a9f85 Made CG state a class 2010-02-14 05:52:20 +00:00
Manohar Paluri 43f9baf77a added test to check singular value ordering for a sample homography case 2010-02-14 04:56:29 +00:00
Manohar Paluri 693e13ef88 added default bool option to svd to sort the singular values and V. the default is true so pass false to avoid sorting 2010-02-14 04:54:39 +00:00
Kai Ni f9c2000847 save graph to graphviz format 2010-02-13 07:09:56 +00:00
Kai Ni d0a93ad9dd insert bayes net as a clique 2010-02-13 07:09:27 +00:00
Richard Roberts 4408eaf6f4 Added FactorGraph::checkGraphConsistency() to check for consistency between the variables->factors and factors->variables maps, and a unit test that tests the replace function including checking consistency. 2010-02-13 01:29:19 +00:00
Alex Cunningham f1988513fe Fixed bug in print function of TypedLabeledSymbol 2010-02-10 21:03:49 +00:00
Alex Cunningham dde0626e5c Added a constructor for TypedLabeledSymbol from Symbol that decodes the index to split out a label 2010-02-10 15:27:21 +00:00
Alex Cunningham d0aed559b5 TypedLabeledSymbols now convert properly to Symbols, so they can be used to add a runtime label to a TypedKey to express "Pose 1 of robot A" 2010-02-10 14:39:58 +00:00
Kai Ni 31999ecb1f added 4-way symbolic factor
fixed a bug in the bayes tree to graphviz routine
2010-02-09 22:59:18 +00:00
Richard Roberts e83b6c3b84 Normalizing rotation matrix to fix numerical instability when composing many poses 2010-02-09 22:44:02 +00:00
Kai Ni 31fc894a4a added 4-way symbolic factor
fixed a bug in the bayes tree to graphviz routine
2010-02-09 21:32:14 +00:00
Alex Cunningham d2a4bdae3c Made simulated2D factors more generic - can now specify key types 2010-02-09 19:47:39 +00:00
Alex Cunningham 8ff64793f1 Apparently, expmap != exmap. TupleConfigN's are no longer broken now. 2010-02-09 19:27:28 +00:00
Alex Cunningham 942e2b9c6d static chr() function for TypedSymbol, and another version of Symbol (don't use) 2010-02-09 03:59:45 +00:00
Alex Cunningham 0c74e0c309 Ensured that constraints add keys to keys_ 2010-02-09 01:52:36 +00:00
Alex Cunningham 8aa440a679 Fixed the instantiation macros and exmap global functions for TupleConfigN 2010-02-09 01:24:41 +00:00
Alex Cunningham 18d7fcc299 Added instantiation macros for TupleConfigs and NonlinearConstraints 2010-02-08 22:29:00 +00:00
Richard Roberts fbef948254 Bug fix in replace() 2010-02-08 22:22:38 +00:00
Richard Roberts ea9b44ea15 Fixed indentation 2010-02-08 22:21:56 +00:00
Alex Cunningham ed338300a1 Instantiation script for TupleConfig 2010-02-08 20:53:18 +00:00
Alex Cunningham ea3b8083b0 Fixed more tests for NonlinearConstraints, inequality constraints now work. 2010-02-07 01:18:17 +00:00
Chris Beall 814fb949ba fixed critical bug relating to height of tree 2010-02-06 17:45:40 +00:00
Chris Beall 675b30d1c1 updates to BTree 2010-02-06 15:53:31 +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 d8a8575d26 Removed a fixme comment 2010-02-06 05:12:09 +00:00
Alex Cunningham d1267d1ef3 Added more constructors, print functionality and formatting for TupleConfig 2010-02-06 05:10:25 +00:00
Alex Cunningham bb74b5c882 Added a config template parameter for ProjectionFactors 2010-02-06 05:08:52 +00:00
Alex Cunningham af9f45ff24 Used template parameters in simulated2D to make it possible to template factors on a config type with typedefs for the previous usage so no other code needs to change 2010-02-05 14:49:40 +00:00
Alex Cunningham 040d45cb45 Added wrapper classes for TupleConfig for ease of use. 2010-02-05 01:33:33 +00:00
Chris Beall 8fe0795dd0 BTree moved into gtsam 2010-02-04 21:02:05 +00:00
Alex Cunningham 5c1c8ee76f Changed PairConfig interface so that the internal configs need to be accessed with first() and second(). This is in anticipation of switching PairConfig to TupleConfig2. 2010-02-04 17:15:09 +00:00
Alex Cunningham 2068477e32 Added pragma once to LieConfig to prevent errors if included multiple times 2010-02-04 16:08:59 +00:00
Alex Cunningham 67744a5f07 Changed NonlinearConstraint to correctly use new keys 2010-02-04 16:08:11 +00:00
Alex Cunningham 01bbd3cf8d Disabling SQP tests while transitioning config types and SQP implementation 2010-02-04 16:07:20 +00:00