| 
									
										
										
										
											2009-11-13 22:01:51 +08:00
										 |  |  | USAGE - Georgia Tech Smoothing and Mapping library | 
					
						
							|  |  |  | --------------------------------------------------- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | What is this file? | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	This file explains how to make use of the library for common SLAM tasks,  | 
					
						
							|  |  |  | 	using a visual SLAM implementation as an example. | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | Getting Started | 
					
						
							|  |  |  | --------------------------------------------------- | 
					
						
							|  |  |  | Install: | 
					
						
							|  |  |  | 	Follow the installation instructions in the README file to build and  | 
					
						
							|  |  |  | 	install gtsam, as well as running tests to ensure the library is working | 
					
						
							|  |  |  | 	properly. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Compiling/Linking with gtsam: | 
					
						
							|  |  |  |   	The installation creates a binary "libgtsam" at the installation prefix, | 
					
						
							|  |  |  |   	and an include folder "gtsam".  These are the only required includes, but  | 
					
						
							|  |  |  |   	the library has also been designed to make use of XML serialization through | 
					
						
							|  |  |  |   	the Boost.serialization library, which requires the the Boost.serialization | 
					
						
							|  |  |  |   	headers and binaries to be linked.   | 
					
						
							| 
									
										
										
										
											2012-03-31 02:14:31 +08:00
										 |  |  |   	 | 
					
						
							|  |  |  |   	If you use CMake for your project, you can use the CMake scripts in the  | 
					
						
							|  |  |  |   	cmake folder for finding GTSAM, CppUnitLite, and Wrap.   | 
					
						
							| 
									
										
										
										
											2009-11-13 22:01:51 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | Examples: | 
					
						
							|  |  |  | 	To see how the library works, examine the unit tests provided.   | 
					
						
							|  |  |  |   | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Overview | 
					
						
							|  |  |  | --------------------------------------------------- | 
					
						
							| 
									
										
										
										
											2012-03-31 02:14:31 +08:00
										 |  |  | The GTSAM library has three primary components necessary for the construction | 
					
						
							| 
									
										
										
										
											2009-11-13 22:01:51 +08:00
										 |  |  | of factor graph representation and optimization which users will need to  | 
					
						
							|  |  |  | adapt to their particular problem.   | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | FactorGraph: | 
					
						
							|  |  |  | 	A factor graph contains a set of variables to solve for (i.e., robot poses, | 
					
						
							|  |  |  | 	landmark poses, etc.) and a set of constraints between these variables, which  | 
					
						
							|  |  |  | 	make up factors.   | 
					
						
							| 
									
										
										
										
											2010-10-23 07:26:16 +08:00
										 |  |  | Values:  | 
					
						
							|  |  |  | 	Values is a single object containing labeled values for all of the  | 
					
						
							| 
									
										
										
										
											2009-11-13 22:01:51 +08:00
										 |  |  | 	variables.  Currently, all variables are labeled with strings, but the type  | 
					
						
							|  |  |  | 	or organization of the variables can change | 
					
						
							|  |  |  | Factors: | 
					
						
							|  |  |  | 	A nonlinear factor expresses a constraint between variables, which in the | 
					
						
							|  |  |  | 	SLAM example, is a measurement such as a visual reading on a landmark or | 
					
						
							|  |  |  | 	odometry. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-01-31 03:42:23 +08:00
										 |  |  | The library is organized according to the following directory structure: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     3rdparty      local copies of third party libraries - Eigen3 and CCOLAMD | 
					
						
							|  |  |  |     base          provides some base Math and data structures, as well as test-related utilities | 
					
						
							|  |  |  |     geometry      points, poses, tensors, etc | 
					
						
							|  |  |  |     inference     core graphical model inference such as factor graphs, junction trees, Bayes nets, Bayes trees  | 
					
						
							|  |  |  |     linear        inference specialized to Gaussian linear case, GaussianFactorGraph etc... | 
					
						
							|  |  |  |     nonlinear     non-linear factor graphs and non-linear optimization | 
					
						
							|  |  |  |     slam          SLAM and visual SLAM application code | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-13 22:01:51 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | VSLAM Example | 
					
						
							|  |  |  | --------------------------------------------------- | 
					
						
							|  |  |  | The visual slam example shows a full implementation of a slam system.  The example contains | 
					
						
							| 
									
										
										
										
											2012-03-31 02:14:31 +08:00
										 |  |  | derived versions of NonlinearFactor, NonlinearFactorGraph, in classes visualSLAM::ProjectionFactor,  | 
					
						
							|  |  |  | visualSLAM::Graph, respectively. The values for the system are stored in the generic  | 
					
						
							|  |  |  | Values structure. For definitions and interface, see gtsam/slam/visualSLAM.h.  | 
					
						
							| 
									
										
										
										
											2009-11-13 22:01:51 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | The clearest example of the use of the graph to find a solution is in  | 
					
						
							| 
									
										
										
										
											2012-03-31 02:14:31 +08:00
										 |  |  | testVSLAM.  The basic process for using graphs is as follows (and can be seen in  | 
					
						
							| 
									
										
										
										
											2009-11-13 22:01:51 +08:00
										 |  |  | the test): | 
					
						
							| 
									
										
										
										
											2012-03-31 02:14:31 +08:00
										 |  |  |   - Create a NonlinearFactorGraph object (visualSLAM::Graph) | 
					
						
							|  |  |  |   - Add factors to the graph (note the use of Boost.shared_ptr here) (visualSLAM::ProjectionFactor) | 
					
						
							|  |  |  |   - Create an initial configuration (Values) | 
					
						
							| 
									
										
										
										
											2009-11-13 22:01:51 +08:00
										 |  |  |   - Create an elimination ordering of variables (this must include all variables) | 
					
						
							|  |  |  |   - Create and initialize a NonlinearOptimizer object (Note that this is a generic  | 
					
						
							|  |  |  |       algorithm that does not need to be derived for a particular problem) | 
					
						
							|  |  |  |   - Call optimization functions with the optimizer to optimize the graph | 
					
						
							| 
									
										
										
										
											2012-03-31 02:14:31 +08:00
										 |  |  |   - Extract an updated values from the optimizer | 
					
						
							| 
									
										
										
										
											2009-11-13 22:01:51 +08:00
										 |  |  |   | 
					
						
							|  |  |  |    |