30 using namespace gtsam;
47 Rot3::RzRyRx(0.179693265735950, 0.002945368776519, 0.102274823253840),
48 Point3(-3.37493895, 6.14660244, -8.93650986));
55 Matrix expectedH1 = numericalDerivative11<Vector5, Pose3>(
56 [&factor, &
pose2](
const Pose3&
p1) {
return factor.evaluateError(
p1, pose2);},
59 Matrix expectedH2 = numericalDerivative11<Vector5, Pose3>(
60 [&factor, &
pose1](
const Pose3&
p2) {
return factor.evaluateError(pose1,
p2);},
66 factor.evaluateError(pose1, pose2, actualH1, actualH2);
Provides additional testing facilities for common data structures.
static int runAllTests(TestResult &result)
noiseModel::Diagonal::shared_ptr model
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
Some functions to compute numerical derivatives.
Point3 trueTranslation(0.1, 0, 0)
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
TEST(EssentialMatrixConstraint, test)
Represents a 3D point on a unit sphere.
static Point2 measurement(323.0, 240.0)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static const Pose3 pose1(Rot3(), Point3(0, 1, 0.5))
Unit3 trueDirection(trueTranslation)
static Key poseKey1(X(1))
Vector evaluateError(const Pose3 &p1, const Pose3 &p2, OptionalMatrixType Hp1, OptionalMatrixType Hp2) const override
static Key poseKey2(X(2))
std::uint64_t Key
Integer nonlinear key type.
noiseModel::Base::shared_ptr SharedNoiseModel