YARP
Yet Another Robot Platform
yarp::dev::ImplementTorqueControl Class Reference

#include <yarp/dev/ImplementTorqueControl.h>

+ Inheritance diagram for yarp::dev::ImplementTorqueControl:

Public Member Functions

 ImplementTorqueControl (yarp::dev::ITorqueControlRaw *y)
 
virtual ~ImplementTorqueControl ()
 Destructor. More...
 
bool getAxes (int *ax) override
 Get the number of controlled axes. More...
 
bool getRefTorque (int j, double *) override
 Get the reference value of the torque for a given joint. More...
 
bool getRefTorques (double *t) override
 Get the reference value of the torque for all joints. More...
 
bool setRefTorques (const double *t) override
 Set the reference value of the torque for all joints. More...
 
bool setRefTorque (int j, double t) override
 Set the reference value of the torque for a given joint. More...
 
bool setRefTorques (const int n_joint, const int *joints, const double *t) override
 Set new torque reference for a subset of joints. More...
 
bool getTorques (double *t) override
 Get the value of the torque for all joints (this is the feedback if you have torque sensors). More...
 
bool getTorque (int j, double *t) override
 Get the value of the torque on a given joint (this is the feedback if you have a torque sensor). More...
 
bool setMotorTorqueParams (int j, const yarp::dev::MotorTorqueParameters params) override
 Set a subset of motor parameters (bemf, ktau etc) useful for torque control. More...
 
bool getMotorTorqueParams (int j, yarp::dev::MotorTorqueParameters *params) override
 Get a subset of motor parameters (bemf, ktau etc) useful for torque control. More...
 
bool getTorqueRange (int j, double *min, double *max) override
 Get the full scale of the torque sensor of a given joint. More...
 
bool getTorqueRanges (double *min, double *max) override
 Get the full scale of the torque sensors of all joints. More...
 
- Public Member Functions inherited from yarp::dev::ITorqueControl
virtual ~ITorqueControl ()
 Destructor. More...
 
virtual bool getAxes (int *ax)=0
 Get the number of controlled axes. More...
 
virtual bool getRefTorques (double *t)=0
 Get the reference value of the torque for all joints. More...
 
virtual bool getRefTorque (int j, double *t)=0
 Get the reference value of the torque for a given joint. More...
 
virtual bool setRefTorques (const double *t)=0
 Set the reference value of the torque for all joints. More...
 
virtual bool setRefTorque (int j, double t)=0
 Set the reference value of the torque for a given joint. More...
 
virtual bool setRefTorques (const int n_joint, const int *joints, const double *t)
 Set new torque reference for a subset of joints. More...
 
virtual bool getMotorTorqueParams (int j, yarp::dev::MotorTorqueParameters *params)
 Get a subset of motor parameters (bemf, ktau etc) useful for torque control. More...
 
virtual bool setMotorTorqueParams (int j, const yarp::dev::MotorTorqueParameters params)
 Set a subset of motor parameters (bemf, ktau etc) useful for torque control. More...
 
virtual bool getTorque (int j, double *t)=0
 Get the value of the torque on a given joint (this is the feedback if you have a torque sensor). More...
 
virtual bool getTorques (double *t)=0
 Get the value of the torque for all joints (this is the feedback if you have torque sensors). More...
 
virtual bool getTorqueRange (int j, double *min, double *max)=0
 Get the full scale of the torque sensor of a given joint. More...
 
virtual bool getTorqueRanges (double *min, double *max)=0
 Get the full scale of the torque sensors of all joints. More...
 

Protected Member Functions

bool initialize (int size, const int *amap, const double *enc, const double *zos, const double *nw, const double *amps, const double *dutys, const double *bemfs, const double *ktaus)
 Initialize the internal data and alloc memory. More...
 
bool uninitialize ()
 Clean up internal data and memory. More...
 

Protected Attributes

yarp::dev::ITorqueControlRawiTorqueRaw
 
void * helper
 
yarp::dev::impl::FixedSizeBuffersManager< int > * intBuffManager
 
yarp::dev::impl::FixedSizeBuffersManager< double > * doubleBuffManager
 

Detailed Description

Definition at line 23 of file ImplementTorqueControl.h.

Constructor & Destructor Documentation

◆ ImplementTorqueControl()

ImplementTorqueControl::ImplementTorqueControl ( yarp::dev::ITorqueControlRaw y)

Definition at line 16 of file ImplementTorqueControl.cpp.

◆ ~ImplementTorqueControl()

ImplementTorqueControl::~ImplementTorqueControl ( )
virtual

Destructor.

Perform uninitialize if needed.

Definition at line 23 of file ImplementTorqueControl.cpp.

Member Function Documentation

◆ getAxes()

bool ImplementTorqueControl::getAxes ( int *  ax)
overridevirtual

Get the number of controlled axes.

This command asks the number of controlled axes for the current physical interface.

Returns
the number of controlled axes.

Implements yarp::dev::ITorqueControl.

Reimplemented in FakeMotionControl.

Definition at line 69 of file ImplementTorqueControl.cpp.

◆ getMotorTorqueParams()

bool ImplementTorqueControl::getMotorTorqueParams ( int  j,
yarp::dev::MotorTorqueParameters params 
)
overridevirtual

Get a subset of motor parameters (bemf, ktau etc) useful for torque control.

Parameters
jjoint number
paramsa struct containing the motor parameters to be retrieved
Returns
true/false on success/failure

Reimplemented from yarp::dev::ITorqueControl.

Definition at line 105 of file ImplementTorqueControl.cpp.

◆ getRefTorque()

bool ImplementTorqueControl::getRefTorque ( int  j,
double *  t 
)
overridevirtual

Get the reference value of the torque for a given joint.

This is NOT the feedback (see getTorque instead).

Parameters
jjoint number
tthe returned reference torque of joint j
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 74 of file ImplementTorqueControl.cpp.

◆ getRefTorques()

bool ImplementTorqueControl::getRefTorques ( double *  t)
overridevirtual

Get the reference value of the torque for all joints.

This is NOT the feedback (see getTorques instead).

Parameters
tpointer to the array of torque values
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 129 of file ImplementTorqueControl.cpp.

◆ getTorque()

bool ImplementTorqueControl::getTorque ( int  j,
double *  t 
)
overridevirtual

Get the value of the torque on a given joint (this is the feedback if you have a torque sensor).

Parameters
jjoint number
tpointer to the result value
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 186 of file ImplementTorqueControl.cpp.

◆ getTorqueRange()

bool ImplementTorqueControl::getTorqueRange ( int  j,
double *  min,
double *  max 
)
overridevirtual

Get the full scale of the torque sensor of a given joint.

Parameters
jjoint number
minminimum torque of the joint j
maxmaximum torque of the joint j
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 207 of file ImplementTorqueControl.cpp.

◆ getTorqueRanges()

bool ImplementTorqueControl::getTorqueRanges ( double *  min,
double *  max 
)
overridevirtual

Get the full scale of the torque sensors of all joints.

Parameters
minpointer to the array that will store minimum torques of the joints
maxpointer to the array that will store maximum torques of the joints
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 194 of file ImplementTorqueControl.cpp.

◆ getTorques()

bool ImplementTorqueControl::getTorques ( double *  t)
overridevirtual

Get the value of the torque for all joints (this is the feedback if you have torque sensors).

Parameters
tpointer to the array that will store the output
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 156 of file ImplementTorqueControl.cpp.

◆ initialize()

bool ImplementTorqueControl::initialize ( int  size,
const int *  amap,
const double *  enc,
const double *  zos,
const double *  nw,
const double *  amps,
const double *  dutys,
const double *  bemfs,
const double *  ktaus 
)
protected

Initialize the internal data and alloc memory.

Parameters
sizeis the number of controlled axes the driver deals with.
amapis a lookup table mapping axes onto physical drivers.
encis an array containing the encoder to angles conversion factors.
zosis an array containing the zeros of the encoders.
Returns
true if initialized succeeded, false if it wasn't executed, or assert.

Definition at line 28 of file ImplementTorqueControl.cpp.

◆ setMotorTorqueParams()

bool ImplementTorqueControl::setMotorTorqueParams ( int  j,
const yarp::dev::MotorTorqueParameters  params 
)
overridevirtual

Set a subset of motor parameters (bemf, ktau etc) useful for torque control.

Parameters
jjoint number
paramsa struct containing the motor parameters to be set
Returns
true/false on success/failure

Reimplemented from yarp::dev::ITorqueControl.

Definition at line 86 of file ImplementTorqueControl.cpp.

◆ setRefTorque()

bool ImplementTorqueControl::setRefTorque ( int  j,
double  t 
)
overridevirtual

Set the reference value of the torque for a given joint.

Parameters
jjoint number
tnew value
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 147 of file ImplementTorqueControl.cpp.

◆ setRefTorques() [1/2]

bool ImplementTorqueControl::setRefTorques ( const double *  t)
overridevirtual

Set the reference value of the torque for all joints.

Parameters
tpointer to the array of torque values
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 138 of file ImplementTorqueControl.cpp.

◆ setRefTorques() [2/2]

bool ImplementTorqueControl::setRefTorques ( const int  n_joint,
const int *  joints,
const double *  t 
)
overridevirtual

Set new torque reference for a subset of joints.

Parameters
jointspointer to the array of joint numbers
refspointer to the array specifying the new torque reference
Returns
true/false on success/failure

Reimplemented from yarp::dev::ITorqueControl.

Definition at line 165 of file ImplementTorqueControl.cpp.

◆ uninitialize()

bool ImplementTorqueControl::uninitialize ( )
protected

Clean up internal data and memory.

Returns
true if uninitialization is executed, false otherwise.

Definition at line 46 of file ImplementTorqueControl.cpp.

Member Data Documentation

◆ doubleBuffManager

yarp::dev::impl::FixedSizeBuffersManager<double>* yarp::dev::ImplementTorqueControl::doubleBuffManager
protected

Definition at line 29 of file ImplementTorqueControl.h.

◆ helper

void* yarp::dev::ImplementTorqueControl::helper
protected

Definition at line 27 of file ImplementTorqueControl.h.

◆ intBuffManager

yarp::dev::impl::FixedSizeBuffersManager<int>* yarp::dev::ImplementTorqueControl::intBuffManager
protected

Definition at line 28 of file ImplementTorqueControl.h.

◆ iTorqueRaw

yarp::dev::ITorqueControlRaw* yarp::dev::ImplementTorqueControl::iTorqueRaw
protected

Definition at line 26 of file ImplementTorqueControl.h.


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