Class TransformImpl

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class TransformImpl : public virtual swri_transform_util::StampInterface

Base class for Transform implementations.

swri_transform_util::Transform uses a “pointer to implementation” design pattern. Extend this class to create new implementations of Transform. TransformImpl and its descendants should not be used bare, only as part of a swri_transform_util::Transform.

Subclassed by swri_transform_util::IdentityTransform, swri_transform_util::TfToUtmTransform, swri_transform_util::TfToWgs84Transform, swri_transform_util::TfTransform, swri_transform_util::UtmToTfTransform, swri_transform_util::UtmToWgs84Transform, swri_transform_util::Wgs84ToTfTransform, swri_transform_util::Wgs84ToUtmTransform

Public Functions

inline explicit TransformImpl(const rclcpp::Logger &logger = rclcpp::get_logger("swri_transform_util::TransformImpl"))
virtual ~TransformImpl() = default
virtual void Transform(const tf2::Vector3 &v_in, tf2::Vector3 &v_out) const = 0

Apply this transform to a 3D vector

Parameters:
  • v_in[in] Input vector

  • v_out[out] Transformed vector

inline virtual tf2::Quaternion GetOrientation() const

Get the orientation of this transform

Get the orientation of this transform by getting the vector between the origin point and a point offset 1 on the x axis.

Returns:

The orientation component of the transform

virtual std::shared_ptr<TransformImpl> Inverse() const = 0

Protected Attributes

rclcpp::Logger logger_