Go to the documentation of this file.
25 #ifndef SRC_CONTROLLERS_INCLUDE_CORBO_CONTROLLERS_PID_CONTROLLER_H_
26 #define SRC_CONTROLLERS_INCLUDE_CORBO_CONTROLLERS_PID_CONTROLLER_H_
46 class PidController :
public ControllerInterface
63 Ptr getInstance()
const override {
return std::make_shared<PidController>(); }
86 bool step(
const StateVector&
x, ReferenceTrajectoryInterface& xref, ReferenceTrajectoryInterface& uref,
const Duration& dt,
const Time& t,
88 ReferenceTrajectoryInterface* sref =
nullptr, ReferenceTrajectoryInterface* xinit =
nullptr,
89 ReferenceTrajectoryInterface* uinit =
nullptr,
const std::string& ns =
"")
override;
92 void getAvailableSignals(SignalTargetInterface& signal_target,
const std::string& ns =
"")
const override;
96 #ifdef MESSAGE_SUPPORT
98 void toMessage(corbo::messages::Controller& message)
const override;
100 void fromMessage(
const corbo::messages::Controller& message, std::stringstream* issues =
nullptr)
override;
130 #endif // SRC_CONTROLLERS_INCLUDE_CORBO_CONTROLLERS_PID_CONTROLLER_H_
void setGainP(double p_gain)
Set proportional gain.
void setGainI(double i_gain)
void publishError(bool active)
Specify whether the control error should be published via signal.
void getAvailableSignals(SignalTargetInterface &signal_target, const std::string &ns="") const override
Retrieve available signals from the controller.
std::vector< double > _i_error
bool hasPiecewiseConstantControls() const override
Return true if the controller returns piecewise constant control pieces.
bool providesFutureStates() const override
void setGainD(double d_gain)
std::vector< double > _p_error
static Ptr getInstanceStatic()
Return a newly created shared instance of the implemented class (static method)
const double & getGainP() const
ControllerStatistics::Ptr getStatistics() const override
bool providesFutureControls() const override
std::shared_ptr< ControllerInterface > Ptr
void reset() override
Reset internal controller state and caches.
Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
std::shared_ptr< ControllerStatistics > Ptr
int getStateDimension() const override
Return the dimension of the required plant state/output.
int getControlInputDimension() const override
Return the control input dimension.
Eigen::VectorXd StateVector
const double & getGainI() const
Set integral gain.
std::shared_ptr< TimeSeries > Ptr
std::vector< double > _d_error
bool step(const StateVector &x, ReferenceTrajectoryInterface &xref, ReferenceTrajectoryInterface &uref, const Duration &dt, const Time &t, TimeSeries::Ptr u_sequence, TimeSeries::Ptr x_sequence, SignalTargetInterface *signal_target=nullptr, ReferenceTrajectoryInterface *sref=nullptr, ReferenceTrajectoryInterface *xinit=nullptr, ReferenceTrajectoryInterface *uinit=nullptr, const std::string &ns="") override
void setNumParallelPid(int num_parallel_pid)
const double & getGainD() const
Set differential gain.
#define FACTORY_REGISTER_CONTROLLER(type)
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:06:03