27 using namespace gtsam;
91 Matrix H1Expected, H2Expected;
92 H1Expected = numericalDerivative11<Vector, Point3>(
93 std::bind(&
factorError, std::placeholders::_1, T2, factor),
T1);
94 H2Expected = numericalDerivative11<Vector, Point3>(
static int runAllTests(TestResult &result)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
TEST(TranslationFactor, Constructor)
Some functions to compute numerical derivatives.
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
static const Key kKey2(1)
Represents a 3D point on a unit sphere.
#define EXPECT(condition)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Binary factor for a relative translation direction measurement.
static const Similarity3 T1(R, Point3(3.5, -8.2, 4.2), 1)
static const Key kKey1(2)
Jet< T, N > sqrt(const Jet< T, N > &f)
Vector evaluateError(const Point3 &Ta, const Point3 &Tb, OptionalMatrixType H1, OptionalMatrixType H2) const override
Caclulate error: (norm(Tb - Ta) - measurement) where Tb and Ta are Point3 translations and measuremen...
Vector factorError(const Point3 &T1, const Point3 &T2, const TranslationFactor &factor)
static const Unit3 kMeasured(1, 0, 0)
std::uint64_t Key
Integer nonlinear key type.
noiseModel::Base::shared_ptr SharedNoiseModel
static SharedNoiseModel model(noiseModel::Isotropic::Sigma(3, 0.05))