24#include <CppUnitLite/TestResult.h>
25#include <CppUnitLite/Test.h>
26#include <CppUnitLite/Failure.h>
31void testDefaultChart(TestResult& result_,
32 const std::string& name_,
35 GTSAM_CONCEPT_TESTABLE_TYPE(T)
37 typedef typename gtsam::DefaultChart<T> Chart;
38 typedef typename Chart::vector Vector;
42 BOOST_CONCEPT_ASSERT((ChartConcept<Chart>));
47 Vector dx = Chart::local(value, other);
48 EXPECT_LONGS_EQUAL(Chart::getDimension(value), dx.size());
50 EXPECT(
assert_equal(Matrix(dx), Matrix(Eigen::VectorXd::Zero(dx.size()))));
54 T updated = Chart::retract(value, dx);
55 Vector invdx = Chart::local(value, updated);
60 updated = Chart::retract(value, dx);
61 invdx = Chart::local(value, updated);
68#define CHECK_CHART_CONCEPT(value) \
69 { gtsam::testDefaultChart(result_, name_, value); }
typedef and functions to augment Eigen's MatrixXd
Concept check for values that can be used in unit tests.
Base class and basic functions for Manifold types.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition: Matrix.cpp:42