This class represents an fixed size array containing joint values of a KDL::Chain. More...
#include <jntarray.hpp>
Public Member Functions | |
unsigned int | columns () const |
Returns the number of columns of the array, always 1. | |
JntArray (const JntArray &arg) | |
Copy constructor. | |
JntArray (unsigned int size) | |
Constructor of the joint array. | |
JntArray () | |
Construct with _no_ data array. | |
double & | operator() (unsigned int i, unsigned int j=0) |
set_item operator, again if a second value is given it should be zero. | |
double | operator() (unsigned int i, unsigned int j=0) const |
get_item operator for the joint array, if a second value is given it should be zero, since a JntArray resembles a column. | |
JntArray & | operator= (const JntArray &arg) |
void | resize (unsigned int newSize) |
Resize the array. | |
unsigned int | rows () const |
Returns the number of rows (size) of the array. | |
~JntArray () | |
Public Attributes | |
Eigen::VectorXd | data |
Friends | |
void | Add (const JntArray &src1, const JntArray &src2, JntArray &dest) |
void | Divide (const JntArray &src, const double &factor, JntArray &dest) |
bool | Equal (const JntArray &src1, const JntArray &src2, double eps) |
void | Multiply (const JntArray &src, const double &factor, JntArray &dest) |
void | MultiplyJacobian (const Jacobian &jac, const JntArray &src, Twist &dest) |
Function to multiply a KDL::Jacobian with a KDL::JntArray to get a KDL::Twist, it should not be used to calculate the forward velocity kinematics, the solver classes are built for this purpose. | |
bool | operator== (const JntArray &src1, const JntArray &src2) |
void | SetToZero (JntArray &array) |
void | Subtract (const JntArray &src1, const JntArray &src2, JntArray &dest) |
This class represents an fixed size array containing joint values of a KDL::Chain.
class MyTask : public RTT::TaskContext { JntArray 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 69 of file jntarray.hpp.
USING_PART_OF_NAMESPACE_EIGEN KDL::JntArray::JntArray | ( | ) |
Construct with _no_ data array.
Definition at line 28 of file jntarray.cpp.
KDL::JntArray::JntArray | ( | unsigned int | size | ) |
Constructor of the joint array.
size | size of the array, this cannot be changed afterwards. |
Definition at line 32 of file jntarray.cpp.
References data.
KDL::JntArray::JntArray | ( | const JntArray & | arg | ) |
Copy constructor.
Definition at line 39 of file jntarray.cpp.
KDL::JntArray::~JntArray | ( | ) |
Definition at line 51 of file jntarray.cpp.
unsigned int KDL::JntArray::columns | ( | ) | const |
Returns the number of columns of the array, always 1.
Definition at line 77 of file jntarray.cpp.
References data.
double & KDL::JntArray::operator() | ( | unsigned int | i, | |
unsigned int | j = 0 | |||
) |
set_item operator, again if a second value is given it should be zero.
Definition at line 66 of file jntarray.cpp.
References data.
double KDL::JntArray::operator() | ( | unsigned int | i, | |
unsigned int | j = 0 | |||
) | const |
get_item operator for the joint array, if a second value is given it should be zero, since a JntArray resembles a column.
Definition at line 60 of file jntarray.cpp.
References data.
Definition at line 44 of file jntarray.cpp.
References data.
void KDL::JntArray::resize | ( | unsigned int | newSize | ) |
Resize the array.
Definition at line 55 of file jntarray.cpp.
References data.
Referenced by KDL::JntArrayVel::resize(), and KDL::JntArrayAcc::resize().
unsigned int KDL::JntArray::rows | ( | ) | const |
Returns the number of rows (size) of the array.
Definition at line 72 of file jntarray.cpp.
References data.
Referenced by KDL::TreeIkSolverVel_wdls::CartToJnt(), KDL::TreeIkSolverPos_NR_JL::CartToJnt(), KDL::ChainIkSolverPos_NR_JL::CartToJnt(), KDL::ChainIdSolver_RNE::CartToJnt(), KDL::JntArrayAcc::JntArrayAcc(), KDL::JntArrayVel::JntArrayVel(), KDL::TreeFkSolverPos_recursive::JntToCart(), KDL::ChainFkSolverVel_recursive::JntToCart(), KDL::ChainFkSolverPos_recursive::JntToCart(), KDL::TreeJntToJacSolver::JntToJac(), KDL::ChainJntToJacSolver::JntToJac(), and KDL::ChainDynParam::JntToMass().
Function to multiply a KDL::Jacobian with a KDL::JntArray 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
jac | J | |
src | q | |
dest | t |
void SetToZero | ( | JntArray & | array | ) | [friend] |
Eigen::VectorXd KDL::JntArray::data |
Definition at line 72 of file jntarray.hpp.
Referenced by KDL::TreeIkSolverVel_wdls::CartToJnt(), KDL::ChainIkSolverVel_wdls::CartToJnt(), columns(), JntArray(), KDL::Multiply(), operator()(), operator=(), resize(), and rows().