YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ControlBoardPid.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <yarp/dev/api.h>
10#include <yarp/os/Portable.h>
11#include <string>
12
13#ifndef YARP_DEV_CONTROLBOARDPID_H
14#define YARP_DEV_CONTROLBOARDPID_H
15
20namespace yarp::dev {
21class Pid;
22class PidWithExtraInfo;
24}
25
26
31{
32public:
36 Pid();
37
42
53 Pid(double kp, double kd, double ki, double int_max, double scale, double out_max);
54
68 Pid(double kp, double kd, double ki,
69 double int_max, double scale, double out_max, double st_up, double st_down, double kff);
70
76 void setKp(double p);
77
83 void setKi(double i);
84
90 void setKd(double d);
91
97 void setMaxInt(double m);
98
104 void setScale(double sc);
105
111 void setMaxOut(double m);
112
118 void setOffset(double o);
119
126 void setStictionValues(double up_value, double down_value);
127
133 void setKff(double Kff);
134
140 bool operator==(const yarp::dev::Pid &p) const;
141
146 void clear();
147};
148
150{
151 public:
154
156 {
157 pid = rhs;
158 return *this;
159 }
160
162 {
163 pidExtraInfo = rhs;
164 return *this;
165 }
166};
167
168#endif // YARP_DEV_CONTROLBOARDPID_H
yarp::dev::PidWithExtraInfo & operator=(const yarp::dev::PidExtraInfoData &rhs)
yarp::dev::PidExtraInfoData pidExtraInfo
yarp::dev::PidWithExtraInfo & operator=(const yarp::dev::Pid &rhs)
Contains the parameters for a PID.
void clear()
Set all pid parameters to zero.
void setKp(double p)
Set proportional gain.
~Pid()
Destructor.
Pid()
Default Constructor.
void setMaxOut(double m)
Set max output value for the pid.
void setOffset(double o)
Set offset value for the pid.
void setKi(double i)
Set integrative gain.
void setKff(double Kff)
Set the feedforward gain for the pid.
void setStictionValues(double up_value, double down_value)
Set the two stiction values for the pid.
void setScale(double sc)
Set output scale for the pid.
bool operator==(const yarp::dev::Pid &p) const
return true if all params are equal
void setKd(double d)
Set derivative gain.
void setMaxInt(double m)
Set max threshold for the integrative part.
For streams capable of holding different kinds of content, check what they actually have.
yarp::dev::PidExtraInfoData PidExtraInfo
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18