Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
move_integral_command.hpp
Go to the documentation of this file.
1/*****************************************************************************/
2/********** !!! WARNING: CODE GENERATED BY TAPROOT. DO NOT EDIT !!! **********/
3/*****************************************************************************/
4
5/*
6 * Copyright (c) 2022 Advanced Robotics at the University of Washington <robomstr@uw.edu>
7 *
8 * This file is part of Taproot.
9 *
10 * Taproot is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * Taproot is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with Taproot. If not, see <https://www.gnu.org/licenses/>.
22 */
23
24#ifndef TAPROOT_MOVE_INTEGRAL_COMMAND_HPP_
25#define TAPROOT_MOVE_INTEGRAL_COMMAND_HPP_
26
29
30#include "../interfaces/integrable_setpoint_subsystem.hpp"
31
33{
41{
42public:
63
71 const Config& config);
72
73 const char* getName() const override { return "move integral command"; }
74
75 inline bool isReady() override
76 {
78 }
79
80 void initialize() override;
81
82 void execute() override {}
83
84 void end(bool interrupted) override;
85
86 bool isFinished() const override;
87
88protected:
90
92
94
97 {
98 if (config.targetIntegralChange > 0)
99 {
101 finalTargetIntegralSetpoint - config.integralSetpointTolerance;
102 }
103 else
104 {
106 finalTargetIntegralSetpoint + config.integralSetpointTolerance;
107 }
108 }
109}; // class MoveIntegralCommand
110
111} // namespace tap::control::setpoint
112
113#endif // TAPROOT_MOVE_INTEGRAL_COMMAND_HPP_
Definition command.hpp:44
Definition integrable_setpoint_subsystem.hpp:43
Definition move_integral_command.hpp:41
IntegrableSetpointSubsystem & integrableSetpointSubsystem
Definition move_integral_command.hpp:91
bool isFinished() const override
Definition move_integral_command.cpp:56
void execute() override
Definition move_integral_command.hpp:82
const char * getName() const override
Definition move_integral_command.hpp:73
float finalTargetIntegralSetpoint
Definition move_integral_command.hpp:93
void end(bool interrupted) override
Definition move_integral_command.cpp:54
bool targetIntegralReached() const
Definition move_integral_command.hpp:96
void initialize() override
Definition move_integral_command.cpp:47
bool isReady() override
Definition move_integral_command.hpp:75
Config config
Definition move_integral_command.hpp:89
Definition pwm_info.hpp:4
Definition setpoint_continuous_jam_checker.hpp:36
Definition move_integral_command.hpp:49
float integralSetpointTolerance
Definition move_integral_command.hpp:61
float desiredSetpoint
The desired setpoint in units.
Definition move_integral_command.hpp:54
float targetIntegralChange
Definition move_integral_command.hpp:52