gtsam 4.1.1
gtsam
dataset.cpp File Reference

utility functions for loading datasets More...

Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 

Macros

#define LINESIZE   81920
 

Typedefs

template<typename T >
using gtsam::Parser = std::function< boost::optional< T >(istream &is, const string &tag)>
 
using gtsam::BearingRange2D = BearingRange< Pose2, Point2 >
 

Functions

string gtsam::findExampleDataFile (const std::string &name)
 Find the full path to an example dataset distributed with gtsam. More...
 
string gtsam::createRewrittenFileName (const std::string &name)
 Creates a temporary file name that needs to be ignored in .gitingnore for checking read-write oprations.
 
template<typename T >
map< size_t, T > gtsam::parseToMap (const string &filename, Parser< pair< size_t, T > > parse, size_t maxIndex)
 
boost::optional< IndexedPose > gtsam::parseVertexPose (std::istream &is, const std::string &tag)
 Parse TORO/G2O vertex "id x y yaw". More...
 
template<>
std::map< size_t, Pose2 > gtsam::parseVariables< Pose2 > (const std::string &filename, size_t maxIndex)
 
boost::optional< IndexedLandmark > gtsam::parseVertexLandmark (std::istream &is, const std::string &tag)
 Parse G2O landmark vertex "id x y". More...
 
template<>
std::map< size_t, Point2 > gtsam::parseVariables< Point2 > (const std::string &filename, size_t maxIndex)
 
boost::optional< IndexedEdge > gtsam::parseEdge (std::istream &is, const std::string &tag)
 Parse TORO/G2O edge "id1 id2 x y yaw". More...
 
boost::shared_ptr< Sampler > gtsam::createSampler (const SharedNoiseModel &model)
 
template<>
std::vector< BinaryMeasurement< Pose2 > > gtsam::parseMeasurements (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model, size_t maxIndex)
 
template<>
std::vector< BinaryMeasurement< Rot2 > > gtsam::parseMeasurements (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model, size_t maxIndex)
 
template<>
std::vector< BetweenFactor< Pose2 >::shared_ptr > gtsam::parseFactors< Pose2 > (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model, size_t maxIndex)
 
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)
 Load TORO/G2O style graph files. More...
 
GraphAndValues gtsam::load2D (pair< string, SharedNoiseModel > dataset, size_t maxIndex, bool addNoise, bool smart, NoiseFormat noiseFormat, KernelFunctionType kernelFunctionType)
 Load TORO 2D Graph. More...
 
GraphAndValues gtsam::load2D_robust (const string &filename, const noiseModel::Base::shared_ptr &model, size_t maxIndex)
 
void gtsam::save2D (const NonlinearFactorGraph &graph, const Values &config, const noiseModel::Diagonal::shared_ptr model, const std::string &filename)
 save 2d graph
 
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...
 
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...
 
istream & gtsam::operator>> (istream &is, Quaternion &q)
 
istream & gtsam::operator>> (istream &is, Rot3 &R)
 
boost::optional< pair< size_t, Pose3 > > gtsam::parseVertexPose3 (istream &is, const string &tag)
 
template<>
std::map< size_t, Pose3 > gtsam::parseVariables< Pose3 > (const std::string &filename, size_t maxIndex)
 
boost::optional< pair< size_t, Point3 > > gtsam::parseVertexPoint3 (istream &is, const string &tag)
 
template<>
std::map< size_t, Point3 > gtsam::parseVariables< Point3 > (const std::string &filename, size_t maxIndex)
 
istream & gtsam::operator>> (istream &is, Matrix6 &m)
 
template<>
std::vector< BinaryMeasurement< Pose3 > > gtsam::parseMeasurements (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model, size_t maxIndex)
 
template<>
std::vector< BinaryMeasurement< Rot3 > > gtsam::parseMeasurements (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model, size_t maxIndex)
 
template<>
std::vector< BetweenFactor< Pose3 >::shared_ptr > gtsam::parseFactors< Pose3 > (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model, size_t maxIndex)
 
GraphAndValues gtsam::load3D (const std::string &filename)
 Load TORO 3D Graph.
 
Rot3 gtsam::openGLFixedRotation ()
 
Pose3 gtsam::openGL2gtsam (const Rot3 &R, double tx, double ty, double tz)
 This function converts an openGL camera pose to an GTSAM camera pose. More...
 
Pose3 gtsam::gtsam2openGL (const Rot3 &R, double tx, double ty, double tz)
 This function converts a GTSAM camera pose to an openGL camera pose. More...
 
Pose3 gtsam::gtsam2openGL (const Pose3 &PoseGTSAM)
 This function converts a GTSAM camera pose to an openGL camera pose. More...
 
bool gtsam::readBundler (const std::string &filename, SfmData &data)
 This function parses a bundler output file and stores the data into a SfmData structure. More...
 
bool gtsam::readBAL (const std::string &filename, SfmData &data)
 This function parses a "Bundle Adjustment in the Large" (BAL) file and stores the data into a SfmData structure. More...
 
SfmData gtsam::readBal (const std::string &filename)
 This function parses a "Bundle Adjustment in the Large" (BAL) file and returns the data as a SfmData structure. More...
 
bool gtsam::writeBAL (const std::string &filename, SfmData &data)
 This function writes a "Bundle Adjustment in the Large" (BAL) file from a SfmData structure. More...
 
bool gtsam::writeBALfromValues (const std::string &filename, const SfmData &data, Values &values)
 This function writes a "Bundle Adjustment in the Large" (BAL) file from a SfmData structure and a value structure (measurements are the same as the SfM input data, while camera poses and values are read from Values) More...
 
Values gtsam::initialCamerasEstimate (const SfmData &db)
 This function creates initial values for cameras from db. More...
 
Values gtsam::initialCamerasAndPointsEstimate (const SfmData &db)
 This function creates initial values for cameras and points from db. More...
 
BetweenFactorPose2s gtsam::parse2DFactors (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model, size_t maxIndex)
 
BetweenFactorPose3s gtsam::parse3DFactors (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model, size_t maxIndex)
 

Detailed Description

utility functions for loading datasets

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