#include <yarp/dev/ImplementTorqueControl.h>
Public Member Functions | |
ImplementTorqueControl (yarp::dev::ITorqueControlRaw *y) | |
virtual | ~ImplementTorqueControl () |
Destructor. | |
bool | getAxes (int *ax) override |
Get the number of controlled axes. | |
bool | getRefTorque (int j, double *) override |
Get the reference value of the torque for a given joint. | |
bool | getRefTorques (double *t) override |
Get the reference value of the torque for all joints. | |
bool | setRefTorques (const double *t) override |
Set the reference value of the torque for all joints. | |
bool | setRefTorque (int j, double t) override |
Set the reference value of the torque for a given joint. | |
bool | setRefTorques (const int n_joint, const int *joints, const double *t) override |
Set new torque reference for a subset of joints. | |
bool | getTorques (double *t) override |
Get the value of the torque for all joints (this is the feedback if you have torque sensors). | |
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). | |
bool | setMotorTorqueParams (int j, const yarp::dev::MotorTorqueParameters params) override |
Set a subset of motor parameters (bemf, ktau etc) useful for torque control. | |
bool | getMotorTorqueParams (int j, yarp::dev::MotorTorqueParameters *params) override |
Get a subset of motor parameters (bemf, ktau etc) useful for torque control. | |
bool | getTorqueRange (int j, double *min, double *max) override |
Get the full scale of the torque sensor of a given joint. | |
bool | getTorqueRanges (double *min, double *max) override |
Get the full scale of the torque sensors of all joints. | |
![]() | |
virtual | ~ITorqueControl () |
Destructor. | |
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. | |
bool | uninitialize () |
Clean up internal data and memory. | |
Protected Attributes | |
yarp::dev::ITorqueControlRaw * | iTorqueRaw |
void * | helper |
yarp::dev::impl::FixedSizeBuffersManager< int > * | intBuffManager |
yarp::dev::impl::FixedSizeBuffersManager< double > * | doubleBuffManager |
Definition at line 23 of file ImplementTorqueControl.h.
ImplementTorqueControl::ImplementTorqueControl | ( | yarp::dev::ITorqueControlRaw * | y | ) |
Definition at line 16 of file ImplementTorqueControl.cpp.
|
virtual |
Destructor.
Perform uninitialize if needed.
Definition at line 23 of file ImplementTorqueControl.cpp.
Get the number of controlled axes.
This command asks the number of controlled axes for the current physical interface.
Implements yarp::dev::ITorqueControl.
Definition at line 69 of file ImplementTorqueControl.cpp.
|
overridevirtual |
Get a subset of motor parameters (bemf, ktau etc) useful for torque control.
j | joint number |
params | a struct containing the motor parameters to be retrieved |
Reimplemented from yarp::dev::ITorqueControl.
Definition at line 106 of file ImplementTorqueControl.cpp.
Get the reference value of the torque for a given joint.
This is NOT the feedback (see getTorque instead).
j | joint number |
t | the returned reference torque of joint j |
Implements yarp::dev::ITorqueControl.
Definition at line 74 of file ImplementTorqueControl.cpp.
Get the reference value of the torque for all joints.
This is NOT the feedback (see getTorques instead).
t | pointer to the array of torque values |
Implements yarp::dev::ITorqueControl.
Definition at line 131 of file ImplementTorqueControl.cpp.
Get the value of the torque on a given joint (this is the feedback if you have a torque sensor).
j | joint number |
t | pointer to the result value |
Implements yarp::dev::ITorqueControl.
Definition at line 188 of file ImplementTorqueControl.cpp.
Get the full scale of the torque sensor of a given joint.
j | joint number |
min | minimum torque of the joint j |
max | maximum torque of the joint j |
Implements yarp::dev::ITorqueControl.
Definition at line 209 of file ImplementTorqueControl.cpp.
Get the full scale of the torque sensors of all joints.
min | pointer to the array that will store minimum torques of the joints |
max | pointer to the array that will store maximum torques of the joints |
Implements yarp::dev::ITorqueControl.
Definition at line 196 of file ImplementTorqueControl.cpp.
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
t | pointer to the array that will store the output |
Implements yarp::dev::ITorqueControl.
Definition at line 158 of file ImplementTorqueControl.cpp.
|
protected |
Initialize the internal data and alloc memory.
size | is the number of controlled axes the driver deals with. |
amap | is a lookup table mapping axes onto physical drivers. |
enc | is an array containing the encoder to angles conversion factors. |
zos | is an array containing the zeros of the encoders. |
Definition at line 28 of file ImplementTorqueControl.cpp.
|
overridevirtual |
Set a subset of motor parameters (bemf, ktau etc) useful for torque control.
j | joint number |
params | a struct containing the motor parameters to be set |
Reimplemented from yarp::dev::ITorqueControl.
Definition at line 86 of file ImplementTorqueControl.cpp.
Set the reference value of the torque for a given joint.
j | joint number |
t | new value |
Implements yarp::dev::ITorqueControl.
Definition at line 149 of file ImplementTorqueControl.cpp.
Set the reference value of the torque for all joints.
t | pointer to the array of torque values |
Implements yarp::dev::ITorqueControl.
Definition at line 140 of file ImplementTorqueControl.cpp.
|
overridevirtual |
Set new torque reference for a subset of joints.
joints | pointer to the array of joint numbers |
refs | pointer to the array specifying the new torque reference |
Reimplemented from yarp::dev::ITorqueControl.
Definition at line 167 of file ImplementTorqueControl.cpp.
|
protected |
Clean up internal data and memory.
Definition at line 46 of file ImplementTorqueControl.cpp.
|
protected |
Definition at line 29 of file ImplementTorqueControl.h.
|
protected |
Definition at line 27 of file ImplementTorqueControl.h.
|
protected |
Definition at line 28 of file ImplementTorqueControl.h.
|
protected |
Definition at line 26 of file ImplementTorqueControl.h.