YARP
Yet Another Robot Platform
ControlBoardWrapperPidControl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERPIDCONTROL_H
10 #define YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERPIDCONTROL_H
11 
12 #include <yarp/dev/IPidControl.h>
13 
15 
17  virtual public ControlBoardWrapperCommon,
19 {
20 public:
21  bool setPid(const yarp::dev::PidControlTypeEnum& pidtype, int j, const yarp::dev::Pid& p) override;
22  bool setPids(const yarp::dev::PidControlTypeEnum& pidtype, const yarp::dev::Pid* ps) override;
23  bool setPidReference(const yarp::dev::PidControlTypeEnum& pidtype, int j, double ref) override;
24  bool setPidReferences(const yarp::dev::PidControlTypeEnum& pidtype, const double* refs) override;
25  bool setPidErrorLimit(const yarp::dev::PidControlTypeEnum& pidtype, int j, double limit) override;
26  bool setPidErrorLimits(const yarp::dev::PidControlTypeEnum& pidtype, const double* limits) override;
27  bool getPidError(const yarp::dev::PidControlTypeEnum& pidtype, int j, double* err) override;
28  bool getPidErrors(const yarp::dev::PidControlTypeEnum& pidtype, double* errs) override;
29  bool getPidOutput(const yarp::dev::PidControlTypeEnum& pidtype, int j, double* out) override;
30  bool getPidOutputs(const yarp::dev::PidControlTypeEnum& pidtype, double* outs) override;
31  bool setPidOffset(const yarp::dev::PidControlTypeEnum& pidtype, int j, double v) override;
32  bool getPid(const yarp::dev::PidControlTypeEnum& pidtype, int j, yarp::dev::Pid* p) override;
33  bool getPids(const yarp::dev::PidControlTypeEnum& pidtype, yarp::dev::Pid* pids) override;
34  bool getPidReference(const yarp::dev::PidControlTypeEnum& pidtype, int j, double* ref) override;
35  bool getPidReferences(const yarp::dev::PidControlTypeEnum& pidtype, double* refs) override;
36  bool getPidErrorLimit(const yarp::dev::PidControlTypeEnum& pidtype, int j, double* limit) override;
37  bool getPidErrorLimits(const yarp::dev::PidControlTypeEnum& pidtype, double* limits) override;
38  bool resetPid(const yarp::dev::PidControlTypeEnum& pidtype, int j) override;
39  bool disablePid(const yarp::dev::PidControlTypeEnum& pidtype, int j) override;
40  bool enablePid(const yarp::dev::PidControlTypeEnum& pidtype, int j) override;
41  bool isPidEnabled(const yarp::dev::PidControlTypeEnum& pidtype, int j, bool* enabled) override;
42 };
43 
44 #endif // YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERPIDCONTROL_H
ControlBoardWrapperPidControl::getPids
bool getPids(const yarp::dev::PidControlTypeEnum &pidtype, yarp::dev::Pid *pids) override
Get current pid value for a specific joint.
Definition: ControlBoardWrapperPidControl.cpp:312
ControlBoardWrapperPidControl
Definition: ControlBoardWrapperPidControl.h:19
ControlBoardWrapperPidControl::setPids
bool setPids(const yarp::dev::PidControlTypeEnum &pidtype, const yarp::dev::Pid *ps) override
Set new pid value on multiple axes.
Definition: ControlBoardWrapperPidControl.cpp:44
ControlBoardWrapperPidControl::getPidError
bool getPidError(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *err) override
Get the current error for a joint.
Definition: ControlBoardWrapperPidControl.cpp:163
ControlBoardWrapperPidControl::setPidErrorLimit
bool setPidErrorLimit(const yarp::dev::PidControlTypeEnum &pidtype, int j, double limit) override
Set the error limit for the controller on a specifi joint.
Definition: ControlBoardWrapperPidControl.cpp:117
ControlBoardWrapperPidControl::getPidReference
bool getPidReference(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *ref) override
Get the current reference of the pid controller for a specific joint.
Definition: ControlBoardWrapperPidControl.cpp:339
ControlBoardWrapperPidControl::setPid
bool setPid(const yarp::dev::PidControlTypeEnum &pidtype, int j, const yarp::dev::Pid &p) override
Set new pid value for a joint axis.
Definition: ControlBoardWrapperPidControl.cpp:17
ControlBoardWrapperPidControl::getPidErrorLimits
bool getPidErrorLimits(const yarp::dev::PidControlTypeEnum &pidtype, double *limits) override
Get the error limit for all controllers.
Definition: ControlBoardWrapperPidControl.cpp:411
ControlBoardWrapperPidControl::setPidReference
bool setPidReference(const yarp::dev::PidControlTypeEnum &pidtype, int j, double ref) override
Set the controller reference for a given axis.
Definition: ControlBoardWrapperPidControl.cpp:67
ControlBoardWrapperPidControl::resetPid
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 ...
Definition: ControlBoardWrapperPidControl.cpp:438
ControlBoardWrapperPidControl::getPidOutputs
bool getPidOutputs(const yarp::dev::PidControlTypeEnum &pidtype, double *outs) override
Get the output of the controllers (e.g.
Definition: ControlBoardWrapperPidControl.cpp:238
ControlBoardWrapperPidControl::setPidOffset
bool setPidOffset(const yarp::dev::PidControlTypeEnum &pidtype, int j, double v) override
Set offset value for a given controller.
Definition: ControlBoardWrapperPidControl.cpp:265
ControlBoardWrapperPidControl::setPidErrorLimits
bool setPidErrorLimits(const yarp::dev::PidControlTypeEnum &pidtype, const double *limits) override
Get the error limit for the controller on all joints.
Definition: ControlBoardWrapperPidControl.cpp:140
ControlBoardWrapperPidControl::setPidReferences
bool setPidReferences(const yarp::dev::PidControlTypeEnum &pidtype, const double *refs) override
Set the controller reference, multiple axes.
Definition: ControlBoardWrapperPidControl.cpp:94
ControlBoardWrapperPidControl::getPidReferences
bool getPidReferences(const yarp::dev::PidControlTypeEnum &pidtype, double *refs) override
Get the current reference of all pid controllers.
Definition: ControlBoardWrapperPidControl.cpp:361
yarp::dev::PidControlTypeEnum
PidControlTypeEnum
Definition: PidEnums.h:21
ControlBoardWrapperCommon.h
ControlBoardWrapperCommon
Definition: ControlBoardWrapperCommon.h:19
ControlBoardWrapperPidControl::enablePid
bool enablePid(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Enable the pid computation for a joint.
Definition: ControlBoardWrapperPidControl.cpp:484
ControlBoardWrapperPidControl::getPidOutput
bool getPidOutput(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *out) override
Get the output of the controller (e.g.
Definition: ControlBoardWrapperPidControl.cpp:214
ControlBoardWrapperPidControl::getPidErrors
bool getPidErrors(const yarp::dev::PidControlTypeEnum &pidtype, double *errs) override
Get the error of all joints.
Definition: ControlBoardWrapperPidControl.cpp:187
ControlBoardWrapperPidControl::isPidEnabled
bool isPidEnabled(const yarp::dev::PidControlTypeEnum &pidtype, int j, bool *enabled) override
Get the current status (enabled/disabled) of the pid.
Definition: ControlBoardWrapperPidControl.cpp:507
IPidControl.h
yarp::dev::IPidControl
Interface for a generic control board device implementing a PID controller, with scaled arguments.
Definition: IPidControl.h:211
ControlBoardWrapperPidControl::disablePid
bool disablePid(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Disable the pid computation for a joint.
Definition: ControlBoardWrapperPidControl.cpp:461
ControlBoardWrapperPidControl::getPid
bool getPid(const yarp::dev::PidControlTypeEnum &pidtype, int j, yarp::dev::Pid *p) override
Get current pid value for a specific joint.
Definition: ControlBoardWrapperPidControl.cpp:288
ControlBoardWrapperPidControl::getPidErrorLimit
bool getPidErrorLimit(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *limit) override
Get the error limit for the controller on a specific joint.
Definition: ControlBoardWrapperPidControl.cpp:388
yarp::dev::Pid
Contains the parameters for a PID.
Definition: ControlBoardPid.h:29