iCub-main
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
iCub::iKin::iKinLink Class Reference

A Base class for defining a Link with standard Denavit-Hartenberg convention. More...

#include <iKinFwd.h>

+ Inheritance diagram for iCub::iKin::iKinLink:

Public Member Functions

 iKinLink (double _A, double _D, double _Alpha, double _Offset, double _Min=-iCub::ctrl::CTRL_PI, double _Max=iCub::ctrl::CTRL_PI)
 Constructor.
 
 iKinLink (const iKinLink &l)
 Creates a new Link from an already existing Link object.
 
iKinLinkoperator= (const iKinLink &l)
 Copies a Link object into the current one.
 
void setConstraint (bool _constrained)
 Sets the constraint status.
 
bool getConstraint () const
 Returns the constraint status.
 
void setVerbosity (unsigned int _verbose)
 Sets Link verbosity level.
 
unsigned int getVerbosity () const
 Returns the current Link verbosity level.
 
bool isBlocked () const
 Returns the Link blocking status.
 
double getA () const
 Returns the Link length A.
 
void setA (const double _A)
 Sets the Link length A.
 
double getD () const
 Returns the Link offset D.
 
void setD (const double _D)
 Sets the Link offset D.
 
double getAlpha () const
 Returns the Link twist Alpha.
 
void setAlpha (const double _Alpha)
 Sets the Link twist Alpha.
 
double getOffset () const
 Returns the joint angle offset.
 
void setOffset (const double _Offset)
 Sets the joint angle offset.
 
double getMin () const
 Returns the joint angle lower bound.
 
void setMin (const double _Min)
 Sets the joint angle lower bound.
 
double getMax () const
 Returns the joint angle upper bound.
 
void setMax (const double _Max)
 Sets the joint angle higher bound.
 
double getAng () const
 Returns the current joint angle value.
 
double setAng (double _Ang)
 Sets the joint angle value.
 
yarp::sig::Matrix getH (bool c_override=false)
 Computes the homogeneous transformation matrix H of the Link.
 
yarp::sig::Matrix getH (double _Ang, bool c_override=false)
 Same as getH() with specification of new joint angle position.
 
yarp::sig::Matrix getDnH (unsigned int n=1, bool c_override=false)
 Computes the derivative of order n of the homogeneous transformation matrix H with respect to the joint angle.
 
virtual ~iKinLink ()
 Default destructor.
 
virtual double setDAng (const double)
 
virtual double setD2Ang (const double)
 
virtual void setPosVelAcc (const double, const double, const double)
 
virtual bool setDynamicParameters (const double, const yarp::sig::Matrix &, const yarp::sig::Matrix &, const double, const double, const double, const double)
 
virtual bool setDynamicParameters (const double, const yarp::sig::Matrix &, const yarp::sig::Matrix &)
 
virtual bool setStaticParameters (const double, const yarp::sig::Matrix &)
 
virtual bool setInertia (const yarp::sig::Matrix &)
 
virtual void setMass (const double)
 
virtual bool setCOM (const yarp::sig::Matrix &)
 
virtual bool setCOM (const yarp::sig::Vector &)
 
virtual bool setForce (const yarp::sig::Vector &, const yarp::sig::Vector &)
 
virtual bool setMoment (const yarp::sig::Vector &)
 
virtual void setTorque (const double)
 
virtual const yarp::sig::Matrix & getInertia () const
 
virtual double getMass () const
 
virtual double getIm () const
 
virtual double getKr () const
 
virtual double getFs () const
 
virtual double getFv () const
 
virtual const yarp::sig::Matrix & getCOM () const
 
virtual double getDAng () const
 
virtual double getD2Ang () const
 
virtual const yarp::sig::Matrix & getR ()
 
virtual const yarp::sig::Matrix & getRC ()
 
virtual const yarp::sig::Vector & getr ()
 
virtual const yarp::sig::Vector & getrC ()
 
virtual const yarp::sig::Vector & getW () const
 
virtual const yarp::sig::Vector & getdW () const
 
virtual const yarp::sig::Vector & getdWM () const
 
virtual const yarp::sig::Vector & getLinAcc () const
 
virtual const yarp::sig::Vector & getLinAccC () const
 
virtual const yarp::sig::Vector & getLinVel () const
 
virtual const yarp::sig::Vector & getLinVelC () const
 
virtual const yarp::sig::Vector & getForce () const
 
virtual const yarp::sig::Vector & getMoment () const
 
virtual double getTorque () const
 

Protected Member Functions

 iKinLink ()
 
virtual void clone (const iKinLink &l)
 
bool isCumulative ()
 
void block ()
 
void block (double _Ang)
 
void release ()
 
void rmCumH ()
 
void addCumH (const yarp::sig::Matrix &_cumH)
 

Protected Attributes

double A
 
double D
 
double Alpha
 
double Offset
 
double c_alpha
 
double s_alpha
 
double Min
 
double Max
 
double Ang
 
bool blocked
 
bool cumulative
 
bool constrained
 
unsigned int verbose
 
yarp::sig::Matrix H
 
yarp::sig::Matrix cumH
 
yarp::sig::Matrix DnH
 
const yarp::sig::Matrix zeros1x1
 
const yarp::sig::Vector zeros1
 

Friends

class iKinChain
 

Detailed Description

A Base class for defining a Link with standard Denavit-Hartenberg convention.

Note
This class implements revolute joints only, as they are the unique type of joints used in humanoid robotics.

Definition at line 84 of file iKinFwd.h.

Constructor & Destructor Documentation

◆ iKinLink() [1/3]

iCub::iKin::iKinLink::iKinLink ( )
protected

◆ iKinLink() [2/3]

iKinLink::iKinLink ( double  _A,
double  _D,
double  _Alpha,
double  _Offset,
double  _Min = -iCub::ctrl::CTRL_PI,
double  _Max = iCub::ctrl::CTRL_PI 
)

Constructor.

Parameters
_Ais the Link length.
_Dis the Link offset.
_Alphais the Link twist.
_Offsetis the joint angle offset in [-pi,pi]
_Minis the joint angle lower bound in [-pi,pi] (-pi by default).
_Maxis the joint angle higher bound in [-pi,pi] (pi by default).

Definition at line 39 of file iKinFwd.cpp.

◆ iKinLink() [3/3]

iKinLink::iKinLink ( const iKinLink l)

Creates a new Link from an already existing Link object.

Parameters
lis the Link to be copied.

Definition at line 99 of file iKinFwd.cpp.

◆ ~iKinLink()

virtual iCub::iKin::iKinLink::~iKinLink ( )
inlinevirtual

Default destructor.

Definition at line 300 of file iKinFwd.h.

Member Function Documentation

◆ addCumH()

void iKinLink::addCumH ( const yarp::sig::Matrix &  _cumH)
protected

Definition at line 248 of file iKinFwd.cpp.

◆ block() [1/2]

void iCub::iKin::iKinLink::block ( )
inlineprotected

Definition at line 115 of file iKinFwd.h.

◆ block() [2/2]

void iCub::iKin::iKinLink::block ( double  _Ang)
inlineprotected

Definition at line 116 of file iKinFwd.h.

◆ clone()

void iKinLink::clone ( const iKinLink l)
protectedvirtual

Definition at line 73 of file iKinFwd.cpp.

◆ getA()

double iCub::iKin::iKinLink::getA ( ) const
inline

Returns the Link length A.

Returns
Link length A.

Definition at line 187 of file iKinFwd.h.

◆ getAlpha()

double iCub::iKin::iKinLink::getAlpha ( ) const
inline

Returns the Link twist Alpha.

Returns
Link twist Alpha.

Definition at line 211 of file iKinFwd.h.

◆ getAng()

double iCub::iKin::iKinLink::getAng ( ) const
inline

Returns the current joint angle value.

Returns
current joint angle value.

Definition at line 259 of file iKinFwd.h.

◆ getCOM()

virtual const yarp::sig::Matrix & iCub::iKin::iKinLink::getCOM ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 328 of file iKinFwd.h.

◆ getConstraint()

bool iCub::iKin::iKinLink::getConstraint ( ) const
inline

Returns the constraint status.

Returns
current constraint status.

Definition at line 160 of file iKinFwd.h.

◆ getD()

double iCub::iKin::iKinLink::getD ( ) const
inline

Returns the Link offset D.

Returns
Link offset D.

Definition at line 199 of file iKinFwd.h.

◆ getD2Ang()

virtual double iCub::iKin::iKinLink::getD2Ang ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 330 of file iKinFwd.h.

◆ getDAng()

virtual double iCub::iKin::iKinLink::getDAng ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 329 of file iKinFwd.h.

◆ getDnH()

Matrix iKinLink::getDnH ( unsigned int  n = 1,
bool  c_override = false 
)

Computes the derivative of order n of the homogeneous transformation matrix H with respect to the joint angle.

Parameters
nis the order of the derivative (1 by default)
c_overrideif true avoid accumulating the computation of previous links in the chain (false by default).
Returns
a reference to derivative of order n.

Definition at line 202 of file iKinFwd.cpp.

◆ getdW()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getdW ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 336 of file iKinFwd.h.

◆ getdWM()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getdWM ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 337 of file iKinFwd.h.

◆ getForce()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getForce ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 342 of file iKinFwd.h.

◆ getFs()

virtual double iCub::iKin::iKinLink::getFs ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 326 of file iKinFwd.h.

◆ getFv()

virtual double iCub::iKin::iKinLink::getFv ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 327 of file iKinFwd.h.

◆ getH() [1/2]

Matrix iKinLink::getH ( bool  c_override = false)

Computes the homogeneous transformation matrix H of the Link.

Parameters
c_overrideif true avoid accumulating the computation of previous links in the chain, i.e. H=Hn and not H=Hn*Hn-1 (false by default)
Returns
a reference to H.

Definition at line 169 of file iKinFwd.cpp.

◆ getH() [2/2]

Matrix iKinLink::getH ( double  _Ang,
bool  c_override = false 
)

Same as getH() with specification of new joint angle position.

Parameters
_Angis the new joint angle position.
c_override.
Returns
a reference to H.
See also
getH

Definition at line 193 of file iKinFwd.cpp.

◆ getIm()

virtual double iCub::iKin::iKinLink::getIm ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 324 of file iKinFwd.h.

◆ getInertia()

virtual const yarp::sig::Matrix & iCub::iKin::iKinLink::getInertia ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 322 of file iKinFwd.h.

◆ getKr()

virtual double iCub::iKin::iKinLink::getKr ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 325 of file iKinFwd.h.

◆ getLinAcc()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getLinAcc ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 338 of file iKinFwd.h.

◆ getLinAccC()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getLinAccC ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 339 of file iKinFwd.h.

◆ getLinVel()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getLinVel ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 340 of file iKinFwd.h.

◆ getLinVelC()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getLinVelC ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 341 of file iKinFwd.h.

◆ getMass()

virtual double iCub::iKin::iKinLink::getMass ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 323 of file iKinFwd.h.

◆ getMax()

double iCub::iKin::iKinLink::getMax ( ) const
inline

Returns the joint angle upper bound.

Returns
joint angle upper bound.

Definition at line 247 of file iKinFwd.h.

◆ getMin()

double iCub::iKin::iKinLink::getMin ( ) const
inline

Returns the joint angle lower bound.

Returns
joint angle lower bound.

Definition at line 235 of file iKinFwd.h.

◆ getMoment()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getMoment ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 343 of file iKinFwd.h.

◆ getOffset()

double iCub::iKin::iKinLink::getOffset ( ) const
inline

Returns the joint angle offset.

Returns
joint angle offset.

Definition at line 223 of file iKinFwd.h.

◆ getR()

virtual const yarp::sig::Matrix & iCub::iKin::iKinLink::getR ( )
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 331 of file iKinFwd.h.

◆ getr()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getr ( )
inlinevirtual

Definition at line 333 of file iKinFwd.h.

◆ getRC()

virtual const yarp::sig::Matrix & iCub::iKin::iKinLink::getRC ( )
inlinevirtual

Definition at line 332 of file iKinFwd.h.

◆ getrC()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getrC ( )
inlinevirtual

Definition at line 334 of file iKinFwd.h.

◆ getTorque()

virtual double iCub::iKin::iKinLink::getTorque ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 344 of file iKinFwd.h.

◆ getVerbosity()

unsigned int iCub::iKin::iKinLink::getVerbosity ( ) const
inline

Returns the current Link verbosity level.

Returns
Link verbosity level.

Definition at line 175 of file iKinFwd.h.

◆ getW()

virtual const yarp::sig::Vector & iCub::iKin::iKinLink::getW ( ) const
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 335 of file iKinFwd.h.

◆ isBlocked()

bool iCub::iKin::iKinLink::isBlocked ( ) const
inline

Returns the Link blocking status.

Returns
true if link is blocked.

Definition at line 181 of file iKinFwd.h.

◆ isCumulative()

bool iCub::iKin::iKinLink::isCumulative ( )
inlineprotected

Definition at line 114 of file iKinFwd.h.

◆ operator=()

iKinLink & iKinLink::operator= ( const iKinLink l)

Copies a Link object into the current one.

Parameters
lis a reference to an object of type iKinLink.
Returns
a reference to the current object.

Definition at line 106 of file iKinFwd.cpp.

◆ release()

void iCub::iKin::iKinLink::release ( )
inlineprotected

Definition at line 117 of file iKinFwd.h.

◆ rmCumH()

void iCub::iKin::iKinLink::rmCumH ( )
inlineprotected

Definition at line 118 of file iKinFwd.h.

◆ setA()

void iCub::iKin::iKinLink::setA ( const double  _A)
inline

Sets the Link length A.

Parameters
newLink length _A.

Definition at line 193 of file iKinFwd.h.

◆ setAlpha()

void iKinLink::setAlpha ( const double  _Alpha)

Sets the Link twist Alpha.

Parameters
newLink twist _Alpha.

Definition at line 142 of file iKinFwd.cpp.

◆ setAng()

double iKinLink::setAng ( double  _Ang)

Sets the joint angle value.

Parameters
_Angnew value for joint angle.
Returns
actual joint angle value (constraints are evaluated).

Definition at line 152 of file iKinFwd.cpp.

◆ setCOM() [1/2]

virtual bool iCub::iKin::iKinLink::setCOM ( const yarp::sig::Matrix &  )
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 315 of file iKinFwd.h.

◆ setCOM() [2/2]

virtual bool iCub::iKin::iKinLink::setCOM ( const yarp::sig::Vector &  )
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 316 of file iKinFwd.h.

◆ setConstraint()

void iCub::iKin::iKinLink::setConstraint ( bool  _constrained)
inline

Sets the constraint status.

Parameters
_constrainedif true the joint angle cannot be set out of its limits (initialized as true).

Definition at line 154 of file iKinFwd.h.

◆ setD()

void iKinLink::setD ( const double  _D)

Sets the Link offset D.

Parameters
newLink offset _D.

Definition at line 135 of file iKinFwd.cpp.

◆ setD2Ang()

virtual double iCub::iKin::iKinLink::setD2Ang ( const double  )
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 305 of file iKinFwd.h.

◆ setDAng()

virtual double iCub::iKin::iKinLink::setDAng ( const double  )
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 304 of file iKinFwd.h.

◆ setDynamicParameters() [1/2]

virtual bool iCub::iKin::iKinLink::setDynamicParameters ( const double  ,
const yarp::sig::Matrix &  ,
const yarp::sig::Matrix &   
)
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 310 of file iKinFwd.h.

◆ setDynamicParameters() [2/2]

virtual bool iCub::iKin::iKinLink::setDynamicParameters ( const double  ,
const yarp::sig::Matrix &  ,
const yarp::sig::Matrix &  ,
const double  ,
const double  ,
const double  ,
const double   
)
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 307 of file iKinFwd.h.

◆ setForce()

virtual bool iCub::iKin::iKinLink::setForce ( const yarp::sig::Vector &  ,
const yarp::sig::Vector &   
)
inlinevirtual

Definition at line 317 of file iKinFwd.h.

◆ setInertia()

virtual bool iCub::iKin::iKinLink::setInertia ( const yarp::sig::Matrix &  )
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 313 of file iKinFwd.h.

◆ setMass()

virtual void iCub::iKin::iKinLink::setMass ( const double  )
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 314 of file iKinFwd.h.

◆ setMax()

void iKinLink::setMax ( const double  _Max)

Sets the joint angle higher bound.

Parameters
_Maxis the joint angle higher bound in [-pi,pi].

Definition at line 125 of file iKinFwd.cpp.

◆ setMin()

void iKinLink::setMin ( const double  _Min)

Sets the joint angle lower bound.

Parameters
_Minis the joint angle lower bound in [-pi,pi].

Definition at line 115 of file iKinFwd.cpp.

◆ setMoment()

virtual bool iCub::iKin::iKinLink::setMoment ( const yarp::sig::Vector &  )
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 318 of file iKinFwd.h.

◆ setOffset()

void iCub::iKin::iKinLink::setOffset ( const double  _Offset)
inline

Sets the joint angle offset.

Parameters
newjoint angle offset _Offset.

Definition at line 229 of file iKinFwd.h.

◆ setPosVelAcc()

virtual void iCub::iKin::iKinLink::setPosVelAcc ( const double  ,
const double  ,
const double   
)
inlinevirtual

Definition at line 306 of file iKinFwd.h.

◆ setStaticParameters()

virtual bool iCub::iKin::iKinLink::setStaticParameters ( const double  ,
const yarp::sig::Matrix &   
)
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 312 of file iKinFwd.h.

◆ setTorque()

virtual void iCub::iKin::iKinLink::setTorque ( const double  )
inlinevirtual

Reimplemented in iCub::iDyn::iDynLink.

Definition at line 319 of file iKinFwd.h.

◆ setVerbosity()

void iCub::iKin::iKinLink::setVerbosity ( unsigned int  _verbose)
inline

Sets Link verbosity level.

Parameters
_verboseis a integer number which progressively enables different levels of warning messages. The larger this value the more detailed is the output.

Definition at line 169 of file iKinFwd.h.

Friends And Related Symbol Documentation

◆ iKinChain

friend class iKinChain
friend

Definition at line 108 of file iKinFwd.h.

Member Data Documentation

◆ A

double iCub::iKin::iKinLink::A
protected

Definition at line 87 of file iKinFwd.h.

◆ Alpha

double iCub::iKin::iKinLink::Alpha
protected

Definition at line 89 of file iKinFwd.h.

◆ Ang

double iCub::iKin::iKinLink::Ang
protected

Definition at line 95 of file iKinFwd.h.

◆ blocked

bool iCub::iKin::iKinLink::blocked
protected

Definition at line 96 of file iKinFwd.h.

◆ c_alpha

double iCub::iKin::iKinLink::c_alpha
protected

Definition at line 91 of file iKinFwd.h.

◆ constrained

bool iCub::iKin::iKinLink::constrained
protected

Definition at line 98 of file iKinFwd.h.

◆ cumH

yarp::sig::Matrix iCub::iKin::iKinLink::cumH
protected

Definition at line 102 of file iKinFwd.h.

◆ cumulative

bool iCub::iKin::iKinLink::cumulative
protected

Definition at line 97 of file iKinFwd.h.

◆ D

double iCub::iKin::iKinLink::D
protected

Definition at line 88 of file iKinFwd.h.

◆ DnH

yarp::sig::Matrix iCub::iKin::iKinLink::DnH
protected

Definition at line 103 of file iKinFwd.h.

◆ H

yarp::sig::Matrix iCub::iKin::iKinLink::H
protected

Definition at line 101 of file iKinFwd.h.

◆ Max

double iCub::iKin::iKinLink::Max
protected

Definition at line 94 of file iKinFwd.h.

◆ Min

double iCub::iKin::iKinLink::Min
protected

Definition at line 93 of file iKinFwd.h.

◆ Offset

double iCub::iKin::iKinLink::Offset
protected

Definition at line 90 of file iKinFwd.h.

◆ s_alpha

double iCub::iKin::iKinLink::s_alpha
protected

Definition at line 92 of file iKinFwd.h.

◆ verbose

unsigned int iCub::iKin::iKinLink::verbose
protected

Definition at line 99 of file iKinFwd.h.

◆ zeros1

const yarp::sig::Vector iCub::iKin::iKinLink::zeros1
protected

Definition at line 106 of file iKinFwd.h.

◆ zeros1x1

const yarp::sig::Matrix iCub::iKin::iKinLink::zeros1x1
protected

Definition at line 105 of file iKinFwd.h.


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