okapi::AsyncVelPIDController class

Base classes

template<typename Input, typename Output>
class AsyncWrapper
template<typename Input, typename Output>
class AsyncVelocityController

Constructors, destructors, conversion operators

AsyncVelPIDController(const std::shared_ptr<ControllerInput<double>>& iinput, const std::shared_ptr<ControllerOutput<double>>& ioutput, const TimeUtil& itimeUtil, double ikP, double ikD, double ikF, double ikSF, std::unique_ptr<VelMath> ivelMath, double iratio = 1, std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(), const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger())
An async velocity PID controller.

Public functions

void setGains(const IterativeVelPIDController::Gains& igains)
Set controller gains.
auto getGains() const -> IterativeVelPIDController::Gains
Gets the current gains.

Protected variables

std::shared_ptr<IterativeVelPIDController> internalController

Function documentation

okapi::AsyncVelPIDController::AsyncVelPIDController(const std::shared_ptr<ControllerInput<double>>& iinput, const std::shared_ptr<ControllerOutput<double>>& ioutput, const TimeUtil& itimeUtil, double ikP, double ikD, double ikF, double ikSF, std::unique_ptr<VelMath> ivelMath, double iratio = 1, std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(), const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger())

An async velocity PID controller.

Parameters
iinput The controller input.
ioutput The controller output.
itimeUtil The TimeUtil.
ikP The proportional gain.
ikD The derivative gain.
ikF The feed-forward gain.
ikSF A feed-forward gain to counteract static friction.
ivelMath The VelMath used for calculating velocity.
iratio Any external gear ratio.
iderivativeFilter The derivative filter.
ilogger

void okapi::AsyncVelPIDController::setGains(const IterativeVelPIDController::Gains& igains)

Set controller gains.

Parameters
igains The new gains.

IterativeVelPIDController::Gains okapi::AsyncVelPIDController::getGains() const

Gets the current gains.

Returns The current gains.