24 using namespace gtsam;
27 #define TEST(TITLE,STATEMENT) \ 29 for(int i = 0; i < n; i++) \ 43 double c1=R1.
c(), s1=R1.
s(), c2=
R2.c(), s2=
R2.s();
49 double c = c1 * c2 + s1 * s2,
s = -s1 * c2 + c1 * s2;
54 double x = dt.x(),
y = dt.y();
55 Point2 t(c1 * x + s1 *
y, -s1 * x + c1 * y);
59 double dt1 = -s2 * x + c2 *
y;
60 double dt2 = -c2 * x - s2 *
y;
64 0.0, 0.0,-1.0).finished();
103 cout <<
"NOTE: Times are reported for " << n <<
" calls" << endl;
106 double x = 4.0,
y = 2.0, r = 0.3;
112 TEST(Logmap, Pose2::Logmap(X2));
Rot2 R(Rot2::fromAngle(0.1))
Pose2_ Expmap(const Vector3_ &xi)
const Point2 & t() const
translation
TangentVector localCoordinates(const Class &g) const
localCoordinates as required by manifold concept: finds tangent vector between *this and g ...
#define TEST(TITLE, STATEMENT)
const Rot2 & r() const
rotation
Array< int, Dynamic, 1 > v
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Vector Pose2BetweenFactorEvaluateErrorDefault(const Pose2 &measured, const Pose2 &p1, const Pose2 &p2, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
AnnoyingScalar atan2(const AnnoyingScalar &y, const AnnoyingScalar &x)
Class retract(const TangentVector &v) const
retract as required by manifold concept: applies v at *this
Class between(const Class &g) const
Vector Pose2BetweenFactorEvaluateErrorOptimizedBetweenFixed(const Pose2 &measured, const Pose2 &p1, const Pose2 &p2, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
Vector Pose2BetweenFactorEvaluateErrorOptimizedBetween(const Pose2 &measured, const Pose2 &p1, const Pose2 &p2, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
Pose2 Pose2betweenDefault(const Pose2 &r1, const Pose2 &r2)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
GTSAM_EXPORT Pose2 inverse() const
inverse
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
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Pose2 Pose2betweenOptimized(const Pose2 &r1, const Pose2 &r2, OptionalJacobian< 3, 3 > H1={}, OptionalJacobian< 3, 3 > H2={})