13 using namespace gtsam;
19 static const
Point3 pt(1.0, 2.0, 3.0);
24 TEST( testPoseRTV, constructors ) {
49 Vector vec_init = (
Vector(9) << 0.1, 0.2, 0.3, 1.0, 2.0, 3.0, 0.4, 0.5, 0.6).finished();
87 delta << 0.1, 0.1, 0.1, 0.2, 0.3, 0.4,-0.1,-0.2,-0.3;
108 TEST( testPoseRTV, dynamics_identities ) {
112 const double dt = 0.1;
114 Vector imu01 = Z_6x1, imu12 = Z_6x1, imu23 = Z_6x1, imu34 = Z_6x1;
139 state1.compose(state2, actH1, actH2);
152 state1.between(state2, actH1, actH2);
173 Point3 tA(1.0, 2.0, 3.0), tB(3.0, 2.0, 3.0);
180 rtvA.range(rtvB, actH1, actH2);
191 TEST( testPoseRTV, transformed_from_1 ) {
198 Matrix actDTrans, actDGlobal;
210 TEST( testPoseRTV, transformed_from_2 ) {
217 Matrix actDTrans, actDGlobal;
ProductLieGroup inverse() const
Provides additional testing facilities for common data structures.
double range(const PoseRTV &other, OptionalJacobian< 1, 9 > H1=boost::none, OptionalJacobian< 1, 9 > H2=boost::none) const
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
static const Velocity3 vel(0.4, 0.5, 0.6)
Vector9 localCoordinates(const NavState &g, OptionalJacobian< 9, 9 > H1=boost::none, OptionalJacobian< 9, 9 > H2=boost::none) const
localCoordinates with optional derivatives
const Pose3 & pose() const
Vector3 Velocity3
Velocity is currently typedef'd to Vector3.
PoseRTV transformed_from_proxy(const PoseRTV &a, const Pose3 &trans)
Rot2 R(Rot2::fromAngle(0.1))
PoseRTV compose_proxy(const PoseRTV &A, const PoseRTV &B)
Some functions to compute numerical derivatives.
Pose3 x2(Rot3::Ypr(0.0, 0.0, 0.0), l2)
static const Vector3 kZero3
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const boost::function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double delta=1e-5)
const Point3 & translation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get translation
TangentVector logmap(const ProductLieGroup &g) const
static const Point3 pt(1.0, 2.0, 3.0)
static const NavState state1(x1, v1)
#define GTSAM_CONCEPT_LIE_INST(T)
#define EXPECT_DOUBLES_EQUAL(expected, actual, threshold)
static Rot3 Ypr(double y, double p, double r, OptionalJacobian< 3, 1 > Hy=boost::none, OptionalJacobian< 3, 1 > Hp=boost::none, OptionalJacobian< 3, 1 > Hr=boost::none)
Matrix trans(const Matrix &A)
static Matrix RRTMnb(const Vector3 &euler)
ProductLieGroup retract(const TangentVector &v, ChartJacobian H1=boost::none, ChartJacobian H2=boost::none) const
static Rot3 Rodrigues(const Vector3 &w)
Class compose(const Class &g) const
NavState retract(const Vector9 &v, OptionalJacobian< 9, 9 > H1=boost::none, OptionalJacobian< 9, 9 > H2=boost::none) const
retract with optional derivatives
static Rot3 Yaw(double t)
Positive yaw is to right (as in aircraft heading). See ypr.
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(boost::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
ProductLieGroup expmap(const TangentVector &v) const
const Velocity3 & v() const
static const NavState state2(x2, v2)
#define EXPECT(condition)
Eigen::Triplet< double > T
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static Matrix RRTMbn(const Vector3 &euler)
EIGEN_DONT_INLINE void transform(const Transformation &t, Data &data)
Pose3 x3(Rot3::Ypr(M_PI/4.0, 0.0, 0.0), l2)
PoseRTV between_proxy(const PoseRTV &A, const PoseRTV &B)
Pose3 with translational velocity.
const mpreal dim(const mpreal &a, const mpreal &b, mp_rnd_t r=mpreal::get_default_rnd())
double range_proxy(const PoseRTV &A, const PoseRTV &B)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
Class retract(const TangentVector &v) const
retract as required by manifold concept: applies v at *this
ProductLieGroup compose(const ProductLieGroup &g) const
#define EXPECT_LONGS_EQUAL(expected, actual)
TangentVector localCoordinates(const ProductLieGroup &g, ChartJacobian H1=boost::none, ChartJacobian H2=boost::none) const
Expression< T > compose(const Expression< T > &t1, const Expression< T > &t2)
TEST(LPInitSolver, InfiniteLoopSingleVar)
bool assert_inequal(const Matrix &A, const Matrix &B, double tol)
PoseRTV transformed_from(const Pose3 &trans, ChartJacobian Dglobal=boost::none, OptionalJacobian< 9, 6 > Dtrans=boost::none) const
ProductLieGroup between(const ProductLieGroup &g) const
internal::FixedSizeMatrix< Y, X >::type numericalDerivative11(boost::function< Y(const X &)> h, const X &x, double delta=1e-5)
New-style numerical derivatives using manifold_traits.
PoseRTV inverse_proxy(const PoseRTV &A)
Expression< T > between(const Expression< T > &t1, const Expression< T > &t2)
EIGEN_DEVICE_FUNC const InverseReturnType inverse() const
PoseRTV generalDynamics(const Vector &accel, const Vector &gyro, double dt) const
General Dynamics update - supply control inputs in body frame.
#define GTSAM_CONCEPT_TESTABLE_INST(T)
const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get rotation