YARP
Yet Another Robot Platform
ControlBoardWrapperTorqueControl Class Reference

#include <ControlBoardWrapper/ControlBoardWrapperTorqueControl.h>

+ Inheritance diagram for ControlBoardWrapperTorqueControl:

Public Member Functions

bool getAxes (int *ax) override
 Get the number of controlled axes. More...
 
bool getRefTorques (double *refs) override
 Get the reference value of the torque for all joints. More...
 
bool getRefTorque (int j, double *t) override
 Get the reference value of the torque for a given joint. 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 getMotorTorqueParams (int j, yarp::dev::MotorTorqueParameters *params) override
 Get a subset of motor parameters (bemf, ktau etc) useful for torque control. 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 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 getTorques (double *t) override
 Get the value of the torque for all joints (this is the feedback if you have torque sensors). 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 ControlBoardWrapperCommon
bool getAxes (int *ax)
 
bool setRefAcceleration (int j, double acc)
 
bool setRefAccelerations (const double *accs)
 
bool setRefAccelerations (const int n_joints, const int *joints, const double *accs)
 
bool getRefAcceleration (int j, double *acc)
 
bool getRefAccelerations (double *accs)
 
bool getRefAccelerations (const int n_joints, const int *joints, double *accs)
 
bool stop (int j)
 
bool stop ()
 
bool stop (const int n_joint, const int *joints)
 
bool getNumberOfMotors (int *num)
 
bool getCurrent (int m, double *curr)
 
bool getCurrents (double *currs)
 
void printError (const std::string &func_name, const std::string &info, bool result)
 
- 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...
 

Additional Inherited Members

- Public Attributes inherited from ControlBoardWrapperCommon
WrappedDevice device
 
size_t controlledJoints {0}
 
std::string partName
 
std::mutex rpcDataMutex
 
MultiJointData rpcData
 
std::mutex timeMutex
 
yarp::os::Stamp time
 

Detailed Description

Definition at line 13 of file ControlBoardWrapperTorqueControl.h.

Member Function Documentation

◆ getAxes()

bool ControlBoardWrapperTorqueControl::getAxes ( int *  ax)
inlineoverridevirtual

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.

Definition at line 18 of file ControlBoardWrapperTorqueControl.h.

◆ getMotorTorqueParams()

bool ControlBoardWrapperTorqueControl::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 133 of file ControlBoardWrapperTorqueControl.cpp.

◆ getRefTorque()

bool ControlBoardWrapperTorqueControl::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 37 of file ControlBoardWrapperTorqueControl.cpp.

◆ getRefTorques()

bool ControlBoardWrapperTorqueControl::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 11 of file ControlBoardWrapperTorqueControl.cpp.

◆ getTorque()

bool ControlBoardWrapperTorqueControl::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 177 of file ControlBoardWrapperTorqueControl.cpp.

◆ getTorqueRange()

bool ControlBoardWrapperTorqueControl::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 226 of file ControlBoardWrapperTorqueControl.cpp.

◆ getTorqueRanges()

bool ControlBoardWrapperTorqueControl::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 249 of file ControlBoardWrapperTorqueControl.cpp.

◆ getTorques()

bool ControlBoardWrapperTorqueControl::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 200 of file ControlBoardWrapperTorqueControl.cpp.

◆ setMotorTorqueParams()

bool ControlBoardWrapperTorqueControl::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 155 of file ControlBoardWrapperTorqueControl.cpp.

◆ setRefTorque()

bool ControlBoardWrapperTorqueControl::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 82 of file ControlBoardWrapperTorqueControl.cpp.

◆ setRefTorques() [1/2]

bool ControlBoardWrapperTorqueControl::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 60 of file ControlBoardWrapperTorqueControl.cpp.

◆ setRefTorques() [2/2]

bool ControlBoardWrapperTorqueControl::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 104 of file ControlBoardWrapperTorqueControl.cpp.


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