73 KernelFunctionTypeNONE, KernelFunctionTypeHUBER, KernelFunctionTypeTUKEY
93GTSAM_EXPORT std::vector<BinaryMeasurement<T>>
94parseMeasurements(
const std::string &filename,
95 const noiseModel::Diagonal::shared_ptr &model =
nullptr,
103GTSAM_EXPORT std::vector<typename BetweenFactor<T>::shared_ptr>
105 const noiseModel::Diagonal::shared_ptr &model =
nullptr,
106 size_t maxIndex = 0);
110typedef std::pair<size_t, Point2> IndexedLandmark;
111typedef std::pair<std::pair<size_t, size_t>,
Pose2> IndexedEdge;
118GTSAM_EXPORT std::optional<IndexedPose>
parseVertexPose(std::istream& is,
119 const std::string& tag);
127 const std::string& tag);
134GTSAM_EXPORT std::optional<IndexedEdge>
parseEdge(std::istream& is,
135 const std::string& tag);
141 std::pair<NonlinearFactorGraph::shared_ptr, Values::shared_ptr>;
151 std::pair<std::string, SharedNoiseModel> dataset,
size_t maxIndex = 0,
152 bool addNoise =
false,
170 size_t maxIndex = 0,
bool addNoise =
false,
bool smart =
true,
176 const Values& config,
const noiseModel::Diagonal::shared_ptr model,
177 const std::string& filename);
188readG2o(
const std::string& g2oFile,
const bool is3D =
false,
204 const Values& estimate,
const std::string& filename);
221using BetweenFactorPose2s = std::vector<BetweenFactor<Pose2>::shared_ptr>;
222GTSAM_EXPORT BetweenFactorPose2s
223parse2DFactors(
const std::string &filename,
224 const noiseModel::Diagonal::shared_ptr &model =
nullptr,
225 size_t maxIndex = 0);
227using BetweenFactorPose3s = std::vector<BetweenFactor<Pose3>::shared_ptr>;
228GTSAM_EXPORT BetweenFactorPose3s
229parse3DFactors(
const std::string &filename,
230 const noiseModel::Diagonal::shared_ptr &model =
nullptr,
231 size_t maxIndex = 0);
233using BetweenFactorSL4s = std::vector<BetweenFactor<SL4>::shared_ptr>;
235using BinaryMeasurementsUnit3 = std::vector<BinaryMeasurement<Unit3>>;
236using BinaryMeasurementsPoint3 = std::vector<BinaryMeasurement<Point3>>;
237using BinaryMeasurementsRot3 = std::vector<BinaryMeasurement<Rot3>>;
Typedefs for easier changing of types.
Concept check for values that can be used in unit tests.
3D Pose manifold SO(3) x R^3 and group SE(3)
Projective Special Linear Group (SL(4, R)) factor.
A non-templated config holding any types of Manifold-group elements.
Factor Graph consisting of non-linear factors.
Binary measurement represents a measurement between two keys in a graph. A binary measurement is simi...
Global functions in a separate testing namespace.
Definition chartTesting.h:28
std::optional< IndexedPose > parseVertexPose(std::istream &is, const std::string &tag)
Parse TORO/G2O vertex "id x y yaw".
Definition dataset.cpp:173
std::pair< NonlinearFactorGraph::shared_ptr, Values::shared_ptr > GraphAndValues
Return type for load functions, which return a graph and initial values.
Definition dataset.h:140
GraphAndValues load2D(const std::string &filename, SharedNoiseModel model, size_t maxIndex, bool addNoise, bool smart, NoiseFormat noiseFormat, KernelFunctionType kernelFunctionType)
Load TORO/G2O style graph files.
Definition dataset.cpp:505
GTSAM_EXPORT std::map< size_t, T > parseVariables(const std::string &filename, size_t maxIndex=0)
Parse variables in a line-based text format (like g2o) into a map.
void writeG2o(const NonlinearFactorGraph &graph, const Values &estimate, const std::string &filename)
This function writes a g2o file from NonlinearFactorGraph and a Values structure.
Definition dataset.cpp:665
std::pair< size_t, Pose2 > IndexedPose
Return type for auxiliary functions.
Definition dataset.h:109
GraphAndValues readG2o(const std::string &g2oFile, const bool is3D, KernelFunctionType kernelFunctionType)
This function parses a g2o file and stores the measurements into a NonlinearFactorGraph and the initi...
Definition dataset.cpp:650
GTSAM_EXPORT std::vector< typename BetweenFactor< T >::shared_ptr > parseFactors(const std::string &filename, const noiseModel::Diagonal::shared_ptr &model=nullptr, size_t maxIndex=0)
Parse BetweenFactors in a line-based text format (like g2o) into a vector of shared pointers.
KernelFunctionType
Robust kernel type to wrap around quadratic noise model.
Definition dataset.h:72
NoiseFormat
Indicates how noise parameters are stored in file.
Definition dataset.h:63
@ NoiseFormatGRAPH
default: toro-style order, but covariance matrix !
Definition dataset.h:66
@ NoiseFormatAUTO
Try to guess covariance matrix layout.
Definition dataset.h:68
@ NoiseFormatTORO
Information matrix, but inf_ff inf_fs inf_ss inf_rr inf_fr inf_sr.
Definition dataset.h:65
@ NoiseFormatCOV
Covariance matrix C11, C12, C13, C22, C23, C33.
Definition dataset.h:67
@ NoiseFormatG2O
Information matrix I11, I12, I13, I22, I23, I33.
Definition dataset.h:64
noiseModel::Base::shared_ptr SharedNoiseModel
Aliases.
Definition NoiseModel.h:846
GraphAndValues load3D(const std::string &filename)
Load a TORO/G2O-style 3D graph.
Definition dataset.cpp:1088
std::optional< IndexedEdge > parseEdge(std::istream &is, const std::string &tag)
Parse TORO/G2O edge "id1 id2 x y yaw".
Definition dataset.cpp:299
void save2D(const NonlinearFactorGraph &graph, const Values &config, const noiseModel::Diagonal::shared_ptr model, const std::string &filename)
save 2d graph
Definition dataset.cpp:617
std::optional< IndexedLandmark > parseVertexLandmark(std::istream &is, const std::string &tag)
Parse G2O landmark vertex "id x y".
Definition dataset.cpp:193
std::string createRewrittenFileName(const std::string &name)
Creates a temporary file name that needs to be ignored in .gitingnore for checking read-write opratio...
Definition dataset.cpp:104
std::string findExampleDataFile(const std::string &name)
Find the full path to an example dataset distributed with gtsam.
Definition dataset.cpp:69
A 2D pose (Point2,Rot2).
Definition Pose2.h:39
Definition NonlinearFactorGraph.h:57
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65