[wpimath] Reorganize LinearSystem factories (#8468)

This commit is contained in:
Tyler Veness
2026-01-12 19:09:35 -08:00
committed by GitHub
parent 89d0759ef2
commit 00fa8361dd
108 changed files with 1808 additions and 2138 deletions

View File

@@ -8,10 +8,10 @@ import org.wpilib.math.linalg.Matrix;
import org.wpilib.math.linalg.VecBuilder;
import org.wpilib.math.numbers.N1;
import org.wpilib.math.numbers.N2;
import org.wpilib.math.system.DCMotor;
import org.wpilib.math.system.LinearSystem;
import org.wpilib.math.system.Models;
import org.wpilib.math.system.NumericalIntegration;
import org.wpilib.math.system.plant.DCMotor;
import org.wpilib.math.system.plant.LinearSystemId;
import org.wpilib.system.RobotController;
/** Represents a simulated single jointed arm mechanism. */
@@ -38,7 +38,7 @@ public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N2> {
* Creates a simulated arm mechanism.
*
* @param plant The linear system that represents the arm. This system can be created with {@link
* org.wpilib.math.system.plant.LinearSystemId#createSingleJointedArmSystem(DCMotor, double,
* org.wpilib.math.system.Models#singleJointedArmFromPhysicalConstants(DCMotor, double,
* double)}.
* @param gearbox The type of and number of motors in the arm gearbox.
* @param gearing The gearing of the arm (numbers greater than 1 represent reductions).
@@ -97,7 +97,7 @@ public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N2> {
double startingAngleRads,
double... measurementStdDevs) {
this(
LinearSystemId.createSingleJointedArmSystem(gearbox, j, gearing),
Models.singleJointedArmFromPhysicalConstants(gearbox, j, gearing),
gearbox,
gearing,
armLength,