GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Namespaces | Typedefs | Enumerations | Functions
dataset.h File Reference

utility functions for loading datasets More...

#include <gtsam/sfm/BinaryMeasurement.h>
#include <gtsam/slam/BetweenFactor.h>
#include <gtsam/sfm/SfmData.h>
#include <gtsam/geometry/Cal3Bundler.h>
#include <gtsam/geometry/PinholeCamera.h>
#include <gtsam/geometry/Pose2.h>
#include <gtsam/geometry/Pose3.h>
#include <gtsam/nonlinear/NonlinearFactorGraph.h>
#include <gtsam/nonlinear/Values.h>
#include <gtsam/linear/NoiseModel.h>
#include <gtsam/base/Testable.h>
#include <gtsam/base/types.h>
#include <string>
#include <utility>
#include <vector>
#include <iosfwd>
#include <map>
#include <optional>
Include dependency graph for dataset.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 gtsam
 

Typedefs

typedef std::pair< size_t, Pose2 > gtsam::IndexedPose
 Return type for auxiliary functions.
 
typedef std::pair< size_t, Point2 > gtsam::IndexedLandmark
 
typedef std::pair< std::pair< size_t, size_t >, Pose2 > gtsam::IndexedEdge
 
using gtsam::GraphAndValues = std::pair< NonlinearFactorGraph::shared_ptr, Values::shared_ptr >
 
using gtsam::BetweenFactorPose2s = std::vector< BetweenFactor< Pose2 >::shared_ptr >
 
using gtsam::BetweenFactorPose3s = std::vector< BetweenFactor< Pose3 >::shared_ptr >
 
using gtsam::BinaryMeasurementsUnit3 = std::vector< BinaryMeasurement< Unit3 > >
 
using gtsam::BinaryMeasurementsPoint3 = std::vector< BinaryMeasurement< Point3 > >
 
using gtsam::BinaryMeasurementsRot3 = std::vector< BinaryMeasurement< Rot3 > >
 

Enumerations

enum  gtsam::NoiseFormat {
  gtsam::NoiseFormatG2O, gtsam::NoiseFormatTORO, gtsam::NoiseFormatGRAPH, gtsam::NoiseFormatCOV,
  gtsam::NoiseFormatAUTO
}
 Indicates how noise parameters are stored in file. More...
 
enum  gtsam::KernelFunctionType { KernelFunctionTypeNONE, KernelFunctionTypeHUBER, KernelFunctionTypeTUKEY }
 Robust kernel type to wrap around quadratic noise model.
 

Functions

GTSAM_EXPORT std::string gtsam::findExampleDataFile (const std::string &name)
 
GTSAM_EXPORT std::string gtsam::createRewrittenFileName (const std::string &name)
 
template<typename T >
GTSAM_EXPORT std::map< size_t, T > gtsam::parseVariables (const std::string &filename, size_t maxIndex=0)
 
template<typename T >
GTSAM_EXPORT std::vector< BinaryMeasurement< T > > gtsam::parseMeasurements (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model=nullptr, size_t maxIndex=0)
 
template<typename T >
GTSAM_EXPORT std::vector< typename BetweenFactor< T >::shared_ptr > gtsam::parseFactors (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model=nullptr, size_t maxIndex=0)
 
GTSAM_EXPORT std::optional< IndexedPose > gtsam::parseVertexPose (std::istream &is, const std::string &tag)
 
GTSAM_EXPORT std::optional< IndexedLandmark > gtsam::parseVertexLandmark (std::istream &is, const std::string &tag)
 
GTSAM_EXPORT std::optional< IndexedEdge > gtsam::parseEdge (std::istream &is, const std::string &tag)
 
GTSAM_EXPORT GraphAndValues gtsam::load2D (std::pair< std::string, SharedNoiseModel > dataset, size_t maxIndex=0, bool addNoise=false, bool smart=true, NoiseFormat noiseFormat=NoiseFormatAUTO, KernelFunctionType kernelFunctionType=KernelFunctionTypeNONE)
 
GTSAM_EXPORT GraphAndValues gtsam::load2D (const std::string &filename, SharedNoiseModel model=SharedNoiseModel(), size_t maxIndex=0, bool addNoise=false, bool smart=true, NoiseFormat noiseFormat=NoiseFormatAUTO, KernelFunctionType kernelFunctionType=KernelFunctionTypeNONE)
 
GTSAM_EXPORT void gtsam::save2D (const NonlinearFactorGraph &graph, const Values &config, const noiseModel::Diagonal::shared_ptr model, const std::string &filename)
 
GTSAM_EXPORT GraphAndValues gtsam::readG2o (const std::string &g2oFile, const bool is3D=false, KernelFunctionType kernelFunctionType=KernelFunctionTypeNONE)
 This function parses a g2o file and stores the measurements into a NonlinearFactorGraph and the initial guess in a Values structure. More...
 
GTSAM_EXPORT void gtsam::writeG2o (const NonlinearFactorGraph &graph, const Values &estimate, const std::string &filename)
 This function writes a g2o file from NonlinearFactorGraph and a Values structure. More...
 
GTSAM_EXPORT GraphAndValues gtsam::load3D (const std::string &filename)
 Load TORO 3D Graph.
 
GTSAM_EXPORT BetweenFactorPose2s gtsam::parse2DFactors (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model=nullptr, size_t maxIndex=0)
 
GTSAM_EXPORT BetweenFactorPose3s gtsam::parse3DFactors (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model=nullptr, size_t maxIndex=0)
 

Detailed Description

utility functions for loading datasets

Date
Jan 22, 2010
Author
Ni Kai
Luca Carlone
Varun Agrawal