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...
 

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 32 of file ImplementTorqueControl.h.

Constructor & Destructor Documentation

◆ ImplementTorqueControl()

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

Definition at line 19 of file ImplementTorqueControl.cpp.

◆ ~ImplementTorqueControl()

ImplementTorqueControl::~ImplementTorqueControl ( )
virtual

Destructor.

Perform uninitialize if needed.

Definition at line 26 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 71 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 102 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 76 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 122 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 178 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 199 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 186 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 149 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 31 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 88 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 140 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 131 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 158 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 48 of file ImplementTorqueControl.cpp.

Member Data Documentation

◆ doubleBuffManager

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

Definition at line 38 of file ImplementTorqueControl.h.

◆ helper

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

Definition at line 36 of file ImplementTorqueControl.h.

◆ intBuffManager

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

Definition at line 37 of file ImplementTorqueControl.h.

◆ iTorqueRaw

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

Definition at line 35 of file ImplementTorqueControl.h.


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