Yet Another Robot Platform
No Matches
yarp::math::FrameTransform Class Reference

#include <yarp/math/FrameTransform.h>

+ Inheritance diagram for yarp::math::FrameTransform:


struct  Translation_t

Public Types

enum  display_transform_mode_t {
  rotation_as_quaternion =0 ,
  rotation_as_matrix =1 ,
  rotation_as_rpy =2

Public Member Functions

bool isValid () const
 FrameTransform ()
 FrameTransform (const std::string &parent, const std::string &child, double inTX, double inTY, double inTZ, double inRX, double inRY, double inRZ, double inRW)
 ~FrameTransform ()
void transFromVec (double X, double Y, double Z)
void rotFromRPY (double R, double P, double Y)
yarp::sig::Vector getRPYRot () const
yarp::sig::Matrix toMatrix () const
bool fromMatrix (const yarp::sig::Matrix &mat)
std::string toString (display_transform_mode_t format=rotation_as_quaternion) const
bool read (yarp::os::ConnectionReader &connection) override
 Read this object from a network connection.
bool write (yarp::os::ConnectionWriter &connection) const override
 Write data to a connection.
yarp::os::Type getType () const override
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
virtual Type getReadType () const
- Public Member Functions inherited from yarp::os::PortWriter
virtual ~PortWriter ()
virtual void onCompletion () const
 This is called when the port has finished all writing operations.
virtual void onCommencement () const
 This is called when the port is about to begin writing operations.
virtual yarp::os::Type getWriteType () const

Public Attributes

std::string src_frame_id
std::string dst_frame_id
double timestamp = 0
bool isStatic = false
struct yarp::math::FrameTransform::Translation_t translation
Quaternion rotation

Additional Inherited Members

- Static Public Member Functions inherited from yarp::os::Portable
static bool copyPortable (const PortWriter &writer, PortReader &reader)
 Copy one portable to another, via writing and reading.

Detailed Description

Definition at line 16 of file FrameTransform.h.

Member Enumeration Documentation

◆ display_transform_mode_t


Definition at line 63 of file FrameTransform.h.

Constructor & Destructor Documentation

◆ FrameTransform() [1/2]

FrameTransform::FrameTransform ( )

Definition at line 20 of file FrameTransform.cpp.

◆ FrameTransform() [2/2]

FrameTransform::FrameTransform ( const std::string &  parent,
const std::string &  child,
double  inTX,
double  inTY,
double  inTZ,
double  inRX,
double  inRY,
double  inRZ,
double  inRW 

Definition at line 25 of file FrameTransform.cpp.

◆ ~FrameTransform()

FrameTransform::~FrameTransform ( )

Member Function Documentation

◆ fromMatrix()

bool FrameTransform::fromMatrix ( const yarp::sig::Matrix mat)

Definition at line 88 of file FrameTransform.cpp.

◆ getRPYRot()

yarp::sig::Vector FrameTransform::getRPYRot ( ) const

Definition at line 68 of file FrameTransform.cpp.

◆ getType()

yarp::os::Type yarp::math::FrameTransform::getType ( ) const

Reimplemented from yarp::os::Portable.

Definition at line 85 of file FrameTransform.h.

◆ isValid()

bool FrameTransform::isValid ( ) const

Definition at line 41 of file FrameTransform.cpp.

◆ read()

bool FrameTransform::read ( yarp::os::ConnectionReader reader)

Read this object from a network connection.

Override this for your particular class.

readeran interface to the network connection for reading
true iff the object is successfully read

Implements yarp::os::Portable.

Definition at line 174 of file FrameTransform.cpp.

◆ rotFromRPY()

void FrameTransform::rotFromRPY ( double  R,
double  P,
double  Y 

Definition at line 56 of file FrameTransform.cpp.

◆ toMatrix()

yarp::sig::Matrix FrameTransform::toMatrix ( ) const

Definition at line 77 of file FrameTransform.cpp.

◆ toString()

std::string FrameTransform::toString ( display_transform_mode_t  format = rotation_as_quaternion) const

Definition at line 108 of file FrameTransform.cpp.

◆ transFromVec()

void FrameTransform::transFromVec ( double  X,
double  Y,
double  Z 

Definition at line 51 of file FrameTransform.cpp.

◆ write()

bool FrameTransform::write ( yarp::os::ConnectionWriter connection) const

Write data to a connection.

return true iff data was written correctly

Implements yarp::os::Portable.

Definition at line 210 of file FrameTransform.cpp.

Member Data Documentation

◆ dst_frame_id

std::string yarp::math::FrameTransform::dst_frame_id

Definition at line 20 of file FrameTransform.h.

◆ isStatic

bool yarp::math::FrameTransform::isStatic = false

Definition at line 22 of file FrameTransform.h.

◆ rotation

Quaternion yarp::math::FrameTransform::rotation

Definition at line 38 of file FrameTransform.h.

◆ src_frame_id

std::string yarp::math::FrameTransform::src_frame_id

Definition at line 19 of file FrameTransform.h.

◆ timestamp

double yarp::math::FrameTransform::timestamp = 0

Definition at line 21 of file FrameTransform.h.

◆ translation

struct yarp::math::FrameTransform::Translation_t yarp::math::FrameTransform::translation

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