Go to the documentation of this file.
20 #include <boost/filesystem.hpp>
28 using namespace gtsam;
29 namespace fs = boost::filesystem;
31 static string topdir = TOPSRCDIR;
33 static string topdir =
"TOPSRCDIR_NOT_CONFIGURED";
49 graph.
addPrior(234,
Pose2(1.0, 2.0, 0.3), noiseModel::Diagonal::Sigmas(Vector::Ones(3)));
56 TEST( testSerialization, text_graph_serialization ) {
64 TEST( testSerialization, xml_graph_serialization ) {
72 TEST( testSerialization, text_values_serialization ) {
80 TEST( testSerialization, xml_values_serialization ) {
88 TEST( testSerialization, serialization_file ) {
90 fs::remove_all(
"actual");
91 fs::create_directory(
"actual");
92 string path =
"actual/";
static int runAllTests(TestResult &result)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
#define EXPECT(condition)
Global functions for performing serialization, designed for use with matlab.
TEST(testSerialization, text_graph_serialization)
static Rot2 fromAngle(double theta)
Named constructor from angle in radians.
std::string serializeGraph(const NonlinearFactorGraph &graph)
NonlinearFactorGraph::shared_ptr deserializeGraphXML(const std::string &serialized_graph, const std::string &name="graph")
NonlinearFactorGraph::shared_ptr deserializeGraphFromFile(const std::string &fname)
void addPrior(Key key, const T &prior, const SharedNoiseModel &model=nullptr)
std::string serializeValuesXML(const Values &values, const std::string &name="values")
NonlinearFactorGraph exampleGraph()
Values::shared_ptr deserializeValues(const std::string &serialized_values)
Values::shared_ptr deserializeValuesFromFile(const std::string &fname)
NonlinearFactorGraph::shared_ptr deserializeGraph(const std::string &serialized_graph)
static Rot3 Rx(double t)
Rotation around X axis as in http://en.wikipedia.org/wiki/Rotation_matrix, counterclockwise when look...
NonlinearFactorGraph::shared_ptr deserializeGraphFromXMLFile(const std::string &fname, const std::string &name="graph")
void insert(Key j, const Value &val)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
bool serializeGraphToXMLFile(const NonlinearFactorGraph &graph, const std::string &fname, const std::string &name="graph")
std::string serializeGraphXML(const NonlinearFactorGraph &graph, const std::string &name="graph")
bool serializeGraphToFile(const NonlinearFactorGraph &graph, const std::string &fname)
IsDerived< DERIVEDFACTOR > add(std::shared_ptr< DERIVEDFACTOR > factor)
add is a synonym for push_back.
NonlinearFactorGraph graph
Values::shared_ptr deserializeValuesXML(const std::string &serialized_values, const std::string &name="values")
Values::shared_ptr deserializeValuesFromXMLFile(const std::string &fname, const std::string &name="values")
std::string serializeValues(const Values &values)
a single factor contains both the bearing and the range to prevent handle to pair bearing and range f...
bool serializeValuesToFile(const Values &values, const std::string &fname)
bool serializeValuesToXMLFile(const Values &values, const std::string &fname, const std::string &name="values")
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:08:24