27 const std::string& child,
37 translation{inTX, inTY, inTZ},
38 rotation(inRX, inRY, inRZ, inRW)
46 translation.set(X, Y, Z);
51 double rot[3] = { R, P, Y };
57 rotation.fromRotationMatrix(rotM);
64 rotM = rotation.toRotationMatrix4x4();
73 t_mat = rotation.toRotationMatrix4x4();
74 t_mat[0][3] = translation.tX;
75 t_mat[1][3] = translation.tY;
76 t_mat[2][3] = translation.tZ;
82 if (mat.
cols() != 4 || mat.
rows() != 4)
84 yCError(FRAMETRANSFORM,
"FrameTransform::fromMatrix() failed, matrix should be = 4x4");
91 translation.tX = mat[0][3];
92 translation.tY = mat[1][3];
93 translation.tZ = mat[2][3];
94 rotation.fromRotationMatrix(mat);
103 sprintf(buff,
"%s -> %s \n tran: %f %f %f \n rot: %f %f %f %f \n\n",
104 src_frame_id.c_str(),
105 dst_frame_id.c_str(),
113 return std::string(buff);
size_t cols() const
Return number of columns.
size_t rows() const
Return number of rows.
#define yCError(component,...)
#define yCAssert(component, x)
#define YARP_LOG_COMPONENT(name,...)
yarp::sig::Matrix rpy2dcm(const yarp::sig::Vector &rpy)
Converts roll-pitch-yaw angles in the corresponding dcm (direction cosine matrix) rotation matrix (de...
yarp::sig::Vector dcm2rpy(const yarp::sig::Matrix &R)
Converts a dcm (direction cosine matrix) rotation matrix to roll-pitch-yaw angles (defined in Math....
VectorOf< double > Vector