15#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
77 *stiffness = fabs (*stiffness);
78 *damping = fabs (*damping);
yarp::dev::ControlBoardHelper * castToMapper(void *p)
void trqN2S(double newtons, int j, double &sens, int &k)
void impN2S(double newtons, int j, double &sens, int &k)
void trqS2N(const double *sens, double *newtons)
void impS2N(const double *sens, double *newtons)
Interface for control boards implementing impedance control.
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual bool getImpedanceOffsetRaw(int j, double *offset)=0
Get current force Offset for a specific joint.
virtual bool setImpedanceOffsetRaw(int j, double offset)=0
Set current force Offset for a specific joint.
virtual bool getImpedanceRaw(int j, double *stiffness, double *damping)=0
Get current impedance parameters (stiffness,damping,offset) for a specific joint.
virtual bool getCurrentImpedanceLimitRaw(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp)=0
Get the current impedandance limits for a specific joint.
virtual bool setImpedanceRaw(int j, double stiffness, double damping)=0
Set current impedance parameters (stiffness,damping) for a specific joint.
bool uninitialize()
Clean up internal data and memory.
bool getImpedance(int j, double *stiffness, double *damping) override
Get current impedance gains (stiffness,damping,offset) for a specific joint.
bool getImpedanceOffset(int j, double *offset) override
Get current force Offset for a specific joint.
virtual ~ImplementImpedanceControl()
Destructor.
bool initialize(int size, const int *amap, const double *enc, const double *zos, const double *nw)
Initialize the internal data and alloc memory.
ImplementImpedanceControl(yarp::dev::IImpedanceControlRaw *y)
yarp::dev::IImpedanceControlRaw * iImpedanceRaw
bool getCurrentImpedanceLimit(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override
Get the current impedandance limits for a specific joint.
bool getAxes(int *ax) override
Get the number of controlled axes.
bool setImpedanceOffset(int j, double offset) override
Set current force Offset for a specific joint.
bool setImpedance(int j, double stiffness, double damping) override
Set current impedance gains (stiffness,damping) for a specific joint.
For streams capable of holding different kinds of content, check what they actually have.