/* * dataset.h * * Created on: Jan 22, 2010 * Author: nikai * Description: utility functions for loading datasets */ #pragma once #include #include #include "pose2SLAM.h" #include "graph.h" namespace gtsam { /** * Construct dataset filename from short name * Currently has "Killian" "intel.gfs", "10K", etc... * @param filename * @param optional dataset, if empty will try to getenv $DATASET * @param optional path, if empty will try to getenv $HOME */ std::pair > dataset(const std::string& dataset = "", const std::string& path = ""); /** * Load TORO 2D Graph * @param filename * @param maxID, if non-zero cut out vertices >= maxID * @param smart: try to reduce complexity of covariance to cheapest model */ std::pair, boost::shared_ptr > load2D( std::pair > dataset, int maxID = 0, bool addNoise=false, bool smart=true); std::pair, boost::shared_ptr > load2D( const std::string& filename, boost::optional model = boost::optional(), int maxID = 0, bool addNoise=false, bool smart=true); /** save 2d graph */ void save2D(const gtsam::Pose2Graph& graph, const gtsam::Pose2Config& config, const gtsam::SharedDiagonal model, const std::string& filename); /** * Load TORO 3D Graph */ bool load3D(const std::string& filename); } // namespace gtsam