|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
24 "Joint number %d out of bound [0-%zu] for part %s",
30 size_t subIndex =
device.
lut[j].deviceEntry;
38 return s->
pid->
setPid(pidtype,
static_cast<int>(off + s->
base), p);
50 size_t subIndex =
device.
lut[l].deviceEntry;
74 "Joint number %d out of bound [0-%zu] for part %s",
80 size_t subIndex =
device.
lut[j].deviceEntry;
100 size_t subIndex =
device.
lut[l].deviceEntry;
126 size_t subIndex =
device.
lut[j].deviceEntry;
146 size_t subIndex =
device.
lut[l].deviceEntry;
172 size_t subIndex =
device.
lut[j].deviceEntry;
199 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
200 errs[juser] = errors[jdevice];
223 size_t subIndex =
device.
lut[j].deviceEntry;
250 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
251 outs[juser] = outputs[jdevice];
274 size_t subIndex =
device.
lut[j].deviceEntry;
298 size_t subIndex =
device.
lut[j].deviceEntry;
306 return s->
pid->
getPid(pidtype,
static_cast<int>(off + s->
base), p);
324 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
325 pids[juser] = pids_device[jdevice];
334 delete[] pids_device;
348 size_t subIndex =
device.
lut[j].deviceEntry;
373 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
374 refs[juser] = references[jdevice];
397 size_t subIndex =
device.
lut[j].deviceEntry;
423 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
424 limits[juser] = lims[jdevice];
447 size_t subIndex =
device.
lut[j].deviceEntry;
470 size_t subIndex =
device.
lut[j].deviceEntry;
493 size_t subIndex =
device.
lut[j].deviceEntry;
516 size_t subIndex =
device.
lut[j].deviceEntry;
bool getPids(const yarp::dev::PidControlTypeEnum &pidtype, yarp::dev::Pid *pids) override
Get current pid value for a specific joint.
virtual bool getPidErrorLimits(const PidControlTypeEnum &pidtype, double *limits)=0
Get the error limit for all controllers.
bool setPids(const yarp::dev::PidControlTypeEnum &pidtype, const yarp::dev::Pid *ps) override
Set new pid value on multiple axes.
virtual bool setPid(const PidControlTypeEnum &pidtype, int j, const Pid &pid)=0
Set new pid value for a joint axis.
virtual bool disablePid(const PidControlTypeEnum &pidtype, int j)=0
Disable the pid computation for a joint.
bool getPidError(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *err) override
Get the current error for a joint.
virtual bool enablePid(const PidControlTypeEnum &pidtype, int j)=0
Enable the pid computation 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 getPidReference(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *ref) override
Get the current reference of the pid controller for a specific joint.
bool setPid(const yarp::dev::PidControlTypeEnum &pidtype, int j, const yarp::dev::Pid &p) override
Set new pid value for a joint axis.
virtual bool getPids(const PidControlTypeEnum &pidtype, Pid *pids)=0
Get current pid value for a specific joint.
bool getPidErrorLimits(const yarp::dev::PidControlTypeEnum &pidtype, double *limits) override
Get the error limit for all controllers.
bool setPidReference(const yarp::dev::PidControlTypeEnum &pidtype, int j, double ref) override
Set the controller reference for a given axis.
virtual bool getPidOutputs(const PidControlTypeEnum &pidtype, double *outs)=0
Get the output of the controllers (e.g.
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 getPidOutputs(const yarp::dev::PidControlTypeEnum &pidtype, double *outs) override
Get the output of the controllers (e.g.
virtual bool setPidOffset(const PidControlTypeEnum &pidtype, int j, double v)=0
Set offset value for a given controller.
virtual bool getPidErrors(const PidControlTypeEnum &pidtype, double *errs)=0
Get the error of all joints.
bool setPidOffset(const yarp::dev::PidControlTypeEnum &pidtype, int j, double v) override
Set offset value for a given controller.
bool setPidErrorLimits(const yarp::dev::PidControlTypeEnum &pidtype, const double *limits) override
Get the error limit for the controller on all joints.
bool setPidReferences(const yarp::dev::PidControlTypeEnum &pidtype, const double *refs) override
Set the controller reference, multiple axes.
virtual bool getPidReferences(const PidControlTypeEnum &pidtype, double *refs)=0
Get the current reference of all pid controllers.
virtual bool setPidReference(const PidControlTypeEnum &pidtype, int j, double ref)=0
Set the controller reference for a given axis.
bool getPidReferences(const yarp::dev::PidControlTypeEnum &pidtype, double *refs) override
Get the current reference of all pid controllers.
const yarp::os::LogComponent & CONTROLBOARDWRAPPER()
virtual bool getPidErrorLimit(const PidControlTypeEnum &pidtype, int j, double *limit)=0
Get the error limit for the controller on a specific joint.
SubDevice * getSubdevice(size_t i)
virtual bool getPidOutput(const PidControlTypeEnum &pidtype, int j, double *out)=0
Get the output of the controller (e.g.
SubDeviceVector subdevices
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 getPid(const PidControlTypeEnum &pidtype, int j, Pid *pid)=0
Get current pid value for a specific joint.
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 getPidError(const PidControlTypeEnum &pidtype, int j, double *err)=0
Get the current error for a joint.
bool enablePid(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Enable the pid computation for a joint.
bool getPidOutput(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *out) override
Get the output of the controller (e.g.
bool getPidErrors(const yarp::dev::PidControlTypeEnum &pidtype, double *errs) override
Get the error of all joints.
bool isPidEnabled(const yarp::dev::PidControlTypeEnum &pidtype, int j, bool *enabled) override
Get the current status (enabled/disabled) of the pid.
#define yCError(component,...)
std::vector< DevicesLutEntry > lut
bool disablePid(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Disable the pid computation for a joint.
bool getPid(const yarp::dev::PidControlTypeEnum &pidtype, int j, yarp::dev::Pid *p) override
Get current pid value for 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.
bool getPidErrorLimit(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *limit) override
Get the error limit for the controller on a specific joint.
Contains the parameters for a PID.
size_t maxNumOfJointsInDevices
yarp::dev::IPidControl * pid
void printError(const std::string &func_name, const std::string &info, bool result)
virtual bool isPidEnabled(const PidControlTypeEnum &pidtype, int j, bool *enabled)=0
Get the current status (enabled/disabled) of the pid.