Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Classes | Public Types | Public Member Functions | Protected Types | Protected Attributes
mrpt::poses::FrameTransformer< DIM > Class Template Referenceabstract

Detailed Description

template<int DIM>
class mrpt::poses::FrameTransformer< DIM >

See docs in FrameTransformerInterface.

This class is an implementation for standalone (non ROS) applications.

See also
FrameTransformerInterface

Definition at line 91 of file FrameTransformer.h.

#include <mrpt/poses/FrameTransformer.h>

Inheritance diagram for mrpt::poses::FrameTransformer< DIM >:
Inheritance graph

Classes

struct  TF_TreeEdge
 

Public Types

using base_t = FrameTransformerInterface< DIM >
 
using pose_t = typename SE_traits< DIM >::pose_t
 This will be mapped to CPose2D (DIM=2) or CPose3D (DIM=3) More...
 
using lightweight_pose_t = typename SE_traits< DIM >::lightweight_pose_t
 This will be mapped to mrpt::math::TPose2D (DIM=2) or mrpt::math::TPose3D (DIM=3) More...
 

Public Member Functions

 FrameTransformer ()
 
 ~FrameTransformer ()
 
virtual void sendTransform (const std::string &parent_frame, const std::string &child_frame, const typename base_t::pose_t &child_wrt_parent, const mrpt::system::TTimeStamp &timestamp=mrpt::system::now()) override
 
virtual FrameLookUpStatus lookupTransform (const std::string &target_frame, const std::string &source_frame, typename base_t::lightweight_pose_t &child_wrt_parent, const mrpt::system::TTimeStamp query_time=INVALID_TIMESTAMP, const double timeout_secs=.0) override
 Queries the current pose of target_frame wrt ("as seen from") source_frame. More...
 
FrameLookUpStatus lookupTransform (const std::string &target_frame, const std::string &source_frame, typename base_t::pose_t &child_wrt_parent, const mrpt::system::TTimeStamp query_time=INVALID_TIMESTAMP, const double timeout_secs=.0)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
virtual void sendTransform (const std::string &parent_frame, const std::string &child_frame, const pose_t &child_wrt_parent, const mrpt::system::TTimeStamp &timestamp=mrpt::system::now())=0
 Publish a time-stampped transform between two frames. More...
 

Protected Types

using pose_tree_t = mrpt::aligned_std_map< std::string, mrpt::aligned_std_map< std::string, TF_TreeEdge > >
 

Protected Attributes

pose_tree_t m_pose_edges_buffer
 

Member Typedef Documentation

◆ base_t

template<int DIM>
using mrpt::poses::FrameTransformer< DIM >::base_t = FrameTransformerInterface<DIM>

Definition at line 94 of file FrameTransformer.h.

◆ lightweight_pose_t

template<int DIM>
using mrpt::poses::FrameTransformerInterface< DIM >::lightweight_pose_t = typename SE_traits<DIM>::lightweight_pose_t
inherited

This will be mapped to mrpt::math::TPose2D (DIM=2) or mrpt::math::TPose3D (DIM=3)

Definition at line 59 of file FrameTransformer.h.

◆ pose_t

template<int DIM>
using mrpt::poses::FrameTransformerInterface< DIM >::pose_t = typename SE_traits<DIM>::pose_t
inherited

This will be mapped to CPose2D (DIM=2) or CPose3D (DIM=3)

Definition at line 56 of file FrameTransformer.h.

◆ pose_tree_t

Definition at line 150 of file FrameTransformer.h.

Constructor & Destructor Documentation

◆ FrameTransformer()

template<int DIM>
FrameTransformer::FrameTransformer

Definition at line 41 of file FrameTransformer.cpp.

◆ ~FrameTransformer()

template<int DIM>
FrameTransformer::~FrameTransformer

Definition at line 45 of file FrameTransformer.cpp.

Member Function Documentation

◆ lookupTransform() [1/2]

template<int DIM>
FrameLookUpStatus FrameTransformer::lookupTransform ( const std::string target_frame,
const std::string source_frame,
typename base_t::lightweight_pose_t child_wrt_parent,
const mrpt::system::TTimeStamp  query_time = INVALID_TIMESTAMP,
const double  timeout_secs = .0 
)
overridevirtual

Queries the current pose of target_frame wrt ("as seen from") source_frame.

It tries to return the pose at the given timepoint, unless it is INVALID_TIMESTAMP (default), which means returning the latest know transformation.

Parameters
timeout_secsTimeout

Implements mrpt::poses::FrameTransformerInterface< DIM >.

Definition at line 64 of file FrameTransformer.cpp.

Referenced by mrpt::poses::FrameTransformer< 2 >::lookupTransform(), and run_tf_test1().

◆ lookupTransform() [2/2]

template<int DIM>
FrameLookUpStatus mrpt::poses::FrameTransformer< DIM >::lookupTransform ( const std::string target_frame,
const std::string source_frame,
typename base_t::pose_t child_wrt_parent,
const mrpt::system::TTimeStamp  query_time = INVALID_TIMESTAMP,
const double  timeout_secs = .0 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
timeout_secsTimeout

Definition at line 113 of file FrameTransformer.h.

◆ sendTransform() [1/2]

template<int DIM>
virtual void mrpt::poses::FrameTransformerInterface< DIM >::sendTransform ( const std::string parent_frame,
const std::string child_frame,
const pose_t child_wrt_parent,
const mrpt::system::TTimeStamp timestamp = mrpt::system::now() 
)
pure virtualinherited

Publish a time-stampped transform between two frames.

◆ sendTransform() [2/2]

template<int DIM>
void FrameTransformer::sendTransform ( const std::string parent_frame,
const std::string child_frame,
const typename base_t::pose_t child_wrt_parent,
const mrpt::system::TTimeStamp timestamp = mrpt::system::now() 
)
overridevirtual

Definition at line 50 of file FrameTransformer.cpp.

Referenced by run_tf_test1().

Member Data Documentation

◆ m_pose_edges_buffer

template<int DIM>
pose_tree_t mrpt::poses::FrameTransformer< DIM >::m_pose_edges_buffer
protected

Definition at line 151 of file FrameTransformer.h.




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST