#include <yarp/dev/ImplementPidControl.h>
Public Member Functions | |
ImplementPidControl (yarp::dev::IPidControlRaw *y) | |
virtual | ~ImplementPidControl () |
bool | setPid (const PidControlTypeEnum &pidtype, int j, const Pid &pid) override |
Set new pid value for a joint axis. More... | |
bool | setPids (const PidControlTypeEnum &pidtype, const Pid *pids) override |
Set new pid value on multiple axes. More... | |
bool | setPidReference (const PidControlTypeEnum &pidtype, int j, double ref) override |
Set the controller reference for a given axis. More... | |
bool | setPidReferences (const PidControlTypeEnum &pidtype, const double *refs) override |
Set the controller reference, multiple axes. More... | |
bool | setPidErrorLimit (const PidControlTypeEnum &pidtype, int j, double limit) override |
Set the error limit for the controller on a specifi joint. More... | |
bool | setPidErrorLimits (const PidControlTypeEnum &pidtype, const double *limits) override |
Get the error limit for the controller on all joints. More... | |
bool | getPidError (const PidControlTypeEnum &pidtype, int j, double *err) override |
Get the current error for a joint. More... | |
bool | getPidErrors (const PidControlTypeEnum &pidtype, double *errs) override |
Get the error of all joints. More... | |
bool | getPidOutput (const PidControlTypeEnum &pidtype, int j, double *out) override |
Get the output of the controller (e.g. More... | |
bool | getPidOutputs (const PidControlTypeEnum &pidtype, double *outs) override |
Get the output of the controllers (e.g. More... | |
bool | getPid (const PidControlTypeEnum &pidtype, int j, Pid *pid) override |
Get current pid value for a specific joint. More... | |
bool | getPids (const PidControlTypeEnum &pidtype, Pid *pids) override |
Get current pid value for a specific joint. More... | |
bool | getPidReference (const PidControlTypeEnum &pidtype, int j, double *ref) override |
Get the current reference of the pid controller for a specific joint. More... | |
bool | getPidReferences (const PidControlTypeEnum &pidtype, double *refs) override |
Get the current reference of all pid controllers. More... | |
bool | getPidErrorLimit (const PidControlTypeEnum &pidtype, int j, double *ref) override |
Get the error limit for the controller on a specific joint. More... | |
bool | getPidErrorLimits (const PidControlTypeEnum &pidtype, double *refs) override |
Get the error limit for all controllers. More... | |
bool | resetPid (const PidControlTypeEnum &pidtype, int j) override |
Reset the controller of a given joint, usually sets the current status of the joint as the reference value for the PID, and resets the integrator. More... | |
bool | enablePid (const PidControlTypeEnum &pidtype, int j) override |
Enable the pid computation for a joint. More... | |
bool | disablePid (const PidControlTypeEnum &pidtype, int j) override |
Disable the pid computation for a joint. More... | |
bool | setPidOffset (const PidControlTypeEnum &pidtype, int j, double v) override |
Set offset value for a given controller. More... | |
bool | isPidEnabled (const PidControlTypeEnum &pidtype, int j, bool *enabled) override |
Get the current status (enabled/disabled) of the pid. More... | |
void | b () |
Public Member Functions inherited from yarp::dev::IPidControl | |
virtual | ~IPidControl () |
Destructor. More... | |
Protected Member Functions | |
bool | initialize (int size, const int *amap, const double *enc, const double *zos, const double *newtons, const double *amps, const double *dutys) |
Initialize the internal data and alloc memory. More... | |
bool | uninitialize () |
Clean up internal data and memory. More... | |
bool | setConversionUnits (const PidControlTypeEnum &pidtype, const PidFeedbackUnitsEnum fbk_conv_units, const PidOutputUnitsEnum out_conv_units) |
Protected Attributes | |
IPidControlRaw * | iPid |
void * | helper |
yarp::dev::impl::FixedSizeBuffersManager< double > * | doubleBuffManager |
yarp::dev::impl::FixedSizeBuffersManager< yarp::dev::Pid > * | pidBuffManager |
Definition at line 31 of file ImplementPidControl.h.
ImplementPidControl::ImplementPidControl | ( | yarp::dev::IPidControlRaw * | y | ) |
Definition at line 21 of file ImplementPidControl.cpp.
|
virtual |
Definition at line 29 of file ImplementPidControl.cpp.
void yarp::dev::ImplementPidControl::b | ( | ) |
|
overridevirtual |
Disable the pid computation for a joint.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
Implements yarp::dev::IPidControl.
Definition at line 320 of file ImplementPidControl.cpp.
|
overridevirtual |
Enable the pid computation for a joint.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
Implements yarp::dev::IPidControl.
Definition at line 311 of file ImplementPidControl.cpp.
|
overridevirtual |
Get current pid value for a specific joint.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
pid | pointer to storage for the return value. |
Implements yarp::dev::IPidControl.
Definition at line 210 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the current error for a joint.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
err | pointer to the storage for the return value |
Implements yarp::dev::IPidControl.
Definition at line 148 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the error limit for the controller on a specific joint.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
limit | pointer to storage |
Implements yarp::dev::IPidControl.
Definition at line 276 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the error limit for all controllers.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
limits | pointer to the array that will store the output |
Implements yarp::dev::IPidControl.
Definition at line 291 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the error of all joints.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
errs | pointer to the vector that will store the errors |
Implements yarp::dev::IPidControl.
Definition at line 162 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the output of the controller (e.g.
pwm value)
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
out | pointer to storage for return value |
Implements yarp::dev::IPidControl.
Definition at line 173 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the output of the controllers (e.g.
pwm value)
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
outs | pinter to the vector that will store the output values |
Implements yarp::dev::IPidControl.
Definition at line 191 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the current reference of the pid controller for a specific joint.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
ref | pointer to storage for return value |
Implements yarp::dev::IPidControl.
Definition at line 249 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the current reference of all pid controllers.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
refs | vector that will store the output. |
Implements yarp::dev::IPidControl.
Definition at line 264 of file ImplementPidControl.cpp.
|
overridevirtual |
Get current pid value for a specific joint.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
pids | vector that will store the values of the pids. |
Implements yarp::dev::IPidControl.
Definition at line 226 of file ImplementPidControl.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. |
Definition at line 34 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the current status (enabled/disabled) of the pid.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
enabled | the current status of the pid controller. |
Implements yarp::dev::IPidControl.
Definition at line 340 of file ImplementPidControl.cpp.
|
overridevirtual |
Reset the controller of a given joint, usually sets the current status of the joint as the reference value for the PID, and resets the integrator.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
Implements yarp::dev::IPidControl.
Definition at line 302 of file ImplementPidControl.cpp.
|
protected |
Definition at line 349 of file ImplementPidControl.cpp.
|
overridevirtual |
Set new pid value for a joint axis.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
pid | new pid value |
Implements yarp::dev::IPidControl.
Definition at line 78 of file ImplementPidControl.cpp.
|
overridevirtual |
Set the error limit for the controller on a specifi joint.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
limit | limit value |
Implements yarp::dev::IPidControl.
Definition at line 127 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the error limit for the controller on all joints.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
limits | pointer to the vector with the new limits |
Implements yarp::dev::IPidControl.
Definition at line 137 of file ImplementPidControl.cpp.
|
overridevirtual |
Set offset value for a given controller.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
v | the offset to be added to the output of the pid controller |
Implements yarp::dev::IPidControl.
Definition at line 329 of file ImplementPidControl.cpp.
|
overridevirtual |
Set the controller reference for a given axis.
Warning this method can result in very large torques and should be used carefully. If you do not understand this warning you should avoid using this method. Have a look at other interfaces (e.g. position control).
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
j | joint number |
ref | new reference point |
Implements yarp::dev::IPidControl.
Definition at line 107 of file ImplementPidControl.cpp.
|
overridevirtual |
Set the controller reference, multiple axes.
Warning this method can result in very large torques and should be used carefully. If you do not understand this warning you should avoid using this method. Have a look at other interfaces (e.g. position control).
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
refs | pointer to the vector that contains the new reference points. |
Implements yarp::dev::IPidControl.
Definition at line 117 of file ImplementPidControl.cpp.
|
overridevirtual |
Set new pid value on multiple axes.
pidtype | the id of the pid that will be affected by the command (e.g. position, velocity etc) |
pids | pointer to a vector of pids |
Implements yarp::dev::IPidControl.
Definition at line 88 of file ImplementPidControl.cpp.
|
protected |
Clean up internal data and memory.
Definition at line 55 of file ImplementPidControl.cpp.
|
protected |
Definition at line 36 of file ImplementPidControl.h.
|
protected |
Definition at line 35 of file ImplementPidControl.h.
|
protected |
Definition at line 34 of file ImplementPidControl.h.
|
protected |
Definition at line 37 of file ImplementPidControl.h.