class
AsyncPosPIDController
Contents
Base classes
-
template<typename Input, typename Output>class AsyncWrapper
-
template<typename Input, typename Output>class AsyncPositionController
Constructors, destructors, conversion operators
-
AsyncPosPIDController(const std::shared_ptr<ControllerInput<double>>& iinput,
const std::shared_ptr<ControllerOutput<double>>& ioutput,
const TimeUtil& itimeUtil,
double ikP,
double ikI,
double ikD,
double ikBias = 0,
double iratio = 1,
std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(),
const std::shared_ptr<Logger>& ilogger = Logger::
getDefaultLogger()) - An async position PID controller.
-
AsyncPosPIDController(const std::shared_ptr<OffsetableControllerInput>& iinput,
const std::shared_ptr<ControllerOutput<double>>& ioutput,
const TimeUtil& itimeUtil,
double ikP,
double ikI,
double ikD,
double ikBias = 0,
double iratio = 1,
std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(),
const std::shared_ptr<Logger>& ilogger = Logger::
getDefaultLogger()) - An async position PID controller.
Public functions
- void tarePosition() override
- Sets the "absolute" zero position of the controller to its current position.
- void setMaxVelocity(std::int32_t imaxVelocity) override
- This implementation does not respect the maximum velocity.
-
void setGains(const IterativePosPIDController::
Gains& igains) - Set controller gains.
-
auto getGains() const -> IterativePosPIDController::
Gains - Gets the current gains.
Protected variables
- std::shared_ptr<OffsetableControllerInput> offsettableInput
- std::shared_ptr<IterativePosPIDController> internalController
Function documentation
okapi:: AsyncPosPIDController:: AsyncPosPIDController(const std::shared_ptr<ControllerInput<double>>& iinput,
const std::shared_ptr<ControllerOutput<double>>& ioutput,
const TimeUtil& itimeUtil,
double ikP,
double ikI,
double ikD,
double ikBias = 0,
double iratio = 1,
std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(),
const std::shared_ptr<Logger>& ilogger = Logger:: getDefaultLogger())
An async position PID controller.
Parameters | |
---|---|
iinput | The controller input. Will be turned into an OffsettableControllerInput. |
ioutput | The controller output. |
itimeUtil | The TimeUtil. |
ikP | The proportional gain. |
ikI | The integral gain. |
ikD | The derivative gain. |
ikBias | The controller bias. |
iratio | Any external gear ratio. |
iderivativeFilter | The derivative filter. |
ilogger |
okapi:: AsyncPosPIDController:: AsyncPosPIDController(const std::shared_ptr<OffsetableControllerInput>& iinput,
const std::shared_ptr<ControllerOutput<double>>& ioutput,
const TimeUtil& itimeUtil,
double ikP,
double ikI,
double ikD,
double ikBias = 0,
double iratio = 1,
std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(),
const std::shared_ptr<Logger>& ilogger = Logger:: getDefaultLogger())
An async position PID controller.
Parameters | |
---|---|
iinput | The controller input. |
ioutput | The controller output. |
itimeUtil | The TimeUtil. |
ikP | The proportional gain. |
ikI | The integral gain. |
ikD | The derivative gain. |
ikBias | The controller bias. |
iratio | Any external gear ratio. |
iderivativeFilter | The derivative filter. |
ilogger |
void okapi:: AsyncPosPIDController:: setMaxVelocity(std::int32_t imaxVelocity) override
This implementation does not respect the maximum velocity.
Parameters | |
---|---|
imaxVelocity | Ignored. |
void okapi:: AsyncPosPIDController:: setGains(const IterativePosPIDController:: Gains& igains)
Set controller gains.
Parameters | |
---|---|
igains | The new gains. |
IterativePosPIDController:: Gains okapi:: AsyncPosPIDController:: getGains() const
Gets the current gains.
Returns | The current gains. |
---|