21 using namespace gtsam;
55 CHECK(assert_container_equality<Indices>({ 0 },
factor1.indices()));
58 const Indices t_indices = { 0, 1 };
62 CHECK(assert_container_equality<Indices>(t_indices,
factor2.indices()));
68 CHECK(assert_container_equality<Indices>({ 2 },
factor3.indices()));
82 Matrix expectedH1 = numericalDerivative11<Vector, Pose2>(
87 factor.evaluateError(pose, actualH1);
104 Matrix expectedH1 = numericalDerivative11<Vector, Pose2>(
109 factor.evaluateError(pose, actualH1);
126 Matrix expectedH1 = numericalDerivative11<Vector, Pose2>(
131 factor.evaluateError(pose, actualH1);
155 CHECK(assert_container_equality<Indices>(t_indices,
factor2.indices()));
163 CHECK(assert_container_equality<Indices>(r_indices,
factor3.indices()));
177 Matrix expectedH1 = numericalDerivative11<Vector, Pose3>(
182 factor.evaluateError(pose, actualH1);
199 Matrix expectedH1 = numericalDerivative11<Vector, Pose3>(
204 factor.evaluateError(pose, actualH1);
223 Matrix expectedH1 = numericalDerivative11<Vector, Pose3>(
228 factor.evaluateError(pose, actualH1);
242 (
Vector(2) << measurement.
x(), measurement.
z()).finished(),
model);
247 Matrix expectedH1 = numericalDerivative11<Vector, Pose3>(
252 factor.evaluateError(pose, actualH1);
270 Matrix expectedH1 = numericalDerivative11<Vector, Pose3>(
Provides additional testing facilities for common data structures.
PartialPriorFactor< Pose2 > TestPartialPriorFactor2
static int runAllTests(TestResult &result)
noiseModel::Diagonal::shared_ptr model
TEST(PartialPriorFactor, Constructors2)
static const int kIndexRz
static const int kIndexTz
Some functions to compute numerical derivatives.
const Point3 & translation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get translation
PartialPriorFactor< Pose3 > TestPartialPriorFactor3
const Point2 & translation() const
translation
Vector evaluateError(const T &p, boost::optional< Matrix & > H=boost::none) const override
JacobianFactor factor3(keyY, A32, keyZ, A33, b3, noiseModel::Isotropic::Sigma(2, sigma3))
static const int kIndexTy
A simple prior factor that allows for setting a prior only on a part of linear parameters.
double theta() const
get theta
static const Pose3 pose(Rot3(Vector3(1,-1,-1).asDiagonal()), Point3(0, 0, 0.5))
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static const int kIndexRy
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
static const int kIndexRx
JacobianFactor factor2(keyX, A21, keyY, A22, b2, noiseModel::Isotropic::Sigma(2, sigma2))
std::vector< size_t > Indices
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
std::uint64_t Key
Integer nonlinear key type.
noiseModel::Base::shared_ptr SharedNoiseModel
const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get rotation
static shared_ptr Sigma(size_t dim, double sigma, bool smart=true)
All noise models live in the noiseModel namespace.
JacobianFactor factor1(keyX, A11, b1, noiseModel::Isotropic::Sigma(2, sigma1))
static const int kIndexTx