YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::dev::IPidControl Class Referenceabstract

Interface for a generic control board device implementing a PID controller, with scaled arguments. More...

#include <yarp/dev/IPidControl.h>

+ Inheritance diagram for yarp::dev::IPidControl:

Public Member Functions

virtual ~IPidControl ()
 Destructor.
 
virtual yarp::dev::ReturnValue getAvailablePids (int j, std::vector< PidControlTypeEnum > &avail)=0
 Return a list of available pid types mode for the given joint.
 
virtual yarp::dev::ReturnValue setPid (const PidControlTypeEnum &pidtype, int j, const Pid &pid)=0
 Set new PID value for a joint axis.
 
virtual yarp::dev::ReturnValue setPids (const PidControlTypeEnum &pidtype, const Pid *pids)=0
 Set new PID value on multiple axes.
 
virtual yarp::dev::ReturnValue setPidReference (const PidControlTypeEnum &pidtype, int j, double ref)=0
 Set the controller reference for a given axis.
 
virtual yarp::dev::ReturnValue setPidReferences (const PidControlTypeEnum &pidtype, const double *refs)=0
 Set the controller reference, multiple axes.
 
virtual yarp::dev::ReturnValue setPidErrorLimit (const PidControlTypeEnum &pidtype, int j, double limit)=0
 Set the error limit for the controller on a specific joint.
 
virtual yarp::dev::ReturnValue setPidErrorLimits (const PidControlTypeEnum &pidtype, const double *limits)=0
 Get the error limit for the controller on all joints.
 
virtual yarp::dev::ReturnValue getPidError (const PidControlTypeEnum &pidtype, int j, double *err)=0
 Get the current error for a joint.
 
virtual yarp::dev::ReturnValue getPidErrors (const PidControlTypeEnum &pidtype, double *errs)=0
 Get the error of all joints.
 
virtual yarp::dev::ReturnValue getPidOutput (const PidControlTypeEnum &pidtype, int j, double *out)=0
 Get the output of the controller (e.g.
 
virtual yarp::dev::ReturnValue getPidOutputs (const PidControlTypeEnum &pidtype, double *outs)=0
 Get the output of the controllers (e.g.
 
virtual yarp::dev::ReturnValue getPid (const PidControlTypeEnum &pidtype, int j, Pid *pid)=0
 Get current PID value for a specific joint.
 
virtual yarp::dev::ReturnValue getPids (const PidControlTypeEnum &pidtype, Pid *pids)=0
 Get current PID value for a specific joint.
 
virtual yarp::dev::ReturnValue getPidExtraInfo (const PidControlTypeEnum &pidtype, int j, yarp::dev::PidExtraInfo &info)=0
 Get PID extra info and measurement units for a specific joint.
 
virtual yarp::dev::ReturnValue getPidExtraInfos (const PidControlTypeEnum &pidtype, std::vector< yarp::dev::PidExtraInfo > &info)=0
 Get PID extra info and measurement units for a specific joint.
 
virtual yarp::dev::ReturnValue getPidReference (const PidControlTypeEnum &pidtype, int j, double *ref)=0
 Get the current reference of the PID controller for a specific joint.
 
virtual yarp::dev::ReturnValue getPidReferences (const PidControlTypeEnum &pidtype, double *refs)=0
 Get the current reference of all PID controllers.
 
virtual yarp::dev::ReturnValue getPidErrorLimit (const PidControlTypeEnum &pidtype, int j, double *limit)=0
 Get the error limit for the controller on a specific joint.
 
virtual yarp::dev::ReturnValue getPidErrorLimits (const PidControlTypeEnum &pidtype, double *limits)=0
 Get the error limit for all controllers.
 
virtual yarp::dev::ReturnValue 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 value for the PID, and resets the integrator.
 
virtual yarp::dev::ReturnValue disablePid (const PidControlTypeEnum &pidtype, int j)=0
 Disable the PID computation for a joint.
 
virtual yarp::dev::ReturnValue enablePid (const PidControlTypeEnum &pidtype, int j)=0
 Enable the PID computation for a joint.
 
virtual yarp::dev::ReturnValue setPidOffset (const PidControlTypeEnum &pidtype, int j, double v)=0
 Set an offset value for a given controller.
 
virtual yarp::dev::ReturnValue setPidFeedforward (const PidControlTypeEnum &pidtype, int j, double v)=0
 Set the feedforward value for the specified PID controller.
 
virtual yarp::dev::ReturnValue getPidOffset (const PidControlTypeEnum &pidtype, int j, double &v)=0
 Get the currently set offset value for the specified PID controller.
 
virtual yarp::dev::ReturnValue getPidFeedforward (const PidControlTypeEnum &pidtype, int j, double &v)=0
 Get the currently set feedforward value for the specified PID controller.
 
virtual yarp::dev::ReturnValue isPidEnabled (const PidControlTypeEnum &pidtype, int j, bool &enabled)=0
 Get the current status (enabled/disabled) of the PID.
 

Detailed Description

Interface for a generic control board device implementing a PID controller, with scaled arguments.

Definition at line 256 of file IPidControl.h.

Constructor & Destructor Documentation

◆ ~IPidControl()

virtual yarp::dev::IPidControl::~IPidControl ( )
inlinevirtual

Destructor.

Definition at line 262 of file IPidControl.h.

Member Function Documentation

◆ disablePid()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::disablePid ( const PidControlTypeEnum &  pidtype,
int  j 
)
pure virtual

Disable the PID computation for a joint.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
Returns
true on success, false on failure.

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ enablePid()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::enablePid ( const PidControlTypeEnum &  pidtype,
int  j 
)
pure virtual

Enable the PID computation for a joint.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
Returns
true on success, false on failure.

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getAvailablePids()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getAvailablePids ( int  j,
std::vector< PidControlTypeEnum > &  avail 
)
pure virtual

Return a list of available pid types mode for the given joint.

Parameters
jjoint number
availa vector that will contain the list of available control modes for joint j.
Returns
true/false on success/failure

Implemented in yarp::dev::ImplementPidControl, ControlBoardRemappingEngine, and ControlBoard_nwc_yarp.

◆ getPid()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPid ( const PidControlTypeEnum &  pidtype,
int  j,
Pid *  pid 
)
pure virtual

Get current PID value for a specific joint.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
pidpointer to storage for the return value.
Returns
success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getPidError()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidError ( const PidControlTypeEnum &  pidtype,
int  j,
double *  err 
)
pure virtual

Get the current error for a joint.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
errpointer to the storage for the return value
Returns
true/false on success failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getPidErrorLimit()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidErrorLimit ( const PidControlTypeEnum &  pidtype,
int  j,
double *  limit 
)
pure virtual

Get the error limit for the controller on a specific joint.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
limitpointer to storage
Returns
success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getPidErrorLimits()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidErrorLimits ( const PidControlTypeEnum &  pidtype,
double *  limits 
)
pure virtual

Get the error limit for all controllers.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
limitspointer to the array that will store the output
Returns
success or failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getPidErrors()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidErrors ( const PidControlTypeEnum &  pidtype,
double *  errs 
)
pure virtual

Get the error of all joints.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
errspointer to the vector that will store the errors

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getPidExtraInfo()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidExtraInfo ( const PidControlTypeEnum &  pidtype,
int  j,
yarp::dev::PidExtraInfo &  info 
)
pure virtual

Get PID extra info and measurement units for a specific joint.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
infothe measurement units for the specified PID.
Returns
success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, and ControlBoardRemappingEngine.

◆ getPidExtraInfos()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidExtraInfos ( const PidControlTypeEnum &  pidtype,
std::vector< yarp::dev::PidExtraInfo > &  info 
)
pure virtual

Get PID extra info and measurement units for a specific joint.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
infovector that will store the info about of the pids.
Returns
success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, and ControlBoardRemappingEngine.

◆ getPidFeedforward()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidFeedforward ( const PidControlTypeEnum &  pidtype,
int  j,
double &  v 
)
pure virtual

Get the currently set feedforward value for the specified PID controller.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
vthe feedforward value
Returns
true on success, false on failure.

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, and ControlBoardRemappingEngine.

◆ getPidOffset()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidOffset ( const PidControlTypeEnum &  pidtype,
int  j,
double &  v 
)
pure virtual

Get the currently set offset value for the specified PID controller.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
vthe offset value
Returns
true on success, false on failure.

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, and ControlBoardRemappingEngine.

◆ getPidOutput()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidOutput ( const PidControlTypeEnum &  pidtype,
int  j,
double *  out 
)
pure virtual

Get the output of the controller (e.g.

pwm value)

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
outpointer to storage for return value
Returns
success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getPidOutputs()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidOutputs ( const PidControlTypeEnum &  pidtype,
double *  outs 
)
pure virtual

Get the output of the controllers (e.g.

pwm value)

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
outspointer to the vector that will store the output values

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getPidReference()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidReference ( const PidControlTypeEnum &  pidtype,
int  j,
double *  ref 
)
pure virtual

Get the current reference of the PID controller for a specific joint.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
refpointer to storage for return value
Returns
reference value

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getPidReferences()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPidReferences ( const PidControlTypeEnum &  pidtype,
double *  refs 
)
pure virtual

Get the current reference of all PID controllers.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
refsvector that will store the output.

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getPids()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::getPids ( const PidControlTypeEnum &  pidtype,
Pid *  pids 
)
pure virtual

Get current PID value for a specific joint.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
pidsvector that will store the values of the pids.
Returns
success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ isPidEnabled()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::isPidEnabled ( const PidControlTypeEnum &  pidtype,
int  j,
bool &  enabled 
)
pure virtual

Get the current status (enabled/disabled) of the PID.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
enabledthe current status of the PID controller.
Returns
true on success, false on failure.

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, and ControlBoardRemappingEngine.

◆ resetPid()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::resetPid ( const PidControlTypeEnum &  pidtype,
int  j 
)
pure virtual

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.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
Returns
true on success, false on failure.

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ setPid()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::setPid ( const PidControlTypeEnum &  pidtype,
int  j,
const Pid &  pid 
)
pure virtual

Set new PID value for a joint axis.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
pidnew PID value
Returns
true/false on success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ setPidErrorLimit()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::setPidErrorLimit ( const PidControlTypeEnum &  pidtype,
int  j,
double  limit 
)
pure virtual

Set the error limit for the controller on a specific joint.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
limitlimit value
Returns
true/false on success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ setPidErrorLimits()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::setPidErrorLimits ( const PidControlTypeEnum &  pidtype,
const double *  limits 
)
pure virtual

Get the error limit for the controller on all joints.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
limitspointer to the vector with the new limits
Returns
true/false on success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ setPidFeedforward()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::setPidFeedforward ( const PidControlTypeEnum &  pidtype,
int  j,
double  v 
)
pure virtual

Set the feedforward value for the specified PID controller.

This value will be multiplied by the PID feedforward gain.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
vthe feedforward value
Returns
true on success, false on failure.

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, and ControlBoardRemappingEngine.

◆ setPidOffset()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::setPidOffset ( const PidControlTypeEnum &  pidtype,
int  j,
double  v 
)
pure virtual

Set an offset value for a given controller.

The value will added to the output of the PID controller

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
vthe offset value
Returns
true on success, false on failure.

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ setPidReference()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::setPidReference ( const PidControlTypeEnum &  pidtype,
int  j,
double  ref 
)
pure virtual

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).

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
jjoint number
refnew reference point
Returns
true/false upon success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ setPidReferences()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::setPidReferences ( const PidControlTypeEnum &  pidtype,
const double *  refs 
)
pure virtual

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).

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
refspointer to the vector that contains the new reference points.
Returns
true/false upon success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ setPids()

virtual yarp::dev::ReturnValue yarp::dev::IPidControl::setPids ( const PidControlTypeEnum &  pidtype,
const Pid *  pids 
)
pure virtual

Set new PID value on multiple axes.

Parameters
pidtypethe id of the PID that will be affected by the command (e.g. position, velocity etc)
pidspointer to a vector of pids
Returns
true/false upon success/failure

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPidControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.


The documentation for this class was generated from the following file: