4#include <units/angle.h>
7#include <units/voltage.h>
9#include <wpi/MathExtras.h>
11#include "rmb/motorcontrol/feedforward/Feedforward.h"
53 : kS(kS), kCos(kCos), kV(kV), kA(kA){};
65 return kS * wpi::sgn(velocity) + kCos * units::math::cos(position) +
66 kV * velocity + kA * acceleration;
81 return (maxVoltage - kS - kCos * units::math::cos(position) -
98 return (-maxVoltage + kS - kCos * units::math::cos(position) -
115 return (maxVoltage - kS * wpi::sgn(velocity) -
116 kCos * units::math::cos(position) - kV * velocity) /
169 return kS * wpi::sgn(velocity) + kCos * units::math::cos(position);
Definition ArmFeedforward.h:19
ArmFeedforward(Ks_t kS, Ks_t kCos, Kv_t kV, Ka_t kA)
Definition ArmFeedforward.h:52
typename Feedforward< units::radians >::Ka_t Ka_t
Definition ArmFeedforward.h:42
Acceleration_t maxAchievableAcceleration(units::volt_t maxVoltage, Velocity_t velocity, Distance_t position) const override
Definition ArmFeedforward.h:113
typename Feedforward< units::radians >::Ks_t Ks_t
Definition ArmFeedforward.h:34
typename Feedforward< units::radians >:: Acceleration_t Acceleration_t
Definition ArmFeedforward.h:29
typename Feedforward< units::radians >:: Velocity_t Velocity_t
Definition ArmFeedforward.h:25
Velocity_t maxAchievableVelocity(units::volt_t maxVoltage, Acceleration_t acceleration, Distance_t position) const override
Definition ArmFeedforward.h:78
Velocity_t minAchievableVelocity(units::volt_t maxVoltage, Acceleration_t acceleration, Distance_t position) const override
Definition ArmFeedforward.h:95
typename Feedforward< units::radians >::Kv_t Kv_t
Definition ArmFeedforward.h:38
typename Feedforward< units::radians >::KvUnit KvUnit
Definition ArmFeedforward.h:36
typename Feedforward< units::radians >::KaUnit KaUnit
Definition ArmFeedforward.h:40
typename Feedforward< units::radians >:: Distance_t Distance_t
Definition ArmFeedforward.h:21
units::volt_t calculateStatic(Velocity_t velocity, Distance_t position=Distance_t(0)) const override
Definition ArmFeedforward.h:167
Kv_t getVelocityGain() const override
Definition ArmFeedforward.h:142
Ka_t getAcclerationGain() const override
Definition ArmFeedforward.h:151
typename Feedforward< units::radians >::KsUnit KsUnit
Definition ArmFeedforward.h:32
units::volt_t calculate(Velocity_t velocity, Distance_t position, Acceleration_t acceleration) const override
Definition ArmFeedforward.h:63
typename Feedforward< units::radians >:: VelocityUnit VelocityUnit
Definition ArmFeedforward.h:23
Acceleration_t minAchievableAcceleration(units::volt_t maxVoltage, Velocity_t velocity, Distance_t position) const override
Definition ArmFeedforward.h:130
typename Feedforward< units::radians >:: AccelerationUnit AccelerationUnit
Definition ArmFeedforward.h:27
Definition Feedforward.h:15
the master namespace of librmb
Definition LogitechGamepad.h:9