27 #include <gtsam/dllexport.h> 72 r_(
Rot2::fromAngle(theta)), t_(x, y) {
77 r_(
Rot2::fromAngle(theta)), t_(t) {
85 r_(
Rot2::
atan2(T(1, 0), T(0, 0))), t_(T(0, 2), T(1, 2)) {
86 assert(T.rows() == 3 && T.cols() == 3);
115 GTSAM_EXPORT
void print(
const std::string&
s =
"")
const;
132 return Pose2(r_*p2.
r(), t_ + r_*p2.
t());
186 static inline Matrix3
wedge(
double vx,
double vy,
double w) {
246 inline double x()
const {
return t_.x(); }
249 inline double y()
const {
return t_.y(); }
263 *Hself = Matrix::Zero(2, 3);
271 if (Hself) *Hself << 0, 0, 1;
276 GTSAM_EXPORT Matrix3
matrix()
const;
338 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION // 340 friend class boost::serialization::access;
341 template<
class Archive>
342 void serialize(Archive & ar,
const unsigned int ) {
343 ar & BOOST_SERIALIZATION_NVP(t_);
344 ar & BOOST_SERIALIZATION_NVP(r_);
371 template <
typename T>
374 template <
typename T>
Point2 operator*(const Point2 &point) const
StridedVectorType vy(make_vector(y, *n, std::abs(*incy)))
GTSAM_EXPORT Point2 transformFrom(const Point2 &point, OptionalJacobian< 2, 3 > Dpose={}, OptionalJacobian< 2, 2 > Dpoint={}) const
std::string serialize(const T &input)
serializes to a string
static Pose2 Identity()
identity for group operation
GTSAM_EXPORT Rot2 bearing(const Point2 &point, OptionalJacobian< 1, 3 > H1={}, OptionalJacobian< 1, 2 > H2={}) const
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 y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange [*:*] noreverse nowriteback set trange [*:*] noreverse nowriteback set urange [*:*] noreverse nowriteback set vrange [*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
Pose2(double x, double y, double theta)
static Matrix3 wedge(double vx, double vy, double w)
const Point2 & t() const
translation
GTSAM_EXPORT double range(const Point2 &point, OptionalJacobian< 1, 3 > H1={}, OptionalJacobian< 1, 2 > H2={}) const
static std::pair< size_t, size_t > translationInterval()
std::pair< Pose2, Pose2 > Pose2Pair
std::vector< Point2Pair > Point2Pairs
static GTSAM_EXPORT Vector3 Logmap(const Pose2 &p, ChartJacobian H={})
Log map at identity - return the canonical coordinates of this rotation.
std::vector< Pose2Pair > Pose2Pairs
GTSAM_EXPORT Matrix3 matrix() const
static Matrix3 adjointMap_(const Vector3 &xi)
const Rot2 & r() const
rotation
double theta() const
get theta
StridedVectorType vx(make_vector(x, *n, std::abs(*incx)))
Array< int, Dynamic, 1 > v
Matrix wedge< Pose2 >(const Vector &xi)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Pose2(const Rot2 &r, const Point2 &t)
Pose2 operator*(const Pose2 &p2) const
compose syntactic sugar
Base class and basic functions for Lie types.
AnnoyingScalar atan2(const AnnoyingScalar &y, const AnnoyingScalar &x)
static GTSAM_EXPORT Matrix3 LogmapDerivative(const Pose2 &v)
Derivative of Logmap.
static std::pair< size_t, size_t > rotationInterval()
GTSAM_EXPORT bool equals(const Pose2 &pose, double tol=1e-9) const
Vector3 Adjoint(const Vector3 &xi) const
Apply AdjointMap to twist xi.
static Vector3 adjointTranspose(const Vector3 &xi, const Vector3 &y)
static GTSAM_EXPORT Matrix3 adjointMap(const Vector3 &v)
static Vector3 adjoint_(const Vector3 &xi, const Vector3 &y)
static const Pose3 pose(Rot3(Vector3(1, -1, -1).asDiagonal()), Point3(0, 0, 0.5))
ofstream os("timeSchurFactors.csv")
Both LieGroupTraits and Testable.
static std::optional< Pose2 > Align(const Point2Pairs &abPointPairs)
GTSAM_EXPORT void print(const std::string &s="") const
Pose2(double theta, const Point2 &t)
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
GTSAM_EXPORT friend std::ostream & operator<<(std::ostream &os, const Pose2 &p)
Output stream operator.
GTSAM_EXPORT Pose2 inverse() const
inverse
static GTSAM_EXPORT Pose2 Expmap(const Vector3 &xi, ChartJacobian H={})
Exponential map at identity - create a rotation from canonical coordinates .
GTSAM_EXPORT Point2 transformTo(const Point2 &point, OptionalJacobian< 2, 3 > Dpose={}, OptionalJacobian< 2, 2 > Dpoint={}) const
GTSAM_EXPORT Matrix3 AdjointMap() const
static GTSAM_EXPORT Pose2 Retract(const Vector3 &v, ChartJacobian H={})
const Rot2 & rotation(OptionalJacobian< 1, 3 > Hself={}) const
rotation
static Vector3 adjoint(const Vector3 &xi, const Vector3 &y)
static GTSAM_EXPORT Vector3 Local(const Pose2 &r, ChartJacobian H={})
static GTSAM_EXPORT Matrix3 ExpmapDerivative(const Vector3 &v)
Derivative of Expmap.
const Point2 & translation(OptionalJacobian< 2, 3 > Hself={}) const
translation