|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
#include <tilt_pid_modder.hpp>


Classes | |
| struct | Config |
Public Member Functions | |
| TiltPidModder (std::unique_ptr< telemetry::IAngularPosition > fieldPitchSensor, const Config &config) | |
| Output | getModdedOutput (const Output &output) override |
Public Member Functions inherited from trap::algorithms::IPidModder< Output > | |
| virtual | ~IPidModder ()=default |
This assumes the head is somewhat balanced.
sine is zero
If the robot's head is tilted backwards, it needs a forward force if the robot's head is tilted forwards, it needs a backwards force
If you do the math it's related to trigonometry
Output needs to be an arithmetic type
WARNING: This assumes that zero is level (no compensation needed)
|
inline |
This needs to provide the angular position relative to gravity.
fieldPitchSensor should be zero when the turret head or balanced object is level.
Tilted down should be a negative angle (if need be, the scalingConstant)
|
inlineoverridevirtual |
Note that this strips the unit protection of the fieldPitchSensor. The scaling constant is coupled to the raw value.
Implements trap::algorithms::IPidModder< Output >.