21 "Joint number %d out of bound [0-%zu] for part %s",
27 size_t subIndex =
device.
lut[j].deviceEntry;
35 return s->
pid->
setPid(pidtype,
static_cast<int>(off + s->
base), p);
47 size_t subIndex =
device.
lut[l].deviceEntry;
71 "Joint number %d out of bound [0-%zu] for part %s",
77 size_t subIndex =
device.
lut[j].deviceEntry;
97 size_t subIndex =
device.
lut[l].deviceEntry;
123 size_t subIndex =
device.
lut[j].deviceEntry;
143 size_t subIndex =
device.
lut[l].deviceEntry;
169 size_t subIndex =
device.
lut[j].deviceEntry;
196 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
197 errs[juser] = errors[jdevice];
220 size_t subIndex =
device.
lut[j].deviceEntry;
247 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
248 outs[juser] = outputs[jdevice];
271 size_t subIndex =
device.
lut[j].deviceEntry;
295 size_t subIndex =
device.
lut[j].deviceEntry;
303 return s->
pid->
getPid(pidtype,
static_cast<int>(off + s->
base), p);
321 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
322 pids[juser] = pids_device[jdevice];
331 delete[] pids_device;
345 size_t subIndex =
device.
lut[j].deviceEntry;
370 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
371 refs[juser] = references[jdevice];
394 size_t subIndex =
device.
lut[j].deviceEntry;
420 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
421 limits[juser] = lims[jdevice];
444 size_t subIndex =
device.
lut[j].deviceEntry;
467 size_t subIndex =
device.
lut[j].deviceEntry;
490 size_t subIndex =
device.
lut[j].deviceEntry;
513 size_t subIndex =
device.
lut[j].deviceEntry;
const yarp::os::LogComponent & CONTROLBOARD()
void printError(const std::string &func_name, const std::string &info, bool result)
bool enablePid(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Enable the pid computation for a joint.
bool getPids(const yarp::dev::PidControlTypeEnum &pidtype, yarp::dev::Pid *pids) override
Get current pid value for a specific joint.
bool setPidReferences(const yarp::dev::PidControlTypeEnum &pidtype, const double *refs) override
Set the controller reference, multiple axes.
bool getPidError(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *err) override
Get the current error for a joint.
bool setPidErrorLimit(const yarp::dev::PidControlTypeEnum &pidtype, int j, double limit) override
Set the error limit for the controller on a specifi joint.
bool getPidReferences(const yarp::dev::PidControlTypeEnum &pidtype, double *refs) override
Get the current reference of all pid controllers.
bool setPidReference(const yarp::dev::PidControlTypeEnum &pidtype, int j, double ref) override
Set the controller reference for a given axis.
bool isPidEnabled(const yarp::dev::PidControlTypeEnum &pidtype, int j, bool *enabled) override
Get the current status (enabled/disabled) of the pid.
bool getPidOutputs(const yarp::dev::PidControlTypeEnum &pidtype, double *outs) override
Get the output of the controllers (e.g.
bool setPidOffset(const yarp::dev::PidControlTypeEnum &pidtype, int j, double v) override
Set offset value for a given controller.
bool getPidOutput(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *out) override
Get the output of the controller (e.g.
bool setPids(const yarp::dev::PidControlTypeEnum &pidtype, const yarp::dev::Pid *ps) override
Set new pid value on multiple axes.
bool disablePid(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Disable the pid computation for a joint.
bool setPid(const yarp::dev::PidControlTypeEnum &pidtype, int j, const yarp::dev::Pid &p) override
Set new pid value for a joint axis.
bool setPidErrorLimits(const yarp::dev::PidControlTypeEnum &pidtype, const double *limits) override
Get the error limit for the controller on all joints.
bool getPid(const yarp::dev::PidControlTypeEnum &pidtype, int j, yarp::dev::Pid *p) override
Get current pid value for a specific joint.
bool resetPid(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Reset the controller of a given joint, usually sets the current status of the joint as the reference ...
bool getPidErrors(const yarp::dev::PidControlTypeEnum &pidtype, double *errs) override
Get the error of all joints.
bool getPidErrorLimits(const yarp::dev::PidControlTypeEnum &pidtype, double *limits) override
Get the error limit for all controllers.
bool getPidReference(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *ref) override
Get the current reference of the pid controller for a specific joint.
bool getPidErrorLimit(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *limit) override
Get the error limit for the controller on a specific joint.
yarp::dev::IPidControl * pid
std::vector< DevicesLutEntry > lut
SubDevice * getSubdevice(size_t i)
size_t maxNumOfJointsInDevices
SubDeviceVector subdevices
virtual bool setPid(const PidControlTypeEnum &pidtype, int j, const Pid &pid)=0
Set new pid value for a joint axis.
virtual bool getPidReference(const PidControlTypeEnum &pidtype, int j, double *ref)=0
Get the current reference of the pid controller for a specific joint.
virtual bool getPidOutput(const PidControlTypeEnum &pidtype, int j, double *out)=0
Get the output of the controller (e.g.
virtual bool getPidReferences(const PidControlTypeEnum &pidtype, double *refs)=0
Get the current reference of all pid controllers.
virtual bool resetPid(const PidControlTypeEnum &pidtype, int j)=0
Reset the controller of a given joint, usually sets the current status of the joint as the reference ...
virtual bool setPidOffset(const PidControlTypeEnum &pidtype, int j, double v)=0
Set offset value for a given controller.
virtual bool getPidErrorLimits(const PidControlTypeEnum &pidtype, double *limits)=0
Get the error limit for all controllers.
virtual bool getPidError(const PidControlTypeEnum &pidtype, int j, double *err)=0
Get the current error for a joint.
virtual bool getPidErrorLimit(const PidControlTypeEnum &pidtype, int j, double *limit)=0
Get the error limit for the controller on a specific joint.
virtual bool setPidErrorLimit(const PidControlTypeEnum &pidtype, int j, double limit)=0
Set the error limit for the controller on a specifi joint.
virtual bool disablePid(const PidControlTypeEnum &pidtype, int j)=0
Disable the pid computation for a joint.
virtual bool getPidOutputs(const PidControlTypeEnum &pidtype, double *outs)=0
Get the output of the controllers (e.g.
virtual bool setPidReference(const PidControlTypeEnum &pidtype, int j, double ref)=0
Set the controller reference for a given axis.
virtual bool getPidErrors(const PidControlTypeEnum &pidtype, double *errs)=0
Get the error of all joints.
virtual bool enablePid(const PidControlTypeEnum &pidtype, int j)=0
Enable the pid computation for a joint.
virtual bool isPidEnabled(const PidControlTypeEnum &pidtype, int j, bool *enabled)=0
Get the current status (enabled/disabled) of the pid.
virtual bool getPids(const PidControlTypeEnum &pidtype, Pid *pids)=0
Get current pid value for a specific joint.
virtual bool getPid(const PidControlTypeEnum &pidtype, int j, Pid *pid)=0
Get current pid value for a specific joint.
Contains the parameters for a PID.
#define yCError(component,...)