Commit Graph

286 Commits (18cb76130989c26dbb4ecf3fde616fd9142ff06f)

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 42e1af5358 Merge branch 'develop' into feature/actions_ci_add
# Conflicts:
#	.travis.yml
2020-08-16 23:21:18 -04:00
Fan Jiang d0724a77bb Backport GitHub Actions CI (#259)
* Add GitHub Actions
* Add Windows Check
* Fix wrong os selection
* Add XCode version
* Upgrade GCC Version
* Make GCC match Ubuntu name
* Do not fail everyone when one failed
* More checks on ccache
* Do not expose GenericValue on Windows
* Fix BetweenFactor for Windows
* Update
* Add Python CI
* Typo
* Add note about GENERICVALUE_VISIBILITY
* Fix Windows Boost
* Change substitution scheme to PowerShell
* Fix the spurious error of the Point3 default constructor
* Separate builds to allow easier restarts
* Fix uninitialized variable usage
* Change of policy, only build python stuff, mac and win on PRs
* Further separate the Python tests
2020-08-15 11:52:00 -04:00
mawallace 68671427e6 Remove set_zlabel from plot_pose2 2020-08-05 22:15:10 -04:00
Varun Agrawal 6660e2a532 added axis labels and figure titles as optional params 2020-07-24 09:43:37 -05:00
Varun Agrawal 2e0f2962c4 add axis labels to the trajectory plot 2020-07-23 13:20:57 -05:00
Frank Dellaert c8ddd43f97
Merge pull request #277 from borglab/feature/python-install
Auto-install Python Package
2020-07-16 12:50:58 -04:00
Fan Jiang 038bf297f6
Merge pull request #385 from borglab/fix/logging_lambda
Fix lambda check in logging optimizer
2020-07-12 20:56:47 -04:00
Fan Jiang 566467de5d use isinstance 2020-07-11 16:50:25 -04:00
Fan Jiang 25513379e3 Add unit test 2020-07-11 14:37:54 -04:00
Fan Jiang 8e5f1447e3 Add check to ensure we are calling lambda on a LM 2020-07-11 11:54:40 -04:00
Fan Jiang 686ea137e7 Merge remote-tracking branch 'origin/develop' into fix/logging_lambda 2020-07-09 17:07:07 -04:00
Fan Jiang 4a0b031a2a add return value in gtsam_optimize 2020-07-09 14:26:18 -04:00
Fan Jiang f8b48db581 Fix lambda check in logging optimizer 2020-07-08 17:10:43 -04:00
Varun Agrawal 66570469c5 fix working directory for python install target 2020-07-07 17:38:27 -04:00
Varun Agrawal db40cd71fc Merge branch 'develop' into feature/python-install 2020-07-07 13:57:43 -04:00
Fan Jiang 683e37f148 Fix FrobeniusWormholeFactor Python test 2020-07-06 23:36:17 -04:00
Fan Jiang 6d5706049d Merge remote-tracking branch 'origin/develop' into feature/frobeniusfactor 2020-07-06 22:58:23 -04:00
Varun Agrawal e08e392020 Improved paths and added checks 2020-07-05 21:57:18 -05:00
Varun Agrawal 52da4580fb make utils and test code python2 compliant 2020-07-01 18:52:02 -05:00
Varun Agrawal a6908cd1cb removed unneeded install commands and updated README 2020-07-01 16:23:24 -05:00
Varun Agrawal 59968fddc5 Python Wrapper CMake update
- Added python-install target variable for easy updating.
- Fixed/Added all dependencies so that everything is built automatically.
- Removed unnecessary install commands
2020-07-01 14:36:57 -05:00
Varun Agrawal 8859b963a2 In-place cython build
Build everything inside the build/cython{BuildType} directory directly, so we can bypass the `make install` step and introduce the `make python-install` step which allows cmake to handle all dependencies.
2020-07-01 12:13:53 -05:00
Varun Agrawal 54f2acd521 updated cython wrapper README 2020-06-30 20:57:31 -05:00
Varun Agrawal c84060acea Use the high level cython variables, improve install process 2020-06-30 20:47:32 -05:00
Varun Agrawal 06476c8ee7 Create and use cython build directory 2020-06-30 20:46:55 -05:00
Varun Agrawal 192bf870af newline added to end of CMake file 2020-06-30 13:16:09 -05:00
Varun Agrawal 83cbcd0bea capture stdout in python test [only for python3] 2020-06-30 13:13:04 -05:00
Varun Agrawal 16532bff37 run setup.py after installing the gtsam_eigency module 2020-06-29 21:37:07 -05:00
Varun Agrawal 806e5b12a3 cleaner version of execution script which only needs 'make install' 2020-06-29 19:29:52 -05:00
Varun Agrawal 54c2903183 make python-install command depends on gtsam target 2020-06-29 16:53:42 -05:00
Varun Agrawal 192184b3b7 Specify working directory from where to call setup.py 2020-06-24 18:40:03 -05:00
Varun Agrawal 4f6f821611 Vastly improved setup.py template 2020-06-24 18:39:49 -05:00
Varun Agrawal 453d3a7416 Added cmake variable GTSAM_CYTHON_INSTALL_FULLPATH to include build tag directly 2020-06-24 18:11:24 -05:00
Varun Agrawal 2475e6c68c Load Cython requirements file instead of reading it in cmake 2020-06-24 17:44:03 -05:00
Varun Agrawal efde078b94 pure CMake script to install Python wrapper after compiling 2020-06-24 14:05:17 -05:00
Varun Agrawal 530016edf0 added Windows batch script to install python wrapped package 2020-06-24 11:06:35 -05:00
Varun Agrawal 6972a5c9a7 updated comments in shell script 2020-06-24 11:06:01 -05:00
Varun Agrawal 56539c9e1a Merge branch 'develop' into feature/python-install 2020-06-23 23:55:09 -04:00
Varun Agrawal 1c9f429d9c Merge branch 'develop' into feature/frobeniusfactor 2020-06-23 23:47:50 -04:00
Varun Agrawal 9daeb39267
Set minimum supported numpy version to 1.11.0 (#366)
* add deadsnakes ppa to install python3.6 on Ubuntu Xenial

* updated travis distro to Ubuntu 18.04 bionic

* Revert "updated travis distro to Ubuntu 18.04 bionic"

This reverts commit 323264a924e8554da49c27a374e9a6278c5a659e.

* restrict numpy version to be less than 1.19.0

* use ubuntu packaged numpy as baseline version to test against

* downgrade minimum required version of numpy to version supported by Ubuntu Xenial

* undo explicit pip install
2020-06-23 16:08:44 -05:00
Varun Agrawal ca46ebfda8 added comments and removed unnecessary code 2020-06-22 20:20:50 -05:00
Varun Agrawal 93a00a38a4 add new make command for installing python wrapper 2020-06-22 20:14:03 -05:00
Varun Agrawal 1725a577cf cmake function to install python package once make install is completed 2020-06-22 17:25:29 -05:00
Frank Dellaert 0bd8143057 Importing Frobenius error factors from Shonan effort 2020-06-19 23:33:29 -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 ad08920880 Updated examples and tests with new symbol shorthands 2020-06-10 15:44:49 -05:00
Varun Agrawal 8008d69dc6 update python functions to include namespace 2020-06-10 15:14:07 -05:00
Fan Jiang 18e80b83aa
Merge pull request #345 from borglab/feature/logging_optimizer
Add logging (hooked) optimizer
2020-06-10 15:36:56 -04:00
Varun Agrawal e59f898e10
Merge pull request #317 from tuwuhs/fix-msvc-cython
Fix Cython build on Windows/MSVC
2020-06-10 11:55:34 -05:00