14#include <yarp/sig/Vector.h>
15#include <yarp/sig/Matrix.h>
19using namespace yarp::sig;
29 for(
int i=0;i<m.rows();i++)
31 for(
int j=0;j<m.cols();j++)
32 cout<<setw(15)<<m(i,j);
40 for(
size_t j=0;j<v.length();j++)
66 Vector q(armTorsoDyn.
getN()); q.zero();
67 Vector dq(q); Vector ddq(q);
73 Vector w0(3); Vector dw0(3); Vector ddp0(3);
74 w0=dw0=ddp0=0.0; ddp0[2]=9.81;
78 Vector Fend(3); Fend.zero();
119 cout<<
"iCubArmDyn has "<<armTorsoDyn.
getN()<<
" links."<<endl;
A class for defining the 7-DOF iCub Arm in the iDyn framework.
yarp::sig::Matrix getForces() const
Returns the links forces as a matrix, where the i-th col is the i-th force.
yarp::sig::Vector setD2Ang(const yarp::sig::Vector &ddq)
Sets the free joint angles acceleration to values of ddq[i].
void prepareNewtonEuler(const NewEulMode NewEulMode_s=DYNAMIC)
Prepare for the Newton-Euler recursive computation of forces and torques.
yarp::sig::Matrix getMoments() const
Returns the links moments as a matrix, where the i-th col is the i-th moment.
yarp::sig::Vector getTorques() const
Returns the links torque as a vector.
yarp::sig::Vector setAng(const yarp::sig::Vector &q)
Sets the free joint angles to values of q[i].
yarp::sig::Vector setDAng(const yarp::sig::Vector &dq)
Sets the free joint angles velocity to values of dq[i].
bool computeNewtonEuler(const yarp::sig::Vector &w0, const yarp::sig::Vector &dw0, const yarp::sig::Vector &ddp0, const yarp::sig::Vector &Fend, const yarp::sig::Vector &Muend)
Compute forces and torques with the Newton-Euler recursive algorithm: forward and backward phase are ...
bool releaseLink(const unsigned int i)
Releases the ith Link.
yarp::sig::Vector getAng()
Returns the current free joint angles values.
unsigned int getN() const
Returns the number of Links belonging to the Chain.
void printVector(const string &s, const Vector &v)
void printMatrix(const string &s, const Matrix &m)