16 using namespace gtsam;
47 TEST( testPoseTranslationFactor, level3_zero_error ) {
49 Pose3TranslationPrior factor(poseKey,
point3A, model3);
57 TEST( testPoseTranslationFactor, level3_error ) {
59 Pose3TranslationPrior factor(poseKey,
point3B, model3);
67 TEST( testPoseTranslationFactor, pitched3_zero_error ) {
69 Pose3TranslationPrior factor(poseKey,
point3A, model3);
77 TEST( testPoseTranslationFactor, pitched3_error ) {
79 Pose3TranslationPrior factor(poseKey,
point3B, model3);
87 TEST( testPoseTranslationFactor, smallrot3_zero_error ) {
89 Pose3TranslationPrior factor(poseKey,
point3A, model3);
97 TEST( testPoseTranslationFactor, smallrot3_error ) {
99 Pose3TranslationPrior factor(poseKey,
point3B, model3);
107 TEST( testPoseTranslationFactor, level2_zero_error ) {
117 TEST( testPoseTranslationFactor, level2_error ) {
static Rot3 RzRyRx(double x, double y, double z, OptionalJacobian< 3, 1 > Hx={}, OptionalJacobian< 3, 1 > Hy={}, OptionalJacobian< 3, 1 > Hz={})
Rotations around Z, Y, then X axes as in http://en.wikipedia.org/wiki/Rotation_matrix, counterclockwise when looking from unchanging axis.
static const Eigen::MatrixBase< Vector3 >::ConstantReturnType Z_3x1
static int runAllTests(TestResult &result)
static Rot3 Pitch(double t)
Positive pitch is up (increasing aircraft altitude).See ypr.
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
PoseTranslationPrior< Pose2 > Pose2TranslationPrior
Some functions to compute numerical derivatives.
Vector evalFactorError2(const Pose2TranslationPrior &factor, const Pose2 &x)
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
Implements a prior on the translation component of a pose.
Vector evalFactorError3(const Pose3TranslationPrior &factor, const Pose3 &x)
#define EXPECT(condition)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const Point2 point2A(1.0, 2.0)
static const Pose3 pose1(Rot3(), Point3(0, 1, 0.5))
static shared_ptr Sigmas(const Vector &sigmas, bool smart=true)
static Rot2 fromAngle(double theta)
Named constructor from angle in radians.
Vector evaluateError(const Pose &pose, OptionalMatrixType H) const override
const Point3 point3A(1.0, 2.0, 3.0)
PoseTranslationPrior< Pose3 > Pose3TranslationPrior
TEST(SmartFactorBase, Pinhole)
const SharedNoiseModel model2
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
const Point2 point2B(4.0, 6.0)
const Point3 point3B(4.0, 6.0, 8.0)
static const Eigen::MatrixBase< Vector2 >::ConstantReturnType Z_2x1
std::uint64_t Key
Integer nonlinear key type.
const SharedNoiseModel model3
noiseModel::Base::shared_ptr SharedNoiseModel