YARP
Yet Another Robot Platform
yarp::dev::IFrameTransform Class Referenceabstract

Transform Interface. More...

#include <yarp/dev/IFrameTransform.h>

+ Inheritance diagram for yarp::dev::IFrameTransform:

Public Types

enum  {
  TRANSFORM_OK = 0 ,
  TRANSFORM_GENERAL_ERROR = 1 ,
  TRANSFORM_TIMEOUT = 2
}
 

Public Member Functions

virtual ~IFrameTransform ()
 Destructor. More...
 
virtual bool allFramesAsString (std::string &all_frames)=0
 Creates a debug string containing the list of all registered frames. More...
 
virtual bool canTransform (const std::string &target_frame, const std::string &source_frame)=0
 Test if a transform exists. More...
 
virtual bool clear ()=0
 Removes all the registered transforms. More...
 
virtual bool frameExists (const std::string &frame_id)=0
 Check if a frame exists. More...
 
virtual bool getAllFrameIds (std::vector< std::string > &ids)=0
 Gets a vector containing all the registered frames. More...
 
virtual bool getParent (const std::string &frame_id, std::string &parent_frame_id)=0
 Get the parent of a frame. More...
 
virtual bool getTransform (const std::string &target_frame_id, const std::string &source_frame_id, yarp::sig::Matrix &transform)=0
 Get the transform between two frames. More...
 
virtual bool setTransform (const std::string &target_frame_id, const std::string &source_frame_id, const yarp::sig::Matrix &transform)=0
 Register a transform between two frames. More...
 
virtual bool setTransformStatic (const std::string &target_frame_id, const std::string &source_frame_id, const yarp::sig::Matrix &transform)=0
 Register a static transform between two frames. More...
 
virtual bool deleteTransform (const std::string &target_frame_id, const std::string &source_frame_id)=0
 Deletes a transform between two frames. More...
 
virtual bool transformPoint (const std::string &target_frame_id, const std::string &source_frame_id, const yarp::sig::Vector &input_point, yarp::sig::Vector &transformed_point)=0
 Transform a point into the target frame. More...
 
virtual bool transformPose (const std::string &target_frame_id, const std::string &source_frame_id, const yarp::sig::Vector &input_pose, yarp::sig::Vector &transformed_pose)=0
 Transform a Stamped Pose into the target frame. More...
 
virtual bool transformQuaternion (const std::string &target_frame_id, const std::string &source_frame_id, const yarp::math::Quaternion &input_quaternion, yarp::math::Quaternion &transformed_quaternion)=0
 Transform a quaternion into the target frame. More...
 
virtual bool waitForTransform (const std::string &target_frame_id, const std::string &source_frame_id, const double &timeout)=0
 Block until a transform from source_frame_id to target_frame_id is possible or it times out. More...
 

Detailed Description

Transform Interface.

Definition at line 27 of file IFrameTransform.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
TRANSFORM_OK 
TRANSFORM_GENERAL_ERROR 
TRANSFORM_TIMEOUT 

Definition at line 30 of file IFrameTransform.h.

Constructor & Destructor Documentation

◆ ~IFrameTransform()

yarp::dev::IFrameTransform::~IFrameTransform ( )
virtualdefault

Destructor.

Member Function Documentation

◆ allFramesAsString()

virtual bool yarp::dev::IFrameTransform::allFramesAsString ( std::string &  all_frames)
pure virtual

Creates a debug string containing the list of all registered frames.

Parameters
all_framesthe returned string containing the frames
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ canTransform()

virtual bool yarp::dev::IFrameTransform::canTransform ( const std::string &  target_frame,
const std::string &  source_frame 
)
pure virtual

Test if a transform exists.

Parameters
target_frame_idthe name of target reference frame
source_frame_idthe name of source reference frame
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ clear()

virtual bool yarp::dev::IFrameTransform::clear ( )
pure virtual

Removes all the registered transforms.

Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ deleteTransform()

virtual bool yarp::dev::IFrameTransform::deleteTransform ( const std::string &  target_frame_id,
const std::string &  source_frame_id 
)
pure virtual

Deletes a transform between two frames.

Parameters
target_frame_idthe name of target reference frame
source_frame_idthe name of source reference frame
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ frameExists()

virtual bool yarp::dev::IFrameTransform::frameExists ( const std::string &  frame_id)
pure virtual

Check if a frame exists.

Parameters
frame_idthe frame to be searched
target_frame_idthe name of target reference frame
source_frame_idthe name of source reference frame
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ getAllFrameIds()

virtual bool yarp::dev::IFrameTransform::getAllFrameIds ( std::vector< std::string > &  ids)
pure virtual

Gets a vector containing all the registered frames.

Parameters
idsthe returned vector containing all frame ids
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ getParent()

virtual bool yarp::dev::IFrameTransform::getParent ( const std::string &  frame_id,
std::string &  parent_frame_id 
)
pure virtual

Get the parent of a frame.

Parameters
frame_idthe name of target reference frame
parent_frame_idthe name of parent reference frame
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ getTransform()

virtual bool yarp::dev::IFrameTransform::getTransform ( const std::string &  target_frame_id,
const std::string &  source_frame_id,
yarp::sig::Matrix transform 
)
pure virtual

Get the transform between two frames.

Parameters
target_frame_idthe name of target reference frame
source_frame_idthe name of source reference frame
transformthe transformation matrix from source_frame_id to target_frame_id
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ setTransform()

virtual bool yarp::dev::IFrameTransform::setTransform ( const std::string &  target_frame_id,
const std::string &  source_frame_id,
const yarp::sig::Matrix transform 
)
pure virtual

Register a transform between two frames.

Parameters
target_frame_idthe name of target reference frame
source_frame_idthe name of source reference frame
transformthe transformation matrix from source_frame_id to target_frame_id
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ setTransformStatic()

virtual bool yarp::dev::IFrameTransform::setTransformStatic ( const std::string &  target_frame_id,
const std::string &  source_frame_id,
const yarp::sig::Matrix transform 
)
pure virtual

Register a static transform between two frames.

Parameters
target_frame_idthe name of target reference frame
source_frame_idthe name of source reference frame
transformthe transformation matrix from source_frame_id to target_frame_id
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ transformPoint()

virtual bool yarp::dev::IFrameTransform::transformPoint ( const std::string &  target_frame_id,
const std::string &  source_frame_id,
const yarp::sig::Vector input_point,
yarp::sig::Vector transformed_point 
)
pure virtual

Transform a point into the target frame.

Parameters
target_frame_idthe name of target reference frame
source_frame_idthe name of frame in which input_point is expressed
input_pointthe input point (x y z)
transformed_pointthe returned point (x y z)
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ transformPose()

virtual bool yarp::dev::IFrameTransform::transformPose ( const std::string &  target_frame_id,
const std::string &  source_frame_id,
const yarp::sig::Vector input_pose,
yarp::sig::Vector transformed_pose 
)
pure virtual

Transform a Stamped Pose into the target frame.

Parameters
target_frame_idthe name of target reference frame
source_frame_idthe name of frame in which input_pose is expressed
input_posethe input quaternion (x y z r p y)
transformed_posethe returned (x y z r p y)
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ transformQuaternion()

virtual bool yarp::dev::IFrameTransform::transformQuaternion ( const std::string &  target_frame_id,
const std::string &  source_frame_id,
const yarp::math::Quaternion input_quaternion,
yarp::math::Quaternion transformed_quaternion 
)
pure virtual

Transform a quaternion into the target frame.

Parameters
target_frame_idthe name of target reference frame
source_frame_idthe name of frame in which input_quaternion is expressed
input_quaternionthe input quaternion (x y z w)
transformed_quaternionthe returned quaternion (x y z w)
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.

◆ waitForTransform()

virtual bool yarp::dev::IFrameTransform::waitForTransform ( const std::string &  target_frame_id,
const std::string &  source_frame_id,
const double &  timeout 
)
pure virtual

Block until a transform from source_frame_id to target_frame_id is possible or it times out.

Parameters
target_frame_idthe name of target reference frame
source_frame_idthe name of source reference frame
timeout(in seconds) to wait for
error_msgstring filled with error message (if error occurred)
Returns
true/false

Implemented in FrameTransformClient, and TransformClient.


The documentation for this class was generated from the following files: