20 #include <gtsam/config.h> 42 typedef Point3 Translation;
59 R_(pose.R_), t_(pose.t_) {
72 R_(T(0, 0), T(0, 1), T(0, 2), T(1, 0), T(1, 1), T(1, 2), T(2, 0), T(2, 1),
73 T(2, 2)), t_(T(0, 3), T(1, 3), T(2, 3)) {
86 static std::optional<Pose3> Align(
const Point3Pairs& abPointPairs);
89 static std::optional<Pose3> Align(
const Matrix& a,
const Matrix& b);
96 void print(
const std::string& s =
"")
const;
99 bool equals(
const Pose3& pose,
double tol = 1e-9)
const;
111 Pose3 inverse()
const;
115 return Pose3(R_ * T.R_, t_ + R_ * T.t_);
132 Pose3 interpolateRt(
const Pose3& T,
double t)
const;
148 Matrix6 AdjointMap()
const;
156 Vector6 Adjoint(
const Vector6& xi_b,
161 Vector6 AdjointTranspose(
const Vector6& x,
180 static Matrix6 adjointMap(
const Vector6& xi);
185 static Vector6 adjoint(
const Vector6& xi,
const Vector6& y,
190 static Matrix6 adjointMap_(
const Vector6 &xi) {
return adjointMap(xi);}
191 static Vector6 adjoint_(
const Vector6 &xi,
const Vector6 &y) {
return adjoint(xi, y);}
196 static Vector6 adjointTranspose(
const Vector6& xi,
const Vector6& y,
201 static Matrix6 ExpmapDerivative(
const Vector6& xi);
204 static Matrix6 LogmapDerivative(
const Pose3& xi);
221 static Matrix3 ComputeQforExpmapDerivative(
222 const Vector6& xi,
double nearZeroThreshold = 1e-5);
233 static Matrix
wedge(
double wx,
double wy,
double wz,
double vx,
double vy,
235 return (Matrix(4, 4) << 0., -wz, wy, vx, wz, 0., -wx, vy, -wy, wx, 0., vz, 0., 0., 0., 0.).finished();
257 Matrix transformFrom(
const Matrix& points)
const;
261 return transformFrom(point);
307 Matrix4 matrix()
const;
389 friend std::ostream &operator<<(std::ostream &os,
const Pose3& p);
392 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 394 friend class boost::serialization::access;
395 template<
class Archive>
396 void serialize(Archive & ar,
const unsigned int ) {
397 ar & BOOST_SERIALIZATION_NVP(R_);
398 ar & BOOST_SERIALIZATION_NVP(t_);
403 #ifdef GTSAM_USE_QUATERNIONS 420 return Pose3::wedge(xi(0), xi(1), xi(2), xi(3), xi(4), xi(5));
424 using Pose3Pair = std::pair<Pose3, Pose3>;
425 using Pose3Pairs = std::vector<std::pair<Pose3, Pose3> >;
428 typedef std::vector<Pose3> Pose3Vector;
443 template <
typename T>
std::string serialize(const T &input)
serializes to a string
Definition: serialization.h:113
Definition: BearingRange.h:197
double z() const
get z
Definition: Pose3.h:302
static Pose3 Identity()
identity for group operation
Definition: Pose3.h:106
static Matrix wedge(double wx, double wy, double wz, double vx, double vy, double vz)
Definition: Pose3.h:233
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
Definition: Rot3.h:58
Definition: BearingRange.h:183
GTSAM_EXPORT Line3 transformTo(const Pose3 &wTc, const Line3 &wL, OptionalJacobian< 4, 6 > Dpose={}, OptionalJacobian< 4, 4 > Dline={})
Pose3()
Definition: Pose3.h:55
Represents a 3D point on a unit sphere.
Definition: Unit3.h:42
Pose3 operator*(const Pose3 &T) const
compose syntactic sugar
Definition: Pose3.h:114
Definition: Testable.h:112
Pose3(const Pose3 &pose)
Definition: Pose3.h:58
GTSAM_EXPORT void print(const Matrix &A, const std::string &s, std::ostream &stream)
static std::pair< size_t, size_t > rotationInterval()
Definition: Pose3.h:375
Pose3(const Matrix &T)
Definition: Pose3.h:71
Pose3(const Rot3 &R, const Point3 &t)
Definition: Pose3.h:63
Matrix wedge< Pose3 >(const Vector &xi)
Definition: Pose3.h:419
Definition: BearingRange.h:35
Base class and basic functions for Lie types.
Definition: BearingRange.h:41
static std::pair< size_t, size_t > translationInterval()
Definition: Pose3.h:366
Definition: chartTesting.h:28
Rot3 Rotation
Definition: Pose3.h:41
double x() const
get x
Definition: Pose3.h:292
Point3 operator*(const Point3 &point) const
Definition: Pose3.h:260
Definition: OptionalJacobian.h:38
Both LieGroupTraits and Testable.
Definition: Lie.h:229
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
Definition: types.h:284
Vector3 Point3
Definition: Point3.h:38
double y() const
get y
Definition: Pose3.h:297
3D rotation represented as a rotation matrix or quaternion