#include <yarp/dev/ImplementPidControl.h>
Inheritance diagram for yarp::dev::ImplementPidControl:Public Member Functions | |
| ImplementPidControl (yarp::dev::IPidControlRaw *y) | |
| virtual | ~ImplementPidControl () |
| yarp::dev::ReturnValue | getAvailablePids (int j, std::vector< PidControlTypeEnum > &avail) override |
| Return a list of available pid types mode for the given joint. | |
| yarp::dev::ReturnValue | setPid (const PidControlTypeEnum &pidtype, int j, const Pid &pid) override |
| Set new PID value for a joint axis. | |
| yarp::dev::ReturnValue | setPids (const PidControlTypeEnum &pidtype, const Pid *pids) override |
| Set new PID value on multiple axes. | |
| yarp::dev::ReturnValue | setPidReference (const PidControlTypeEnum &pidtype, int j, double ref) override |
| Set the controller reference for a given axis. | |
| yarp::dev::ReturnValue | setPidReferences (const PidControlTypeEnum &pidtype, const double *refs) override |
| Set the controller reference, multiple axes. | |
| yarp::dev::ReturnValue | setPidErrorLimit (const PidControlTypeEnum &pidtype, int j, double limit) override |
| Set the error limit for the controller on a specific joint. | |
| yarp::dev::ReturnValue | setPidErrorLimits (const PidControlTypeEnum &pidtype, const double *limits) override |
| Get the error limit for the controller on all joints. | |
| yarp::dev::ReturnValue | getPidError (const PidControlTypeEnum &pidtype, int j, double *err) override |
| Get the current error for a joint. | |
| yarp::dev::ReturnValue | getPidErrors (const PidControlTypeEnum &pidtype, double *errs) override |
| Get the error of all joints. | |
| yarp::dev::ReturnValue | getPidOutput (const PidControlTypeEnum &pidtype, int j, double *out) override |
| Get the output of the controller (e.g. | |
| yarp::dev::ReturnValue | getPidOutputs (const PidControlTypeEnum &pidtype, double *outs) override |
| Get the output of the controllers (e.g. | |
| yarp::dev::ReturnValue | getPid (const PidControlTypeEnum &pidtype, int j, Pid *pid) override |
| Get current PID value for a specific joint. | |
| yarp::dev::ReturnValue | getPids (const PidControlTypeEnum &pidtype, Pid *pids) override |
| Get current PID value for a specific joint. | |
| yarp::dev::ReturnValue | getPidReference (const PidControlTypeEnum &pidtype, int j, double *ref) override |
| Get the current reference of the PID controller for a specific joint. | |
| yarp::dev::ReturnValue | getPidReferences (const PidControlTypeEnum &pidtype, double *refs) override |
| Get the current reference of all PID controllers. | |
| yarp::dev::ReturnValue | getPidErrorLimit (const PidControlTypeEnum &pidtype, int j, double *ref) override |
| Get the error limit for the controller on a specific joint. | |
| yarp::dev::ReturnValue | getPidErrorLimits (const PidControlTypeEnum &pidtype, double *refs) override |
| Get the error limit for all controllers. | |
| yarp::dev::ReturnValue | 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. | |
| yarp::dev::ReturnValue | enablePid (const PidControlTypeEnum &pidtype, int j) override |
| Enable the PID computation for a joint. | |
| yarp::dev::ReturnValue | disablePid (const PidControlTypeEnum &pidtype, int j) override |
| Disable the PID computation for a joint. | |
| yarp::dev::ReturnValue | setPidOffset (const PidControlTypeEnum &pidtype, int j, double v) override |
| Set an offset value for a given controller. | |
| yarp::dev::ReturnValue | setPidFeedforward (const PidControlTypeEnum &pidtype, int j, double v) override |
| Set the feedforward value for the specified PID controller. | |
| yarp::dev::ReturnValue | getPidOffset (const PidControlTypeEnum &pidtype, int j, double &v) override |
| Get the currently set offset value for the specified PID controller. | |
| yarp::dev::ReturnValue | getPidFeedforward (const PidControlTypeEnum &pidtype, int j, double &v) override |
| Get the currently set feedforward value for the specified PID controller. | |
| yarp::dev::ReturnValue | isPidEnabled (const PidControlTypeEnum &pidtype, int j, bool &enabled) override |
| Get the current status (enabled/disabled) of the PID. | |
| yarp::dev::ReturnValue | getPidExtraInfo (const PidControlTypeEnum &pidtype, int j, yarp::dev::PidExtraInfo &units) override |
| Get PID extra info and measurement units for a specific joint. | |
| yarp::dev::ReturnValue | getPidExtraInfos (const PidControlTypeEnum &pidtype, std::vector< yarp::dev::PidExtraInfo > &units) override |
| Get PID extra info and measurement units for a specific joint. | |
| void | b () |
Public Member Functions inherited from yarp::dev::IPidControl | |
| virtual | ~IPidControl () |
| Destructor. | |
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. | |
| bool | uninitialize () |
| Clean up internal data and memory. | |
| bool | setConversionUnits (const PidControlTypeEnum &pidtype, const PidFeedbackUnitsEnum fbk_conv_units, const PidOutputUnitsEnum out_conv_units) |
Protected Attributes | |
| IPidControlRaw * | m_iraw =nullptr |
| void * | m_helper =nullptr |
| std::vector< int > | m_buffer_ints |
| std::vector< double > | m_buffer_doubles |
| std::vector< Pid > | m_buffer_pids |
| std::mutex | m_imp_mutex |
Definition at line 22 of file ImplementPidControl.h.
| ImplementPidControl::ImplementPidControl | ( | yarp::dev::IPidControlRaw * | y | ) |
Definition at line 22 of file ImplementPidControl.cpp.
|
virtual |
Definition at line 28 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 363 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 352 of file ImplementPidControl.cpp.
|
overridevirtual |
Return a list of available pid types mode for the given joint.
| j | joint number |
| avail | a vector that will contain the list of available control modes for joint j. |
Implements yarp::dev::IPidControl.
Definition at line 64 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 232 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 158 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 309 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 327 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 175 of file ImplementPidControl.cpp.
|
overridevirtual |
Get PID extra info and measurement units 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 |
| info | the measurement units for the specified PID. |
Implements yarp::dev::IPidControl.
Definition at line 455 of file ImplementPidControl.cpp.
|
overridevirtual |
Get PID extra info and measurement units for a specific joint.
| pidtype | the id of the PID that will be affected by the command (e.g. position, velocity etc) |
| info | vector that will store the info about of the pids. |
Implements yarp::dev::IPidControl.
Definition at line 465 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the currently set feedforward value for the specified PID controller.
| pidtype | the id of the PID that will be affected by the command (e.g. position, velocity etc) |
| j | joint number |
| v | the feedforward value |
Implements yarp::dev::IPidControl.
Definition at line 419 of file ImplementPidControl.cpp.
|
overridevirtual |
Get the currently set offset value for the specified PID 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 value |
Implements yarp::dev::IPidControl.
Definition at line 402 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 189 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 | pointer to the vector that will store the output values |
Implements yarp::dev::IPidControl.
Definition at line 210 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 276 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 294 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 251 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 33 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 436 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 341 of file ImplementPidControl.cpp.
|
protected |
Definition at line 447 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 75 of file ImplementPidControl.cpp.
|
overridevirtual |
Set 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 | limit value |
Implements yarp::dev::IPidControl.
Definition at line 133 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 145 of file ImplementPidControl.cpp.
|
overridevirtual |
Set the feedforward value for the specified PID controller.
This value will be multiplied by the PID feedforward gain.
| pidtype | the id of the PID that will be affected by the command (e.g. position, velocity etc) |
| j | joint number |
| v | the feedforward value |
Implements yarp::dev::IPidControl.
Definition at line 388 of file ImplementPidControl.cpp.
|
overridevirtual |
Set an offset value for a given controller.
The value will added to the output of the PID 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 value |
Implements yarp::dev::IPidControl.
Definition at line 374 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 108 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 120 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 87 of file ImplementPidControl.cpp.
|
protected |
Clean up internal data and memory.
Definition at line 53 of file ImplementPidControl.cpp.
|
protected |
Definition at line 28 of file ImplementPidControl.h.
|
protected |
Definition at line 27 of file ImplementPidControl.h.
|
protected |
Definition at line 29 of file ImplementPidControl.h.
|
protected |
Definition at line 26 of file ImplementPidControl.h.
|
protected |
Definition at line 30 of file ImplementPidControl.h.
|
protected |
Definition at line 25 of file ImplementPidControl.h.