24 template <
typename Distance>
28 template <
typename Distance>
44 units::kilogram_t mass,
45 units::meter_t radius,
double G);
58 DCMotor motor, units::kilogram_square_meter_t J,
double G);
80 std::is_same_v<units::meter, Distance> ||
81 std::is_same_v<units::radian, Distance>>>
85 if (kV <=
decltype(kV){0}) {
86 throw std::domain_error(
"Kv must be greater than zero.");
88 if (kA <=
decltype(kA){0}) {
89 throw std::domain_error(
"Ka must be greater than zero.");
121 std::is_same_v<units::meter, Distance> ||
122 std::is_same_v<units::radian, Distance>>>
126 if (kV <=
decltype(kV){0}) {
127 throw std::domain_error(
"Kv must be greater than zero.");
129 if (kA <=
decltype(kA){0}) {
130 throw std::domain_error(
"Ka must be greater than zero.");
133 Matrixd<2, 2> A{{0.0, 1.0}, {0.0, -kV.value() / kA.value()}};
162 decltype(1_V / 1_mps) kVLinear,
decltype(1_V / 1_mps_sq) kALinear,
163 decltype(1_V / 1_mps) kVAngular,
decltype(1_V / 1_mps_sq) kAAngular);
189 decltype(1_V / 1_mps) kVLinear,
decltype(1_V / 1_mps_sq) kALinear,
190 decltype(1_V / 1_rad_per_s) kVAngular,
191 decltype(1_V / 1_rad_per_s_sq) kAAngular, units::meter_t trackwidth);
204 units::kilogram_square_meter_t J,
218 units::kilogram_square_meter_t J,
236 const DCMotor& motor, units::kilogram_t mass, units::meter_t r,
237 units::meter_t rb, units::kilogram_square_meter_t J,
double G);
#define WPILIB_DLLEXPORT
Definition: SymbolExports.h:36
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
Holds the constants for a DC motor.
Definition: DCMotor.h:20
A plant defined using state-space notation.
Definition: LinearSystem.h:31
Definition: LinearSystemId.h:22
static LinearSystem< 2, 1, 1 > ElevatorSystem(DCMotor motor, units::kilogram_t mass, units::meter_t radius, double G)
Create a state-space model of the elevator system.
static LinearSystem< 1, 1, 1 > IdentifyVelocitySystem(decltype(1_V/Velocity_t< Distance >(1)) kV, decltype(1_V/Acceleration_t< Distance >(1)) kA)
Create a state-space model for a 1 DOF velocity system from its kV (volts/(unit/sec)) and kA (volts/(...
Definition: LinearSystemId.h:82
static LinearSystem< 2, 1, 2 > DCMotorSystem(DCMotor motor, units::kilogram_square_meter_t J, double G)
Create a state-space model of a DC motor system.
static LinearSystem< 2, 1, 1 > SingleJointedArmSystem(DCMotor motor, units::kilogram_square_meter_t J, double G)
Create a state-space model of a single-jointed arm system.The states of the system are [angle,...
static LinearSystem< 2, 1, 1 > IdentifyPositionSystem(decltype(1_V/Velocity_t< Distance >(1)) kV, decltype(1_V/Acceleration_t< Distance >(1)) kA)
Create a state-space model for a 1 DOF position system from its kV (volts/(unit/sec)) and kA (volts/(...
Definition: LinearSystemId.h:123
static LinearSystem< 2, 2, 2 > IdentifyDrivetrainSystem(decltype(1_V/1_mps) kVLinear, decltype(1_V/1_mps_sq) kALinear, decltype(1_V/1_rad_per_s) kVAngular, decltype(1_V/1_rad_per_s_sq) kAAngular, units::meter_t trackwidth)
Identify a differential drive drivetrain given the drivetrain's kV and kA in both linear {(volts/(met...
static LinearSystem< 2, 2, 2 > DrivetrainVelocitySystem(const DCMotor &motor, units::kilogram_t mass, units::meter_t r, units::meter_t rb, units::kilogram_square_meter_t J, double G)
Create a state-space model of differential drive drivetrain.
static LinearSystem< 1, 1, 1 > FlywheelSystem(DCMotor motor, units::kilogram_square_meter_t J, double G)
Create a state-space model of a flywheel system, the states of the system are [angular velocity],...
static LinearSystem< 2, 2, 2 > IdentifyDrivetrainSystem(decltype(1_V/1_mps) kVLinear, decltype(1_V/1_mps_sq) kALinear, decltype(1_V/1_mps) kVAngular, decltype(1_V/1_mps_sq) kAAngular)
Identify a differential drive drivetrain given the drivetrain's kV and kA in both linear {(volts/(met...
Container for values which represent quantities of a given unit.
Definition: base.h:1926
typename std::enable_if< B, T >::type enable_if_t
Definition: core.h:298
typename units::detail::inverse_impl< U >::type inverse
represents the inverse unit type of class U.
Definition: base.h:1134
typename units::detail::compound_impl< U, Us... >::type compound_unit
Represents a unit type made up from other units.
Definition: base.h:1434
Definition: AprilTagFieldLayout.h:22
G
Definition: magnetic_field_strength.h:52