YARP
Yet Another Robot Platform
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. More...
 
virtual bool setPid (const PidControlTypeEnum &pidtype, int j, const Pid &pid)=0
 Set new pid value for a joint axis. More...
 
virtual bool setPids (const PidControlTypeEnum &pidtype, const Pid *pids)=0
 Set new pid value on multiple axes. More...
 
virtual bool setPidReference (const PidControlTypeEnum &pidtype, int j, double ref)=0
 Set the controller reference for a given axis. More...
 
virtual bool setPidReferences (const PidControlTypeEnum &pidtype, const double *refs)=0
 Set the controller reference, multiple axes. More...
 
virtual bool setPidErrorLimit (const PidControlTypeEnum &pidtype, int j, double limit)=0
 Set the error limit for the controller on a specifi joint. More...
 
virtual bool setPidErrorLimits (const PidControlTypeEnum &pidtype, const double *limits)=0
 Get the error limit for the controller on all joints. More...
 
virtual bool getPidError (const PidControlTypeEnum &pidtype, int j, double *err)=0
 Get the current error for a joint. More...
 
virtual bool getPidErrors (const PidControlTypeEnum &pidtype, double *errs)=0
 Get the error of all joints. More...
 
virtual bool getPidOutput (const PidControlTypeEnum &pidtype, int j, double *out)=0
 Get the output of the controller (e.g. More...
 
virtual bool getPidOutputs (const PidControlTypeEnum &pidtype, double *outs)=0
 Get the output of the controllers (e.g. More...
 
virtual bool getPid (const PidControlTypeEnum &pidtype, int j, Pid *pid)=0
 Get current pid value for a specific joint. More...
 
virtual bool getPids (const PidControlTypeEnum &pidtype, Pid *pids)=0
 Get current pid value for a specific joint. More...
 
virtual bool getPidReference (const PidControlTypeEnum &pidtype, int j, double *ref)=0
 Get the current reference of the pid controller for a specific joint. More...
 
virtual bool getPidReferences (const PidControlTypeEnum &pidtype, double *refs)=0
 Get the current reference of all pid controllers. More...
 
virtual bool getPidErrorLimit (const PidControlTypeEnum &pidtype, int j, double *limit)=0
 Get the error limit for the controller on a specific joint. More...
 
virtual bool getPidErrorLimits (const PidControlTypeEnum &pidtype, double *limits)=0
 Get the error limit for all controllers. More...
 
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 value for the PID, and resets the integrator. More...
 
virtual bool disablePid (const PidControlTypeEnum &pidtype, int j)=0
 Disable the pid computation for a joint. More...
 
virtual bool enablePid (const PidControlTypeEnum &pidtype, int j)=0
 Enable the pid computation for a joint. More...
 
virtual bool setPidOffset (const PidControlTypeEnum &pidtype, int j, double v)=0
 Set offset value for a given controller. More...
 
virtual bool isPidEnabled (const PidControlTypeEnum &pidtype, int j, bool *enabled)=0
 Get the current status (enabled/disabled) of the pid. More...
 

Detailed Description

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

Definition at line 210 of file IPidControl.h.

Constructor & Destructor Documentation

◆ ~IPidControl()

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

Destructor.

Definition at line 216 of file IPidControl.h.

Member Function Documentation

◆ disablePid()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ enablePid()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ getPid()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ getPidError()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ getPidErrorLimit()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ getPidErrorLimits()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ getPidErrors()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ getPidOutput()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ getPidOutputs()

virtual bool 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)
outspinter to the vector that will store the output values

Implemented in ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ getPidReference()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ getPidReferences()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ getPids()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ isPidEnabled()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ resetPid()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ setPid()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ setPidErrorLimit()

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

Set the error limit for the controller on a specifi 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ setPidErrorLimits()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ setPidOffset()

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

Set offset value for a given controller.

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

Implemented in ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ setPidReference()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ setPidReferences()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.

◆ setPids()

virtual bool 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 ControlBoardWrapperPidControl, ControlBoardRemapper, yarp::dev::ImplementPidControl, and RemoteControlBoard.


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