RaidZeroLib
Coroutine robot framework for VEX V5
Toggle main menu visibility
Loading...
Searching...
No Matches
MotorFeedforward.hpp
1
#pragma once
2
#include "RaidZeroLib/api/Units/Units.hpp"
3
4
namespace
rz
{
5
13
class
MotorFeedforward
{
14
public
:
15
using
AngularAcceleration
=
decltype
(
AngularVelocity
{} /
Duration
{});
16
using
VelocityGain
=
decltype
(
Voltage
{} /
AngularVelocity
{});
17
using
AccelerationGain
=
decltype
(
Voltage
{} /
AngularAcceleration
{});
18
19
struct
Gains
{
21
Voltage
staticFriction
{};
22
VelocityGain
velocity
{};
23
AccelerationGain
acceleration
{};
24
};
25
26
explicit
MotorFeedforward
(
Gains
gains) : gains(gains) {}
27
28
[[nodiscard]]
Voltage
compute
(
AngularVelocity
velocity,
29
AngularAcceleration
acceleration =
AngularAcceleration
{})
const
;
30
31
private
:
32
Gains gains;
33
};
34
35
}
// namespace rz
rz::MotorFeedforward::VelocityGain
decltype(Voltage{}/AngularVelocity{}) VelocityGain
Definition
MotorFeedforward.hpp:16
rz::MotorFeedforward::compute
Voltage compute(AngularVelocity velocity, AngularAcceleration acceleration=AngularAcceleration{}) const
rz::MotorFeedforward::AccelerationGain
decltype(Voltage{}/AngularAcceleration{}) AccelerationGain
Definition
MotorFeedforward.hpp:17
rz::MotorFeedforward::MotorFeedforward
MotorFeedforward(Gains gains)
Definition
MotorFeedforward.hpp:26
rz::MotorFeedforward::AngularAcceleration
decltype(AngularVelocity{}/Duration{}) AngularAcceleration
Definition
MotorFeedforward.hpp:15
rz::AngularVelocity
au::QuantityD< au::UnitQuotientT< au::Radians, au::Seconds > > AngularVelocity
Definition
Units.hpp:14
rz::Duration
au::QuantityD< au::Seconds > Duration
Definition
Units.hpp:16
rz::Voltage
au::QuantityD< au::Volts > Voltage
Definition
Units.hpp:15
rz
Definition
DriverControl.hpp:11
rz::MotorFeedforward::Gains
Definition
MotorFeedforward.hpp:19
rz::MotorFeedforward::Gains::velocity
VelocityGain velocity
Definition
MotorFeedforward.hpp:22
rz::MotorFeedforward::Gains::acceleration
AccelerationGain acceleration
Definition
MotorFeedforward.hpp:23
rz::MotorFeedforward::Gains::staticFriction
Voltage staticFriction
The voltage just enough to start moving, applied in the direction of motion.
Definition
MotorFeedforward.hpp:21
RaidZeroLib
api
Control
MotorFeedforward.hpp
Generated by
1.18.0