LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
iterativeControllerFactory.hpp
Go to the documentation of this file.
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 */
6#pragma once
7
15
16namespace okapi {
18 public:
30 posPID(double ikP,
31 double ikI,
32 double ikD,
33 double ikBias = 0,
34 std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(),
35 const std::shared_ptr<Logger> &ilogger = Logger::getDefaultLogger());
36
48 velPID(double ikP,
49 double ikD,
50 double ikF = 0,
51 double ikSF = 0,
52 std::unique_ptr<VelMath> ivelMath = VelMathFactory::createPtr(imev5GreenTPR),
53 std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(),
54 const std::shared_ptr<Logger> &ilogger = Logger::getDefaultLogger());
55
70 double ikP,
71 double ikD,
72 double ikF = 0,
73 double ikSF = 0,
74 std::unique_ptr<VelMath> ivelMath = VelMathFactory::createPtr(imev5GreenTPR),
75 std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(),
76 const std::shared_ptr<Logger> &ilogger = Logger::getDefaultLogger());
77
92 double ikP,
93 double ikD,
94 double ikF = 0,
95 double ikSF = 0,
96 std::unique_ptr<VelMath> ivelMath = VelMathFactory::createPtr(imev5GreenTPR),
97 std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(),
98 const std::shared_ptr<Logger> &ilogger = Logger::getDefaultLogger());
99
108 std::shared_ptr<IterativeVelocityController<double, double>> icontroller);
109
118 std::shared_ptr<IterativeVelocityController<double, double>> icontroller);
119};
120} // namespace okapi
static IterativeMotorVelocityController motorVelocity(Motor imotor, std::shared_ptr< IterativeVelocityController< double, double > > icontroller)
Velocity PD controller that automatically writes to the motor.
static IterativePosPIDController 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.
static IterativeMotorVelocityController 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.
static IterativeVelPIDController 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.
static IterativeMotorVelocityController motorVelocity(MotorGroup imotor, std::shared_ptr< IterativeVelocityController< double, double > > icontroller)
Velocity PD controller that automatically writes to the motor.
static IterativeMotorVelocityController 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.
static std::shared_ptr< Logger > getDefaultLogger()
static std::unique_ptr< VelMath > createPtr(double iticksPerRev, QTime isampleTime=0_ms, const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger())
Velocity math helper.
static constexpr std::int32_t imev5GreenTPR
The ticks per rotation of the V5 motor with a green gearset.
Definition mathUtil.hpp:63