gtsam/examples
Frank Dellaert ff6fe5e5e3 get_* naming convention in GaussianConditional 2019-05-16 18:59:24 -04:00
..
Data Merge remote-tracking branch 'origin/develop' into feature/LPSolver 2019-04-24 16:08:50 -04:00
CMakeLists.txt Using macro for creating examples to remove cmake code copy/paste 2014-02-13 13:24:14 -05:00
CameraResectioning.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
CreateSFMExampleData.cpp Removed some uses of BOOST_FOREACH 2016-05-18 14:34:53 -07:00
DiscreteBayesNet_FG.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
ISAM2Example_SmartFactor.cpp Some more cleanup 2018-09-29 17:31:46 -04:00
ISAM2_SmartFactorStereo_IMU.cpp Fixed warning 2018-12-31 12:30:53 -05:00
ImuFactorExample2.cpp Fixed possibly uninitialized warnings in ImuFactorExample2.cpp 2018-12-16 17:47:00 -05:00
ImuFactorsExample.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
InverseKinematicsExampleExpressions.cpp Fixed comment 2019-04-17 09:02:16 -04:00
LocalizationExample.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
METISOrderingExample.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
OdometryExample.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
PlanarSLAMExample.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
Pose2SLAMExample.cpp Replaced graph.add with graph.emplace_shared if needed. 2016-10-01 11:41:37 -04:00
Pose2SLAMExampleExpressions.cpp Merged in feature/SmartCT (pull request #107) 2015-02-22 06:14:19 +01:00
Pose2SLAMExample_g2o.cpp Fixed (case) type 2015-02-21 13:49:53 +01:00
Pose2SLAMExample_graph.cpp include Pose2 2015-02-22 06:20:53 +01:00
Pose2SLAMExample_graphviz.cpp Updated functions 2016-09-09 08:33:51 -04:00
Pose2SLAMExample_lago.cpp Fixed (case) type 2015-02-21 13:49:53 +01:00
Pose2SLAMStressTest.cpp Switching to METIS ordering fixes out of memory error for large examples. 2018-12-31 13:08:41 -05:00
Pose2SLAMwSPCG.cpp Updated functions 2016-09-09 08:33:51 -04:00
Pose3SLAMExampleExpressions_BearingRangeWithTransform.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
Pose3SLAMExample_changeKeys.cpp deprecated get_noiseModel 2019-05-16 14:40:55 -04:00
Pose3SLAMExample_g2o.cpp Replaced BOOSE_FOREACH with for in examples folder. Tested the changed code locally: successful. 2016-05-20 09:20:03 -04:00
Pose3SLAMExample_initializePose3Chordal.cpp Replaced BOOSE_FOREACH with for in examples folder. Tested the changed code locally: successful. 2016-05-20 09:20:03 -04:00
Pose3SLAMExample_initializePose3Gradient.cpp Replaced BOOSE_FOREACH with for in examples folder. Tested the changed code locally: successful. 2016-05-20 09:20:03 -04:00
README.md Imroved ReadMe, now in markup 2016-06-05 18:58:35 -07:00
RangeISAMExample_plaza2.cpp Removed #include <boost/foreach.hpp> in both files in example folder. Tested it locally: success. 2016-05-20 09:35:27 -04:00
SFMExample.cpp Updated functions 2016-09-09 08:33:51 -04:00
SFMExampleExpressions.cpp Pose3 naming convention 2019-05-16 15:06:15 -04:00
SFMExampleExpressions_bal.cpp Removed some uses of BOOST_FOREACH 2016-05-18 14:34:53 -07:00
SFMExample_SmartFactor.cpp Updated functions 2016-09-09 08:33:51 -04:00
SFMExample_SmartFactorPCG.cpp Updated functions 2016-09-09 08:33:51 -04:00
SFMExample_bal.cpp Updated functions 2016-09-09 08:33:51 -04:00
SFMExample_bal_COLAMD_METIS.cpp Replaced graph.push_back with graph.emplace_shared if needed. 2016-10-01 11:17:41 -04:00
SFMdata.h remove trailing spaces 2019-02-11 10:58:34 -05:00
SelfCalibrationExample.cpp Replaced graph.push_back with graph.emplace_shared if needed. 2016-10-01 11:17:41 -04:00
SimpleRotation.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
SolverComparer.cpp Pose3 naming convention 2019-05-16 15:06:15 -04:00
StereoVOExample.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
StereoVOExample_large.cpp Pose3 naming convention 2019-05-16 15:06:15 -04:00
TimeTBB.cpp Fixes compile errors when using BOOST version 1.61.0 2016-08-06 00:59:07 -04:00
UGM_chain.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
UGM_small.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
VisualISAM2Example.cpp Cleaned up example 2018-09-30 17:22:53 -04:00
VisualISAMExample.cpp Replaced graph.add with graph.emplace_shared if needed. 2016-10-01 11:41:37 -04:00
easyPoint2KalmanFilter.cpp remove trailing spaces 2019-02-11 10:58:34 -05:00
elaboratePoint2KalmanFilter.cpp get_* naming convention in GaussianConditional 2019-05-16 18:59:24 -04:00

README.md

GTSAM Examples

This directory contains all GTSAM C++ examples GTSAM pertaining to SFM

Basic Examples:

  • SimpleRotation: a simple example of optimizing a single rotation according to a single prior
  • CameraResectioning: resection camera from some known points
  • SFMExample: basic structure from motion
  • SFMExample_bal: same, but read data from read from BAL file
  • SelfCalibrationExample: Do SFM while also optimizing for calibration

Stereo Visual Odometry Examples

Visual odometry using a stereo rig:

  • StereoVOExample: basic example of stereo VO
  • StereoVOExample_large: larger, with a snippet of Kitti data

More Advanced Examples

The following examples illustrate some concepts from Georgia Tech's research papers, listed in the references section at the end:

  • VisualISAMExample: uses iSAM [TRO08]
  • VisualISAM2Example: uses iSAM2 [IJRR12]
  • SFMExample_SmartFactor: uses smartFactors [ICRA14]

Kalman Filter Examples

  • elaboratePoint2KalmanFilter: simple linear Kalman filter on a moving 2D point, but done using factor graphs
  • easyPoint2KalmanFilter: uses the generic templated Kalman filter class to do the same
  • fullStateKalmanFilter: simple 1D example with a full-state filter
  • errorStateKalmanFilter: simple 1D example of a moving target measured by a accelerometer, incl. drift-rate bias

2D Pose SLAM

  • LocalizationExample.cpp: modeling robot motion
  • LocalizationExample2.cpp: example with GPS like measurements
  • Pose2SLAMExample: A 2D Pose SLAM example using the predefined typedefs in gtsam/slam/pose2SLAM.h
  • Pose2SLAMExample_advanced: same, but uses an Optimizer object
  • Pose2SLAMwSPCG: solve a simple 3 by 3 grid of Pose2 SLAM problem by using easy SPCG interface

Planar SLAM with landmarks

  • PlanarSLAMExample: simple robotics example using the pre-built planar SLAM domain
  • PlanarSLAMExample_selfcontained: simple robotics example with all typedefs internal to this script.

Visual SLAM

The directory vSLAMexample includes 2 simple examples using GTSAM:

  • vSFMexample using visual SLAM for structure-from-motion (SFM)
  • vISAMexample using visual SLAM and ISAM for incremental SLAM updates

See the separate README file there.

##Undirected Graphical Models (UGM) The best representation for a Markov Random Field is a factor graph :-) This is illustrated with some discrete examples from the UGM MATLAB toolbox, which can be found at http://www.di.ens.fr/~mschmidt/Software/UGM

##Building and Running To build, cd into the directory and do:

mkdir build
cd build
cmake ..

For each .cpp file in this directory two make targets are created, one to build the executable, and one to build and run it. For example, the file CameraResectioning.cpp contains simple example to resection a camera from 4 known points. You can build it using

make CameraResectioning

or build and run it immediately with

make CameraResectioning.run

which should output:

Final result:
Values with 1 values:
Value x1: R:
[
           1,	         0.0,	         0.0,	
         0.0,	          -1,	         0.0,	
         0.0,	         0.0,	          -1,	
];
t: [0, 0, 2]';

References