LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
asyncVelPidController.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
14#include <memory>
15
16namespace okapi {
17class AsyncVelPIDController : public AsyncWrapper<double, double>,
18 public AsyncVelocityController<double, double> {
19 public:
35 const std::shared_ptr<ControllerInput<double>> &iinput,
36 const std::shared_ptr<ControllerOutput<double>> &ioutput,
37 const TimeUtil &itimeUtil,
38 double ikP,
39 double ikD,
40 double ikF,
41 double ikSF,
42 std::unique_ptr<VelMath> ivelMath,
43 double iratio = 1,
44 std::unique_ptr<Filter> iderivativeFilter = std::make_unique<PassthroughFilter>(),
45 const std::shared_ptr<Logger> &ilogger = Logger::getDefaultLogger());
46
53
60
61 protected:
62 std::shared_ptr<IterativeVelPIDController> internalController;
63};
64} // namespace okapi
void setGains(const IterativeVelPIDController::Gains &igains)
Set controller gains.
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.
std::shared_ptr< IterativeVelPIDController > internalController
IterativeVelPIDController::Gains getGains() const
Gets the current gains.
static std::shared_ptr< Logger > getDefaultLogger()
Utility class for holding an AbstractTimer, AbstractRate, and SettledUtil together in one class since...
Definition timeUtil.hpp:18