okapi::IterativeControllerFactory class

Contents

Public static functions

static auto posPID(double ikP, double ikI, double ikD, double ikBias = 0, std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(), const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger()) -> IterativePosPIDController
Position PID controller.
static auto velPID(double ikP, double ikD, double ikF = 0, double ikSF = 0, std::unique_ptr<VelMath> ivelMath = VelMathFactory::createPtr(imev5GreenTPR), std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(), const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger()) -> IterativeVelPIDController
Velocity PD controller.
static auto motorVelocity(Motor imotor, double ikP, double ikD, double ikF = 0, double ikSF = 0, std::unique_ptr<VelMath> ivelMath = VelMathFactory::createPtr(imev5GreenTPR), std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(), const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger()) -> IterativeMotorVelocityController
Velocity PD controller that automatically writes to the motor.
static auto motorVelocity(MotorGroup imotor, double ikP, double ikD, double ikF = 0, double ikSF = 0, std::unique_ptr<VelMath> ivelMath = VelMathFactory::createPtr(imev5GreenTPR), std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(), const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger()) -> IterativeMotorVelocityController
Velocity PD controller that automatically writes to the motor.
static auto motorVelocity(Motor imotor, std::shared_ptr<IterativeVelocityController<double, double>> icontroller) -> IterativeMotorVelocityController
Velocity PD controller that automatically writes to the motor.
static auto motorVelocity(MotorGroup imotor, std::shared_ptr<IterativeVelocityController<double, double>> icontroller) -> IterativeMotorVelocityController
Velocity PD controller that automatically writes to the motor.

Function documentation

static IterativePosPIDController okapi::IterativeControllerFactory::posPID(double ikP, double ikI, double ikD, double ikBias = 0, std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(), const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger())

Position PID controller.

Parameters
ikP proportional gain
ikI integral gain
ikD derivative gain
ikBias controller bias (constant offset added to the output)
iderivativeFilter A filter for filtering the derivative term.
ilogger The logger this instance will log to.

static IterativeVelPIDController okapi::IterativeControllerFactory::velPID(double ikP, double ikD, double ikF = 0, double ikSF = 0, std::unique_ptr<VelMath> ivelMath = VelMathFactory::createPtr(imev5GreenTPR), std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(), const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger())

Velocity PD controller.

Parameters
ikP proportional gain
ikD derivative gain
ikF feed-forward gain
ikSF a feed-forward gain to counteract static friction
ivelMath
iderivativeFilter A filter for filtering the derivative term.
ilogger The logger this instance will log to.

static IterativeMotorVelocityController okapi::IterativeControllerFactory::motorVelocity(Motor imotor, double ikP, double ikD, double ikF = 0, double ikSF = 0, std::unique_ptr<VelMath> ivelMath = VelMathFactory::createPtr(imev5GreenTPR), std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(), const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger())

Velocity PD controller that automatically writes to the motor.

Parameters
imotor output motor
ikP proportional gain
ikD derivative gain
ikF feed-forward gain
ikSF a feed-forward gain to counteract static friction
ivelMath The VelMath.
iderivativeFilter A filter for filtering the derivative term.
ilogger The logger this instance will log to.

static IterativeMotorVelocityController okapi::IterativeControllerFactory::motorVelocity(MotorGroup imotor, double ikP, double ikD, double ikF = 0, double ikSF = 0, std::unique_ptr<VelMath> ivelMath = VelMathFactory::createPtr(imev5GreenTPR), std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(), const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger())

Velocity PD controller that automatically writes to the motor.

Parameters
imotor output motor
ikP proportional gain
ikD derivative gain
ikF feed-forward gain
ikSF a feed-forward gain to counteract static friction
ivelMath The VelMath.
iderivativeFilter A filter for filtering the derivative term.
ilogger The logger this instance will log to.

static IterativeMotorVelocityController okapi::IterativeControllerFactory::motorVelocity(Motor imotor, std::shared_ptr<IterativeVelocityController<double, double>> icontroller)

Velocity PD controller that automatically writes to the motor.

Parameters
imotor output motor
icontroller controller to use

static IterativeMotorVelocityController okapi::IterativeControllerFactory::motorVelocity(MotorGroup imotor, std::shared_ptr<IterativeVelocityController<double, double>> icontroller)

Velocity PD controller that automatically writes to the motor.

Parameters
imotor output motor
icontroller controller to use