mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpimath] Reorganize LinearSystem factories (#8468)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user