Class Transform
Defined in File transform.hpp
Class Documentation
-
class Transform
A class representing a 2D frame transformation or 2D pose.
This class mimics the tf2::Transform class to the extent possible.
Public Functions
-
inline Transform()
No initialization constructor.
-
inline Transform(const Rotation &rotation, const Vector2 &translation)
Constructor from a rotation and translation.
- Parameters:
rotation – Rotation
translation – Translation
-
inline Transform(const tf2Scalar x, const tf2Scalar y, const tf2Scalar yaw)
Constructor from individual x, y, yaw elements.
- Parameters:
x – The X value
y – The Y value
yaw – The yaw value in radians
-
inline explicit Transform(const tf2::Transform &transform)
Constructor from a tf2 Transform object.
- Parameters:
transform – - The tf2 Transform object from which we will initialize this object
-
inline Transform &operator*=(const Transform &rhs)
Compose this transform with another transform on the right.
-
inline Transform lerp(const Transform &other, const tf2Scalar ratio) const
Return the linear interpolation between this and another transform.
- Parameters:
other – The other transform
ratio – The ratio of this to other (ratio=0 => return this, ratio=1 => return other)
-
inline void setIdentity()
Set this transformation to the identity.
-
inline Transform inverseTimes(const Transform &other) const
Return the inverse of this transform times the other transform.
returns this.inverse() * other
- Parameters:
other – The other transform
-
inline Eigen::Matrix3d getHomogeneousMatrix() const
Get a 3x3 homogeneous transformation matrix.
-
inline Transform()