10 using namespace gtsam;
19 const double a = 5,
b = 10;
39 Vector4
v1(0, 0, -1, 0);
44 Vector4
v2(0, 0, 0, -1);
50 Vector4
v3(-
M_PI / 4, 0, 0, 0);
56 Vector4 v4(0, -
M_PI / 4, 0, 0);
75 Vector4
v1(0, 0, 0, 1);
80 Vector4
v2(0, 0, 1, 0);
85 Vector4
v3(
M_PI / 4, 0, 0, 0);
92 Vector4 v4(0,
M_PI / 4, 0, 0);
98 Vector4 v5(
M_PI / 3, -
M_PI / 4, -0.4, 1.2);
119 Vector4
r2(2.3, 0.987, -3, 4);
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
noiseModel::Diagonal::shared_ptr model
bool equals(const Unit3 &s, double tol=1e-9) const
The equals function with tolerance.
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
Rot2 R(Rot2::fromAngle(0.1))
Some functions to compute numerical derivatives.
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
#define EXPECT_DOUBLES_EQUAL(expected, actual, threshold)
static Rot3 Expmap(const Vector3 &v, OptionalJacobian< 3, 3 > H={})
Rot3 inverse() const
inverse of a rotation
Represents a 3D point on a unit sphere.
static const Line3 l(Rot3(), 1, 1)
Vector4 localCoordinates(const Line3 &q, OptionalJacobian< 4, 4 > Dp={}, OptionalJacobian< 4, 4 > Dq={}) const
bool equals(const Line3 &l2, double tol=10e-9) const
Test harness methods for expressions.
#define EXPECT(condition)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
4 dimensional manifold of 3D lines
static Unit3 FromPoint3(const Point3 &point, OptionalJacobian< 2, 3 > H={})
Named constructor from Point3 with optional Jacobian.
#define GTSAM_CONCEPT_MANIFOLD_INST(T)
Expression< Point2 > projection(f, p_cam)
#define EXPECT_CORRECT_FACTOR_JACOBIANS(factor, values, numerical_derivative_step, tolerance)
Check the Jacobians produced by a factor against finite differences.
void insert(Key j, const Value &val)
Line3 transformTo(const Pose3 &wTc, const Line3 &wL, OptionalJacobian< 4, 6 > Dpose, OptionalJacobian< 4, 4 > Dline)
Line3 retract(const Vector4 &v, OptionalJacobian< 4, 4 > Dp={}, OptionalJacobian< 4, 4 > Dv={}) const
TEST(SmartFactorBase, Pinhole)
Unit3 project(OptionalJacobian< 2, 4 > Dline={}) const
#define GTSAM_CONCEPT_TESTABLE_INST(T)
noiseModel::Base::shared_ptr SharedNoiseModel
static shared_ptr Sigma(size_t dim, double sigma, bool smart=true)