|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
17 #define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
22 intBuffManager(nullptr),
23 doubleBuffManager(nullptr)
31 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)
113 *params = params_raw;
166 for(
int idx=0; idx<n_joint; idx++)
virtual bool setRefTorqueRaw(int j, double t)=0
Set the reference value of the torque for a given joint.
yarp::dev::impl::FixedSizeBuffersManager< double > * doubleBuffManager
virtual bool setMotorTorqueParamsRaw(int j, const yarp::dev::MotorTorqueParameters params)
Set the motor parameters.
double bemf_user2raw(double bemf_user, int j)
yarp::dev::impl::FixedSizeBuffersManager< int > * intBuffManager
virtual bool getTorqueRaw(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).
bool setRefTorques(const double *t) override
Set the reference value of the torque for all joints.
virtual bool getMotorTorqueParamsRaw(int j, yarp::dev::MotorTorqueParameters *params)
Get the motor parameters.
bool getRefTorque(int j, double *) override
Get the reference value of the torque for a given joint.
Interface for control boards implementing torque control.
T * getData()
Return the data pointer.
virtual bool getTorqueRangeRaw(int j, double *min, double *max)=0
Get the full scale of the torque sensor of a given joint.
Buffer< T > getBuffer()
Get a buffer and fill its information in @buffer.
bool getTorques(double *t) override
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
ImplementTorqueControl(yarp::dev::ITorqueControlRaw *y)
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual bool getRefTorquesRaw(double *t)=0
Get the reference value of the torque for all joints.
An interface for the device drivers.
bool getAxes(int *ax) override
Get the number of controlled axes.
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 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 getTorqueRanges(double *min, double *max) override
Get the full scale of the torque sensors of all joints.
bool getMotorTorqueParams(int j, yarp::dev::MotorTorqueParameters *params) override
Get a subset of motor parameters (bemf, ktau etc) useful for torque control.
virtual bool getTorquesRaw(double *t)=0
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
Buffer contains info about a buffer of type T and it is used to exchange information with yarp::dev::...
yarp::dev::ITorqueControlRaw * iTorqueRaw
bool setMotorTorqueParams(int j, const yarp::dev::MotorTorqueParameters params) override
Set a subset of motor parameters (bemf, ktau etc) useful for torque control.
double ktau_user2raw(double ktau_user, int j)
void releaseBuffer(Buffer< T > &buffer)
Release a buffer.
void trqN2S(double newtons, int j, double &sens, int &k)
bool getTorqueRange(int j, double *min, double *max) override
Get the full scale of the torque sensor of a given joint.
An interface to the operating system, including Port based communication.
yarp::dev::ControlBoardHelper * castToMapper(void *p)
virtual ~ImplementTorqueControl()
Destructor.
virtual bool getTorqueRangesRaw(double *min, double *max)=0
Get the full scale of the torque sensors of all joints.
void trqS2N(const double *sens, double *newtons)
virtual bool setRefTorquesRaw(const double *t)=0
Set the reference value of the torque for all joints.
bool getRefTorques(double *t) override
Get the reference value of the torque for all joints.
bool uninitialize()
Clean up internal data and memory.
virtual bool getRefTorqueRaw(int j, double *t)=0
Set the reference value of the torque for a given joint.
bool setRefTorque(int j, double t) override
Set the reference value of the torque for a given joint.
void bemf_raw2user(double bemf_raw, int k_raw, double &bemf_user, int &j_user)
void ktau_raw2user(double ktau_raw, int k_raw, double &ktau_user, int &j_user)