4#include <units/angle.h>
6#include <units/length.h>
7#include <units/voltage.h>
9#include <wpi/MathExtras.h>
11#include "rmb/motorcontrol/feedforward/Feedforward.h"
19template <
typename DistanceUnit>
67 return kS * wpi::sgn(velocity) + kV * velocity + kA * acceleration;
82 return (maxVoltage - kS - kA * acceleration) / kV;
97 return (-maxVoltage + kS - kA * acceleration) / kV;
110 units::volt_t maxVoltage,
Velocity_t velocity,
112 return (maxVoltage - kS * wpi::sgn(velocity) - kV * velocity) / kA;
125 units::volt_t maxVoltage,
Velocity_t velocity,
164 return kS * wpi::sgn(velocity);
Definition Feedforward.h:15
Definition SimpleFeedforward.h:20
typename Feedforward< DistanceUnit >:: Acceleration_t Acceleration_t
Definition SimpleFeedforward.h:30
units::volt_t calculate(Velocity_t velocity, Distance_t distance=Distance_t(0.0), Acceleration_t acceleration=Acceleration_t(0.0)) const override
Definition SimpleFeedforward.h:65
SimpleFeedforward(Ks_t kS, Kv_t kV, Ka_t kA)
Definition SimpleFeedforward.h:54
typename Feedforward< DistanceUnit >::Ks_t Ks_t
Definition SimpleFeedforward.h:35
Acceleration_t maxAchievableAcceleration(units::volt_t maxVoltage, Velocity_t velocity, Distance_t position=Distance_t(0.0)) const override
Definition SimpleFeedforward.h:109
typename Feedforward< DistanceUnit >::KaUnit KaUnit
Definition SimpleFeedforward.h:41
typename Feedforward< DistanceUnit >::KvUnit KvUnit
Definition SimpleFeedforward.h:37
Velocity_t maxAchievableVelocity(units::volt_t maxVoltage, Acceleration_t acceleration, Distance_t position=Distance_t(0.0)) const override
Definition SimpleFeedforward.h:80
units::volt_t calculateStatic(Velocity_t velocity, Distance_t position=Distance_t(0)) const override
Definition SimpleFeedforward.h:162
Kv_t getVelocityGain() const override
Definition SimpleFeedforward.h:137
Velocity_t minAchievableVelocity(units::volt_t maxVoltage, Acceleration_t acceleration, Distance_t position=Distance_t(0.0)) const override
Definition SimpleFeedforward.h:95
typename Feedforward< DistanceUnit >:: AccelerationUnit AccelerationUnit
Definition SimpleFeedforward.h:28
typename Feedforward< DistanceUnit >:: VelocityUnit VelocityUnit
Definition SimpleFeedforward.h:24
typename Feedforward< DistanceUnit >::KsUnit KsUnit
Definition SimpleFeedforward.h:33
Ka_t getAcclerationGain() const override
Definition SimpleFeedforward.h:146
typename Feedforward< DistanceUnit >::Ka_t Ka_t
Definition SimpleFeedforward.h:43
typename Feedforward< DistanceUnit >:: Velocity_t Velocity_t
Definition SimpleFeedforward.h:26
typename Feedforward< DistanceUnit >:: Distance_t Distance_t
Definition SimpleFeedforward.h:22
typename Feedforward< DistanceUnit >::Kv_t Kv_t
Definition SimpleFeedforward.h:39
Acceleration_t minAchievableAcceleration(units::volt_t maxVoltage, Velocity_t velocity, Distance_t position=Distance_t(0.0)) const override
Definition SimpleFeedforward.h:124
the master namespace of librmb
Definition LogitechGamepad.h:9