Commit Graph

535 Commits (7f8371aad7ce33c350a8abfcd8928bae7a5ba60c)

Author SHA1 Message Date
Frank Dellaert 84afc94458
Feature/shonan averaging (#473)
Shonan Rotation Averaging.

199 commit messages below, many are obsolete as design has changed quite a bit over time, especially from the earlier period where I thought we only needed SO(4).

* prototyping weighted sampler

* Moved WeightedSampler into its own header

* Random now uses std header <random>.

* Removed boost/random usage from linear and discrete directories

* Made into class

* Now using new WeightedSampler class

* Inlined random direction generation

* eradicated last vestiges of boost/random in gtsam_unstable

* Added 3D example g2o file

* Added Frobenius norm factors

* Shonan averaging algorithm, using SOn class

* Wrapping Frobenius and Shonan

* Fixed issues with <<

* Use Builder parameters

* Refactored Shonan interface

* Fixed << issues as well as MATLAB segfault, using eval(), as discussed in issue #451

* ShonanAveragingParameters

* New factor FrobeniusWormholeFactorP computes |Rj*P - Ri*P*Rij|

* Fixed broken GetDimension for Lie groups with variable dimension.

* Removed all but Shonan averaging factor and made everything work with new SOn

* Just a single WormholeFactor, wrapped noise model

* Use std <random>

* comments/todos

* added timing script

* add script to process ShonanAveraging timing results

* Now producing a CSV file

* Parse csv file and make combined plot

* Fixed range

* change p value and set two flags on

* input file path, all the csv files proceeses at the same time

* add check convergence rate part

* csv file have name according to input  data name

* correct one mistake in initialization

* generate the convergence rate for each p value

* add yticks for the bar plot

* add noises to the measurements

* test add noise

* Basic structure for checkOptimalityAt

* change optimizer method to cholesky

* buildQ now working. Tests should be better but visually inspected.

* multiple test with cholesky

* back

* computeLambda now works

* make combined plots while make bar plot

* Calculate minimum eigenvalue - the very expensive version

* Exposed computeMinEigenValue

* make plots and bar  togenter

* method change to jacobi

* add time for check optimality, min_eigen_value, sub_bound

* updated plot min_eigen value and subounds

* Adding Spectra headers

* David's min eigenvalue code inserted and made to compile.

* Made it work

* Made "run" method work.

* add rim.g2o name

* Fixed bug in shifting eigenvalues

* roundSolution which replaces projectFrom

* removed extra arguments

* Added to wrapper

* Add SOn to template lists

* roundSolution delete the extra arguement p

* only calculate p=5 and change to the correct way computing f_R

* Fixed conflict and made Google-style name changes

* prototype descent code and unit test for initializeWithDescent

* add averaging cost/time part in processing data

* initializewithDescent success in test

* Formatting and find example rather than hardcode

* Removed accidentally checked in cmake files

* give value to xi by block

* correct gradient descent

* correct xi

* }

* Fix wrapper

* Make Hat/Vee have alternating signs

* MakeATangentVector helpder function

* Fixed cmake files

* changed sign

* add line search

* unit test for line search

* test real data with line search

* correct comment

* Fix boost::uniform_real

* add save .dat file

* correct test case

* add explanation

* delete redundant cout

* add name to .dat output file

* correct checkR

* add get poses_  in shonan

* add Vector Point type for savig data

* Remove cmake file which magically re-appeared??

* Switched to std random library.

* Prepare Klaus test

* Add klaus3.g2o data.

* fix comment

* Fix derivatives

* Fixed broken GetDimension for Lie groups with variable dimension.

* Fix SOn tests to report correct dimension

* Added tests for Klaus3 data

* Add runWithRandomKlaus test for shonan.

* Finish runWithRandomKlaus unittest.

* Correct datafile.

* Correct the format.

* Added measured and keys methods

* Shonan works on Klaus data

* Create dense versions for wrappers, for testing

* Now store D, Q, and L

* Remove another cmake file incorrectly checked in.

* Found and fixed the bug in ComputeLambda !

* Now using Q in Lambdas calculation, so Lambdas agree with Eriksson18cvpr.

* Make FrobeniusFactor not use deprecated methods

* FrobeniusWormholeFactor takes Rot3 as argument

* Wrapped some more methods.

* Wrapped more methods

* Allow creating and populating BetweenFactorPose3s in python

* New constructors for ShonanAveraging

* add function of get measurements number

* Remove option not to use noise model

* wrap Use nrMeasurements

* Made Logmap a bit more tolerant of slightly degenerate rotations (with trace < -1)

* Allow for Anchor index

* Fix anchor bug

* Change outside view to Rot3 rather than SO3

* Add Lift in SOn class

* Make comet working

* Small fixes

* Delete extra function

* Add SOn::Lift

* Removed hardcoded flag

* Moved Frobenius factor to gtsam from unstable

* Added new tests and made an old regression pass again

* Cleaned up formatting and some comments, added EXPORT directives

* Throw exception if wrongly dimensioned values are given

* static_cast and other throw

* Fixed run-time dimension

* Added gauge-constraining factor

* LM parameters now passed in, added Gauge fixing

* 2D test scaffold

* Comments

* Pre-allocated generators

* Document API

* Add optional weight

* New prior weeights infrastructure

* Made d a template parameter

* Recursive Hat and RetractJacobian test

* Added Spectra 0.9.0 to 3rdparty

* Enabling 2D averaging

* Templatized Wormhole factor

* ignore xcode folder

* Fixed vec and VectorizedGenerators templates for fixed N!=3 or 4

* Simplifying constructors
Moved file loading to tests (for now)
All unit tests pass for d==3!

* Templated some methods internally

* Very generic parseToVector

* refactored load2d

* Very much improved FrobeniusWormholeFactor (Shonan) Jacobians

* SO(2) averaging works !

* Templated parse methods

* Switched to new Dataset paradigm

* Moved Shonan to gtsam

* Checked noise model is correctly gotten from file

* Fixed covariance bug

* Making Shonan wrapper work

* Renamed FrobeniusWormholeFactor to ShonanFactor and moved into its own compilation unit in gtsam/sfm

* Fixed wrong include

* Simplified interface (removed irrelevant random inits) and fixed eigenvector test

* Removed stray boost::none

* Added citation as suggested by Jose

* Made descent test deterministic

* Fixed some comments, commented out flaky test

Co-authored-by: Jing Wu <jingwu@gatech.edu>
Co-authored-by: jingwuOUO <wujing2951@gmail.com>
Co-authored-by: swang <swang736@gatech.edu>
Co-authored-by: ss <ss>
Co-authored-by: Fan Jiang <prof.fan@foxmail.com>
2020-08-17 07:43:10 -04:00
Frank Dellaert 9bcdbe8b78
Merge pull request #463 from borglab/feature/sfm_binary_measurement
Update translation averaging to use vector of binary measurements instead of map
2020-08-13 09:35:22 -04:00
akrishnan86 2540285afe sfm changes to docs, format, wrapper 2020-08-08 12:09:30 -07:00
akrishnan86 667fb9a4b9 binary measurement wrap 2020-08-06 06:28:34 -07:00
Frank Dellaert 94f744ecae Allow graph to be queried 2020-08-01 15:40:50 -04:00
Varun Agrawal 82849112ec wrap preintegrated function 2020-07-30 20:52:07 -05:00
Frank Dellaert 73209e6faa
Merge pull request #269 from borglab/feature/noisemodel_rename_functions
Feature/noisemodel rename functions
2020-07-13 13:15:37 -04:00
Fan Jiang 72ce0c088a Merge remote-tracking branch 'origin/develop' into feature/wrap_cg 2020-07-11 00:08:50 -04:00
Fan Jiang 3f4731a948 Added wrapping for the PCG solver in Cython 2020-07-10 15:00:57 -04:00
Fan Jiang 3d8641c0c3 Merge remote-tracking branch 'origin/develop' into feature/noisemodel_rename_functions 2020-07-09 14:26:39 -04:00
Fan Jiang 8739c372fb Merge remote-tracking branch 'origin/develop' into feature/frobeniusfactor 2020-06-27 01:26:53 -04:00
Varun Agrawal 8ebd7f7f54
Merge pull request #370 from borglab/feature/minor-updates
Minor Updates
2020-06-25 14:10:01 -05:00
Varun Agrawal 7f1384b0f2 wrap the biasHat function for PreintegratedMeasurement 2020-06-24 19:25:56 -05:00
Fan Jiang 37673771ae Fixed all alignment problems 2020-06-22 15:24:14 -04:00
Frank Dellaert 0bd8143057 Importing Frobenius error factors from Shonan effort 2020-06-19 23:33:29 -04:00
Akshay Krishnan 8ce40a3584
Merge pull request #325 from borglab/feature/alternate_hatvee_signs
Alternate signs on Hat/Vee and update tests
2020-06-12 08:27:15 -04:00
Varun Agrawal 6400c505c6
Merge pull request #347 from borglab/feature/wrap-symbol-shorthand
Wrapper Updates for Global Functions
2020-06-11 11:27:37 -05:00
Varun Agrawal cbf15257bd comment notifying end of symbol_shorthand namespace 2020-06-10 11:42:56 -05:00
Varun Agrawal 1a8baeac99 remove wrapping of Key 2020-06-09 18:16:30 -05:00
Varun Agrawal 9e4a6e6167 Wrapper updates for IMU data
- Wrapped Values to allow for using NavState
- Wrapped the symbol shorthands e.g. gtsam.X(0)
2020-06-09 17:53:03 -05:00
Varun Agrawal b11b184f22 add resetIntegrationAndSetBias to wrapper 2020-06-09 12:14:44 -05:00
Varun Agrawal 9234c7993c wrap the addPrior method and added a test for python 2020-06-02 14:59:03 -05:00
Binit Shah 99cc2294e1 Alternate signs on Hat/Vee and update tests 2020-05-28 05:25:33 -04:00
alescontrela f4525b51e4 Change PriorFactor includes from gtsam/slam to gtsam/nonlinear 2020-04-10 22:26:22 -04:00
yetongumich efcc5c908e rename residual to loss 2020-04-06 10:10:46 -04:00
Frank Dellaert d1d8543fc7 Fixed issues with deprecated Sampler methods 2020-04-04 13:57:05 -04:00
Varun Agrawal ca4daa0894
Merge pull request #258 from borglab/deprecate-simplecamera
Replace SimpleCamera with PinholeCameraCal3_S2
2020-03-23 08:08:18 -04:00
Frank Dellaert 2c44ee459b
Merge pull request #243 from borglab/feature/rot3-angle
Axis-Angle (in radians) representation for Rot3 matrices
2020-03-18 14:30:08 -04:00
Varun Agrawal 81b52c674a wrap AxisAngle constructor for rotations 2020-03-16 23:33:55 -04:00
Varun Agrawal 4625a16d70 wrapped simpleCamera function to get camera from projection matrix 2020-03-09 22:57:59 -04:00
Varun Agrawal ab46c7c3ce removed static ToAxisAngle function 2020-03-09 16:01:24 -04:00
Varun Agrawal 0fbe63aa17 static function & method for axis-angle with improved tests and fix for sign ambiguity 2020-03-08 17:07:40 -04:00
Varun Agrawal 7019d6f4b8 convert axisAngle to static ToAxisAngle, update tests 2020-03-07 08:35:08 -05:00
Varun Agrawal 75d5409d78 follow Google style guide naming convention for Sfm related data structs 2020-03-06 18:02:51 -05:00
Varun Agrawal 719975022c consistent naming scheme for SfM_Data 2020-03-06 17:56:32 -05:00
Varun Agrawal 0e6efb98d7 compute angle in degrees between 2 Rot3 matrices 2020-03-06 16:30:07 -05:00
Varun Agrawal a2ef54c60f added more function to retrieve SfM_data and wrapped them 2020-03-03 21:43:29 -05:00
Varun Agrawal 381f7bee30 wrap SfM_data struct 2020-03-03 21:42:36 -05:00
Varun Agrawal 46ac536bf0 wrap Rot3 slerp function to allow for rotation interpolation 2020-02-25 22:10:42 -05:00
Varun Agrawal d9923fc3cc replaced/appended all calls to SimpleCamera with PinholeCameraCal3_S2 2020-02-21 19:42:55 -05:00
Varun Agrawal 56ca889913
Merge pull request #219 from borglab/wrapper-update
Minor updates to wrapper
2020-02-05 15:18:25 -05:00
Varun Agrawal 80ff5334ce support K() and matrix() for Cal3_S2 2020-02-05 11:27:57 -05:00
Varun Agrawal 9f3a7617d5 replace Cal3_S2 deprecated matrix() with K(), add Cal3DS2 support to triangulation 2020-02-05 00:44:50 -05:00
Varun Agrawal f1e167db7e retrieve Point3 from Unit3 in wrapper code 2020-01-21 17:59:44 -05:00
Gerry Chen 41e045580c python wrapper: access to gaussian conditional matrices 2020-01-14 21:28:18 -05:00
Gerry Chen 69e3e91ea8 add Information constructor to python wrapper for gaussian noise model 2020-01-14 18:00:30 -05:00
Frank Dellaert e971c933d2 Merge remote-tracking branch 'origin/develop' into feature/rotation_group
# Conflicts:
#	gtsam.h
#	gtsam/linear/GaussianBayesNet.cpp
2019-11-27 14:18:39 -08:00
mxie32 8df7981564 expose GPSFactor in python wrapper, and add example for it 2019-10-19 17:15:56 -04:00
Jean-Philippe Tardif f58a5f89f2 clean up commented code 2019-10-18 14:15:19 -04:00
Jean-Philippe Tardif 730199b678 Fix python wrappers for BetweenFactorVector and PreintegratedCombinedMeasurements and
added Vector type to the BetweenFactor generation
Created PreintegrationCombinedParams to add constructor for PreintegratedCombinedMeasurements
2019-10-18 10:55:02 -04:00