8 #error This class is not to be included by the user directly. Use Posed.h or Posef.h instead.
12 class POSE2 :
public boost::enable_shared_from_this<POSE2>
16 POSE2(
const POSE2& source) { operator=(source); }
17 POSE2(
const ROT2&
r,
const ORIGIN2&
x, boost::shared_ptr<const POSE2> relative_pose = boost::shared_ptr<const POSE2>());
18 POSE2(
const ORIGIN2& x, boost::shared_ptr<const POSE2> relative_pose = boost::shared_ptr<const POSE2>());
19 POSE2(
const ROT2& r, boost::shared_ptr<const POSE2> relative_pose = boost::shared_ptr<const POSE2>());
21 static REAL
wrap(REAL theta);
47 boost::shared_ptr<const POSE2>
rpose;
50 TRANSFORM2 calc_transform(boost::shared_ptr<const POSE2> p)
const;
51 static TRANSFORM2 calc_transform(boost::shared_ptr<const POSE2> source, boost::shared_ptr<const POSE2> target);
52 static bool is_common(boost::shared_ptr<const POSE2> source, boost::shared_ptr<const POSE2> p,
unsigned& i);
55 std::ostream& operator<<(std::ostream& out,
const POSE2& m);
A 2D rigid body pose.
Definition: Pose2.h:12
A two-dimensional floating point vector used for computational geometry calculations and with associa...
Definition: Vector2.h:15
static bool rel_equal(const POSE2 &p1, const POSE2 &p2, REAL tol=EPS)
Determines whether two poses in 2D are relatively equivalent.
Definition: Pose2.cpp:69
POSE2()
Default constructor.
Definition: Pose2.cpp:11
VECTOR2 transform_point(const VECTOR2 &v) const
Transforms a point from one pose to another.
Definition: Pose2.cpp:210
static REAL wrap(REAL theta)
Wraps an angle to [-pi, pi].
Definition: Pose2.cpp:46
static VECTOR2 interpolate_transform_vector(const POSE2 &P1, const POSE2 &P2, REAL t, const ORIGIN2 &o)
Tranforms a vector with an interpolated pose (between poses P1 and P2)
Definition: Pose2.cpp:93
POSE2 & invert()
Special method for inverting a 2D pose in place.
Definition: Pose2.cpp:278
POSE2 & set_identity()
Sets this matrix to identity.
Definition: Pose2.cpp:157
VECTOR2 inverse_transform_vector(const VECTOR2 &v) const
Transforms a vector from one pose to another.
Definition: Pose2.cpp:187
ORIGIN2 x
the position of the pose frame
Definition: Pose2.h:44
boost::shared_ptr< const POSE2 > rpose
the pose that this pose is relative to (if any)
Definition: Pose2.h:47
Represents an orientation in 2D.
Definition: Rot2.h:12
POSE2 operator*(const POSE2 &m) const
Transforms this pose by another.
Definition: Pose2.cpp:296
POSE2 & set(const ROT2 &r, const ORIGIN2 &v)
Sets the pose from a rotation and translation vector.
Definition: Pose2.cpp:141
static VECTOR2 interpolate_transform_point(const POSE2 &P1, const POSE2 &P2, REAL t, const ORIGIN2 &o)
Tranforms a point with an interpolated pose (between poses P1 and P2)
Definition: Pose2.cpp:119
VECTOR2 inverse_transform_point(const VECTOR2 &v) const
Transforms a point from one pose to another.
Definition: Pose2.cpp:232
A two-dimensional floating point vector used for computational geometry calculations and without asso...
Definition: Origin2.h:14
VECTOR2 transform_vector(const VECTOR2 &v) const
Transforms a vector from one pose to another.
Definition: Pose2.cpp:165
ROT2 r
the orientation of the pose frame
Definition: Pose2.h:41