This class represents an fixed size matrix containing the Joint-Space Inertia Matrix of a KDL::Chain. More...
#include <jntspaceinertiamatrix.hpp>
Public Member Functions | |
unsigned int | columns () const |
Returns the number of columns of the matrix. | |
JntSpaceInertiaMatrix (const JntSpaceInertiaMatrix &arg) | |
Copy constructor. | |
JntSpaceInertiaMatrix (int size) | |
Constructor of the Joint-Space Inertia Matrix. | |
JntSpaceInertiaMatrix () | |
Construct with _no_ data array. | |
double & | operator() (unsigned int i, unsigned int j) |
set_item operator | |
double | operator() (unsigned int i, unsigned int j) const |
get_item operator for the joint matrix | |
JntSpaceInertiaMatrix & | operator= (const JntSpaceInertiaMatrix &arg) |
void | resize (unsigned int newSize) |
Resize the array. | |
unsigned int | rows () const |
Returns the number of rows and columns of the matrix. | |
~JntSpaceInertiaMatrix () | |
Public Attributes | |
Eigen::MatrixXd | data |
Friends | |
void | Add (const JntSpaceInertiaMatrix &src1, const JntSpaceInertiaMatrix &src2, JntSpaceInertiaMatrix &dest) |
Function to add two joint matrix, all the arguments must have the same size: A + B = C. | |
void | Divide (const JntSpaceInertiaMatrix &src, const double &factor, JntSpaceInertiaMatrix &dest) |
Function to divide all the array values with a scalar factor: A/b=C. | |
bool | Equal (const JntSpaceInertiaMatrix &src1, const JntSpaceInertiaMatrix &src2, double eps=epsilon) |
Function to check if two matrices are the same with a precision of eps. | |
void | Multiply (const JntSpaceInertiaMatrix &src, const JntArray &vec, JntArray &dest) |
Function to multiply a KDL::Jacobian with a KDL::JntSpaceInertiaMatrix to get a KDL::Twist, it should not be used to calculate the forward velocity kinematics, the solver classes are built for this purpose. | |
void | Multiply (const JntSpaceInertiaMatrix &src, const double &factor, JntSpaceInertiaMatrix &dest) |
Function to multiply all the array values with a scalar factor: A*b=C. | |
bool | operator== (const JntSpaceInertiaMatrix &src1, const JntSpaceInertiaMatrix &src2) |
void | SetToZero (JntSpaceInertiaMatrix &mat) |
Function to set all the values of the array to 0. | |
void | Subtract (const JntSpaceInertiaMatrix &src1, const JntSpaceInertiaMatrix &src2, JntSpaceInertiaMatrix &dest) |
Function to subtract two joint matrix, all the arguments must have the same size: A - B = C. |
This class represents an fixed size matrix containing the Joint-Space Inertia Matrix of a KDL::Chain.
class MyTask : public RTT::TaskContext { JntSpaceInertiaMatrix j; MyTask() {} // invokes j's default constructor bool configureHook() { unsigned int size = some_property.rvalue(); j.resize(size) ... } void updateHook() { use j here } };
Definition at line 70 of file jntspaceinertiamatrix.hpp.
USING_PART_OF_NAMESPACE_EIGEN KDL::JntSpaceInertiaMatrix::JntSpaceInertiaMatrix | ( | ) |
Construct with _no_ data array.
Definition at line 28 of file jntspaceinertiamatrix.cpp.
KDL::JntSpaceInertiaMatrix::JntSpaceInertiaMatrix | ( | int | size | ) |
Constructor of the Joint-Space Inertia Matrix.
size | of the matrix, this cannot be changed afterwards. Size rows and size columns. |
Definition at line 32 of file jntspaceinertiamatrix.cpp.
References data.
KDL::JntSpaceInertiaMatrix::JntSpaceInertiaMatrix | ( | const JntSpaceInertiaMatrix & | arg | ) |
Copy constructor.
Definition at line 39 of file jntspaceinertiamatrix.cpp.
KDL::JntSpaceInertiaMatrix::~JntSpaceInertiaMatrix | ( | ) |
Definition at line 51 of file jntspaceinertiamatrix.cpp.
unsigned int KDL::JntSpaceInertiaMatrix::columns | ( | ) | const |
Returns the number of columns of the matrix.
Definition at line 75 of file jntspaceinertiamatrix.cpp.
References data.
Referenced by KDL::Equal(), and KDL::ChainDynParam::JntToMass().
double & KDL::JntSpaceInertiaMatrix::operator() | ( | unsigned int | i, | |
unsigned int | j | |||
) |
set_item operator
Definition at line 65 of file jntspaceinertiamatrix.cpp.
References data.
double KDL::JntSpaceInertiaMatrix::operator() | ( | unsigned int | i, | |
unsigned int | j | |||
) | const |
get_item operator for the joint matrix
Definition at line 60 of file jntspaceinertiamatrix.cpp.
References data.
JntSpaceInertiaMatrix & KDL::JntSpaceInertiaMatrix::operator= | ( | const JntSpaceInertiaMatrix & | arg | ) |
Definition at line 44 of file jntspaceinertiamatrix.cpp.
References data.
void KDL::JntSpaceInertiaMatrix::resize | ( | unsigned int | newSize | ) |
Resize the array.
Definition at line 55 of file jntspaceinertiamatrix.cpp.
References data.
unsigned int KDL::JntSpaceInertiaMatrix::rows | ( | ) | const |
Returns the number of rows and columns of the matrix.
Definition at line 70 of file jntspaceinertiamatrix.cpp.
References data.
Referenced by KDL::Equal(), and KDL::ChainDynParam::JntToMass().
void Add | ( | const JntSpaceInertiaMatrix & | src1, | |
const JntSpaceInertiaMatrix & | src2, | |||
JntSpaceInertiaMatrix & | dest | |||
) | [friend] |
Function to add two joint matrix, all the arguments must have the same size: A + B = C.
This function is aliasing-safe, A or B can be the same array as C.
src1 | A | |
src2 | B | |
dest | C |
void Divide | ( | const JntSpaceInertiaMatrix & | src, | |
const double & | factor, | |||
JntSpaceInertiaMatrix & | dest | |||
) | [friend] |
Function to divide all the array values with a scalar factor: A/b=C.
This function is aliasing-safe, A can be the same array as C.
src | A | |
factor | b | |
dest | C |
bool Equal | ( | const JntSpaceInertiaMatrix & | src1, | |
const JntSpaceInertiaMatrix & | src2, | |||
double | eps = epsilon | |||
) | [friend] |
Function to check if two matrices are the same with a precision of eps.
src1 | ||
src2 | ||
eps | default: epsilon |
void Multiply | ( | const JntSpaceInertiaMatrix & | src, | |
const JntArray & | vec, | |||
JntArray & | dest | |||
) | [friend] |
Function to multiply a KDL::Jacobian with a KDL::JntSpaceInertiaMatrix to get a KDL::Twist, it should not be used to calculate the forward velocity kinematics, the solver classes are built for this purpose.
J*q = t
void Multiply | ( | const JntSpaceInertiaMatrix & | src, | |
const double & | factor, | |||
JntSpaceInertiaMatrix & | dest | |||
) | [friend] |
Function to multiply all the array values with a scalar factor: A*b=C.
This function is aliasing-safe, A can be the same array as C.
src | A | |
factor | b | |
dest | C |
bool operator== | ( | const JntSpaceInertiaMatrix & | src1, | |
const JntSpaceInertiaMatrix & | src2 | |||
) | [friend] |
void SetToZero | ( | JntSpaceInertiaMatrix & | mat | ) | [friend] |
Function to set all the values of the array to 0.
mat |
void Subtract | ( | const JntSpaceInertiaMatrix & | src1, | |
const JntSpaceInertiaMatrix & | src2, | |||
JntSpaceInertiaMatrix & | dest | |||
) | [friend] |
Function to subtract two joint matrix, all the arguments must have the same size: A - B = C.
This function is aliasing-safe, A or B can be the same array as C.
src1 | A | |
src2 | B | |
dest | C |
Eigen::MatrixXd KDL::JntSpaceInertiaMatrix::data |
Definition at line 73 of file jntspaceinertiamatrix.hpp.
Referenced by KDL::Add(), columns(), KDL::Divide(), KDL::Equal(), JntSpaceInertiaMatrix(), KDL::Multiply(), operator()(), operator=(), resize(), rows(), KDL::SetToZero(), and KDL::Subtract().